View Source HTS221.Transport behaviour (hts221 v1.1.0)
A behaviour to communicate to the HTS221
Link to this section Summary
Types
The underline communication data structure for the transport implementation to use when sending data to the HTS221.
A module that implements the HTS221.Transport
behaviour
Functions
Helper function initializing the transport implementation
Send the IO request to the HTS221
Link to this section Types
Specs
arg() :: any()
Arguments for the implementation init/1
callback
See the implementation's docs to see what the arguments are.
Specs
comm() :: any()
The underline communication data structure for the transport implementation to use when sending data to the HTS221.
For example in Circuits.I2C
the data structure is a reference.
Specs
impl() :: module()
A module that implements the HTS221.Transport
behaviour
Specs
Link to this section Callbacks
Specs
Initialize the transport implementation
Specs
read_register(comm(), binary(), non_neg_integer()) :: {:ok, binary()} | {:error, any()}
Read the register
Specs
Write the register
Link to this section Functions
Specs
Helper function initializing the transport implementation
Specs
send(t(), HTS221.IORead.t() | HTS221.IOWrite.t()) :: :ok | {:ok, binary()} | {:error, any()}
Send the IO request to the HTS221