Skip to main content

Module slave

Module slave 

Source
Available on crate feature unstable only.
Expand description

§Inter-Integrated Circuit (I2C) - Slave mode

§Overview

Receives writes and responds to read requests at a 7-bit I2C address. The driver uses SCL clock stretching for flow control in Blocking and Async modes. Writes stretch SCL at each data byte’s ACK until the driver consumes that byte.

§Timeouts

Operations have no software time limit and can wait indefinitely. Error::Timeout reports a detected hardware bus timeout. A later request’s clock stretch can hide an earlier bus timeout.

Operations reset the controller before returning Error::Timeout or Error::ArbitrationLost. This releases the slave’s outputs and discards pending requests. The master must retry these requests.

Structs§

AnyI2c
Any I2C peripheral in slave mode.
Config
I2C slave configuration.
I2cSlave
I2C slave driver.

Enums§

Command
Request received from the master.
ConfigError
I2C slave configuration errors.
Error
I2C slave errors.
ReadStatus
Result of a response to a master read request.

Constants§

FIFO_SIZE
FIFO size of the I2C peripheral.