View Source HTS221.Register protocol (hts221 v1.1.0)
Protocol for turning a data structure into an IO request that a transport can use to read and/or write to the HTS221
Link to this section Summary
Functions
Make the data structure into an HTS221.IORead
Make the data structure into an HTS221.IOWrite
Link to this section Types
Specs
t() :: term()
All the types that implement this protocol.
Link to this section Functions
Specs
read(t()) :: {:ok, HTS221.IORead.t()} | {:error, :access_error}
Make the data structure into an HTS221.IORead
If the register should not be read return {:error, :access_error}
.
Specs
write(t()) :: {:ok, HTS221.IOWrite.t()} | {:error, :access_error}
Make the data structure into an HTS221.IOWrite
If the register should not be written return {:error, :access_error}
.