upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the MPR121 I2C Touch Sensor. More...
UPM module for the MPR121 touch sensor
Public Member Functions | |
synchronized void | delete () |
MPR121 (int bus, short address) | |
MPR121 (int bus) | |
boolean | configAN3944 () |
void | readButtons () |
int | writeBytes (short reg, byte[] buffer) |
int | readBytes (short reg, byte[] buffer) |
void | setM_buttonStates (int value) |
int | getM_buttonStates () |
void | setM_overCurrentFault (boolean value) |
boolean | getM_overCurrentFault () |
boolean configAN3944 | ( | ) |
MPR121 destructor ~MPR121(); there is no need for the destructor Sets up a default configuration, based on Application Note 3944 (AN3944): http://cache.freescale.com/files/sensors/doc/app_note/AN3944.pdf
After configuration, the sensor is left in the run state.
void readButtons | ( | ) |
Reads button states in the m_buttonStates member variable. Also, sets the m_overCurrentFault variable if overcurrent is detected.