Skip to main content

Module slave

Module slave 

Source
Available on crate feature unstable only.
Expand description

§Inter-Integrated Circuit (I2C) - Slave mode

§Overview

This driver implements the I2C Slave mode. In this mode, the MCU responds to and communicates with one or more master devices. The MCU acts as a slave device on the I2C bus, identified by its unique I2C address.

§Implementation

This driver supports both Blocking and Async modes, using hardware SCL clock stretching to handle flow control. The async implementation runs a callback-free waker model, waking the task waker when stretching or transaction completeness interrupts occur.

Structs§

AnyI2c
Any I2C peripheral in slave mode.
Config
I2C Slave configuration
I2cSlave
I2C Slave driver
Info
I2C Slave peripheral information.
State
I2C Slave state.

Enums§

Command
Received command from the master
ConfigError
I2C slave configuration errors
Error
I2C Slave error
ReadStatus
Possible responses to responding to a read request

Constants§

FIFO_SIZE
FIFO size of the I2C peripheral.

Traits§

Instance
I2C Slave peripheral instance.