Skip to main content

I2cDevice

Type Alias I2cDevice 

pub type I2cDevice<'a> = I2cDevice<'a, CriticalSectionRawMutex, I2c>;
Available on crate feature i2c only.
Expand description

An I2C driver implementing [embedded_hal_async::i2c::I2c].

It needs to be provided with an MCU-specific I2C driver tied to a specific I2C peripheral, obtained as [hal::i2c::controller::I2c].

See [embedded_hal::i2c] to learn more about how to share the bus.

§Note

Despite the driver interface being async, it may block during operations. However, it cannot block indefinitely as a timeout is implemented, either by leveraging I2C-specific hardware capabilities or through a generic software timeout.

Aliased Type§

pub struct I2cDevice<'a> { /* private fields */ }