upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the MPR121 I2C Touch Sensor. More...

Detailed Description

UPM module for the MPR121 touch sensor

mpr121.jpg

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 ()
 

Constructor & Destructor Documentation

MPR121 ( int  bus,
short  address 
)

MPR121 constructor

Parameters
busI2C bus to use

Member Function Documentation

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.

Returns
True if configuration is successful
void readButtons ( )

Reads button states in the m_buttonStates member variable. Also, sets the m_overCurrentFault variable if overcurrent is detected.


The documentation for this class was generated from the following file: