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.

Trait Implementations

Error type

Reads enough bytes from slave with address to fill buffer Read more

Error type

Writes bytes to slave with address address Read more

Error type

Writes bytes to slave with address address and then reads enough bytes to fill buffer in a single transaction Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.