components

Module i2c

Source
Expand description

Components for I2C.

This provides two components.

  1. I2CMuxComponent provides a virtualization layer for a I2C bus.

  2. I2CComponent provides a virtualized client to the I2C bus.

§Usage

let mux_i2c = components::i2c::I2CMuxComponent::new(&stm32f3xx::i2c::I2C1, None, dynamic_deferred_caller)
    .finalize(components::i2c_mux_component_static!());
let client_i2c = components::i2c::I2CComponent::new(mux_i2c, 0x19)
    .finalize(components::i2c_component_static!());

Structs§