Module i2c

Source
Expand description

Async I2C API.

This API supports 7-bit and 10-bit addresses. Traits feature an AddressMode marker type parameter. Two implementation of the AddressMode exist: SevenBitAddress and TenBitAddress.

Through this marker types it is possible to implement each address mode for the traits independently in embedded-hal implementations and device drivers can depend only on the mode that they support.

Additionally, the I2C 10-bit address mode has been developed to be fully backwards compatible with the 7-bit address mode. This allows for a software-emulated 10-bit addressing implementation if the address mode is not supported by the hardware.

Since 7-bit addressing is the mode of the majority of I2C devices, SevenBitAddress has been set as default mode and thus can be omitted if desired.

Enums§

ErrorKind
I2C error kind.
NoAcknowledgeSource
I2C no acknowledge error source.
Operation
I2C operation.

Traits§

AddressMode
Address mode (7-bit / 10-bit).
Error
I2C error.
ErrorType
I2C error type trait.
I2c
Async I2c.

Type Aliases§

SevenBitAddress
7-bit address mode type.
TenBitAddress
10-bit address mode type.