Struct imxrt_hal::i2c::I2C [−][src]
pub struct I2C<M> { /* fields omitted */ }
Expand description
An I2C master
By default, the I2C master runs at 100KHz, Use set_clock_speed
to vary
the I2C bus speed.
Implementations
Set the I2C master clock speed
Set the pin low timeout
If SCL or, either SCL or SDA, is low for longer than the specified duration, then the
I2C hardware indicates an error. If the timeout is 0
, then the detection is disabled.
If the number of cycles required to represent the duration is too large, returns a
PinLowTimeoutError
. Try using a smaller duration.
Set the bus idle timeout
If both SCL and SDA are high for longer than the timeout, then the I2C bus is assumed to be
idle and the master can generate a START condition. If the timeout is 0
, then the idle is
disabled.
If the number of cycles required to represent the duration is too large, returns a
BusIdleTimeoutError
. Try using a smaller timeout.