AHT20.Transport behaviour (aht20 v0.3.1) View Source

The communication bus between the target board and the AHT20 sensor.

Link to this section Summary

Link to this section Types

Specs

bus_address() :: 0..127

Specs

bus_name() :: String.t()

Specs

register() :: non_neg_integer()

Specs

transport() :: pid()

Link to this section Callbacks

Link to this callback

read(transport, integer)

View Source

Specs

read(transport(), integer()) :: {:ok, binary()} | {:error, any()}

Specs

start_link(bus_name: bus_name(), bus_address: bus_address()) ::
  {:ok, transport()} | {:error, any()}
Link to this callback

write(transport, iodata)

View Source

Specs

write(transport(), iodata()) :: :ok | {:error, any()}
Link to this callback

write(transport, register, iodata)

View Source

Specs

write(transport(), register(), iodata()) :: :ok | {:error, any()}
Link to this callback

write_read(transport, register, integer)

View Source

Specs

write_read(transport(), register(), integer()) ::
  {:ok, binary()} | {:error, any()}