Struct stm32_hal2::i2c::I2c[][src]

pub struct I2c<R> { /* fields omitted */ }
Expand description

Represents an Inter-Integrated Circuit (I2C) peripheral.

Implementations

Initialize a I2C peripheral, including configuration register writes, and enabling and resetting its RCC peripheral clock. freq is in Hz.

Enable SMBus support. See L44 RM, section 37.4.11: SMBus initialization

Read multiple words to a buffer.

Write an array of words

Write and read an array of words.

Read data, using DMA. See L44 RM, 37.4.16: “Transmissino using DMA” Note that the channel argument is only used on F3 and L4. For a single write, set autoend to true. For a write_read and other use cases, set it to false.

Read data, using DMA. See L44 RM, 37.4.16: “Reception using DMA” Note that the channel argument is only used on F3 and L4.

Trait Implementations

Error type

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

Error type

Sends bytes to slave with address addr Read more

Error type

Sends bytes to slave with address addr 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.

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.