eensy/i2c
Types
pub type BeginTransmissionError =
dynamic.Dynamic
pub type CloseError =
dynamic.Dynamic
pub type EndTransmissionError =
dynamic.Dynamic
pub type OpenParameters {
Scl(Int)
Sda(Int)
ClockSpeedHz(Int)
}
Constructors
-
Scl(Int)
-
Sda(Int)
-
ClockSpeedHz(Int)
pub type ReadBytesError =
dynamic.Dynamic
pub type WriteBytesError =
dynamic.Dynamic
Functions
pub fn begin_transmission(
i2c: Int,
address: Int,
) -> Result(Nil, Dynamic)
pub fn close(i2c: Int) -> Result(Nil, Dynamic)
pub fn end_transmission(i2c: Int) -> Result(Nil, Dynamic)
pub fn open(parameters: List(OpenParameters)) -> Int
pub fn open_with_result(parameters: List(OpenParameters)) -> Int
pub fn read_bytes(
i2c: Int,
address: Int,
count: Int,
) -> Result(BitArray, Dynamic)
pub fn write_byte(
i2c: Int,
byte: BitArray,
) -> Result(Nil, Dynamic)
pub fn write_bytes(
i2c: Int,
bytes: BitArray,
) -> Result(Nil, Dynamic)