API for the MPR121 I2C Touch Sensor.
More...
UPM module for the MPR121 touch sensor
upm::MPR121 touch(MPR121_I2C_BUS, MPR121_DEFAULT_I2C_ADDR);
touch.configAN3944();
while (shouldRun) {
touch.readButtons();
printButtons(touch);
upm_delay(1);
}
MPR121 |
( |
int |
bus, |
|
|
uint8_t |
address = MPR121_DEFAULT_I2C_ADDR |
|
) |
| |
Reads button states in the m_buttonStates member variable. Also, sets the m_overCurrentFault variable if overcurrent is detected.
mraa::Result writeBytes |
( |
uint8_t |
reg, |
|
|
uint8_t * |
buffer, |
|
|
int |
len |
|
) |
| |
Writes value(s) into registers
- Parameters
-
reg | Register location to start writing into |
buffer | Buffer for data storage |
len | Number of bytes to write |
- Returns
- mraa::Result
int readBytes |
( |
uint8_t |
reg, |
|
|
uint8_t * |
buffer, |
|
|
int |
len |
|
) |
| |
Reads value(s) from registers
- Parameters
-
reg | Register location to start reading from |
buffer | Buffer for data storage |
len | Number of bytes to read |
The documentation for this class was generated from the following files: