View Source Wafer.Driver.ElixirALE.I2C (wafer v1.0.3)

A connection to a chip via ElixirALE's I2C driver.

Implements the Wafer.Conn behaviour as well as the Wafer.Chip and Wafer.I2C protocols.

Summary

Functions

Acquire a connection to a peripheral using the ElixirALE I2C driver on the specified bus and address.

Types

@type option() :: {:bus_name, binary()} | {:address, Wafer.I2C.address()}
@type options() :: [option()]
@type t() :: %Wafer.Driver.ElixirALE.I2C{
  address: Wafer.I2C.address(),
  bus: binary(),
  pid: pid()
}

Functions

@spec acquire(options()) :: {:ok, t()} | {:error, reason :: any()}

Acquire a connection to a peripheral using the ElixirALE I2C driver on the specified bus and address.