Crate mpr121_hal

source ·
Expand description

MPR121-Hal

This crate follows the Adafruit implementation closely but exposes it in terms of the embedded-hal project.

The main responsibility of this crate is returning the current on/off state of all the (up to) 12 pins.

The chip’s data sheet can be found here. The implementation however mostly mirrors the Adafruit implementation, since this is probably the most widely used one.

Structs

  • I2C connected Mpr121. Use either new_default or new to create a new instance.
  • Version of the Mpr121 driver that does not occupy the I2C bus. Instead the bus hat to be provided every time an action is done.

Enums

  • The four values the sensor can be addressed as. Note that the address of the device is determined by where the ADDR pin is connected to. Default is used if no connection, or a connection to VSS is made.