116 unsigned char mt = 0;
118 if((multi &
MULT) == MULT)
143 unsigned char pressed = 0;
161 unsigned char buttonPressed = 0;
183 return buttonPressed;
223 unsigned char sensor = 0;
234 unsigned char intStatus = 0x00;
247 return ((manu << 8)|
id);
unsigned char CAP1203_MultitouchEvent(void)
Return true if a multitouch event was detected.
unsigned char CAP1203_StandbyMode(void)
Configures the controller in standby mode.
unsigned char CAP1203_ReadPressedButton(void)
Return id indicating which button was pressed.
unsigned char CAP1203_ReadPowerButton(void)
Read the status of the power button.
void CAP1203_Initialize(void)
Basic configuration for the capacitive touch controller. Configures the sensor inactive mode and acti...
unsigned char CAP1203_Read(unsigned char reg)
Reads data from register reg address.
void I2C_WriteByteRegister(unsigned char reg, unsigned char data)
Writes a byte value to a register address.
void CAP1203_SetSensitivity(sensitivity_type sensitivity)
Sets the sensitivity of each channel.
unsigned char CAP1203_CheckSensorStatus(void)
Checks the sensor status.
void CAP1203_EnableInterrupt(button_type pin)
Enable interrupt, the ALERT pin goes high once an interrupt occurs.
#define AVERAGE_SAMP_CONF
void CAP1203_SetPowerButton(button_type button)
Configures the button as a power button.
void CAP1203_ConfigureMultiTouch(touch_type number, unsigned char mulchan)
Enables the multi-touch capability of the controller.
unsigned char CAP1203_ResumeFromDeepSleep(void)
Takes the controller out of deep sleep mode.
unsigned char CAP1203_ActiveMode(void)
Configures the controller in active mode.
unsigned char CAP1203_GetStatusReg(void)
Reads the status register.
unsigned char I2C_ReadByteRegister(char reg)
Reads a byte from a register.
unsigned char CAP1203_ClearInterrupt(void)
Clears any impending interrupts.
unsigned int CAP1203_ReadID(void)
Returns product chip and manufacturing ID.
void CAP1203_Write(unsigned char reg, unsigned char data)
Write data value to register address.
unsigned char CAP1203_DeepSleep(void)
Configures the controller in deep sleep mode.