36 #define CAP1203ADDR 0x28 //0x28 - not shifted
39 #define MAIN_CTRL_REG 0x00
40 #define GEN_STATUS 0x02
41 #define SENSOR_INPUTS 0x03
42 #define NOISE_FLAG 0x0A
43 #define SENS1DELTACOUNT 0x10
44 #define SENS2DELTACOUNT 0x11
45 #define SENS3DELTACOUNT 0x12
46 #define SENSITIVITY 0x1F
48 #define SENSINPUTEN 0x21
49 #define SENSINCONF1 0x22
50 #define SENSINCONF2 0x23
51 #define AVERAGE_SAMP_CONF 0x24
52 #define CAL_ACTIV 0x26
53 #define INT_ENABLE 0x27
54 #define REPEAT_RATE 0x28
55 #define MULTITOUCH 0x2A
56 #define MULTIPATCONF 0x2B
57 #define MULTIPATTERN 0x2D
58 #define BASECOUNT 0x2E
59 #define RECALCONFIG 0x2F
60 #define S1THRESHOLD 0x30
61 #define S2THRESHOLD 0x31
62 #define S3THRESHOLD 0x32
63 #define SENSTHRESHOLD 0x38
65 #define STANDBYCHAN 0x40
66 #define STANDBYCONF 0x41
67 #define STANDBY_SENS 0x42
68 #define STANDBY_THRE 0x43
70 #define S1BASECOUNT 0x50
71 #define S2BASECOUNT 0x51
72 #define S3BASECOUNT 0x52
73 #define PWR_BUTTON 0x60
74 #define PWR_CONFIG 0x61
80 #define PRODUCT_ID 0xFD
90 #define ACAL_FAIL 0x20
136 #define M_PRESS2455MS
149 #define MOST_SENSITIVE 0x00
151 #define LEAST_SENSITIVE 0x70
155 #define DIS_DIG_NOISE 0x20
156 #define DIS_ANA_NOISE 0x10
157 #define MAX_DUR_EN 0x08
162 #define AVG 0x30 //default value 0b01100000 8 samples
163 #define SAMP_TIME 0x80 //0b00001000 1.28 ms
164 #define CYCLE_TIME 0x01
167 #define MULTBLK_EN 0x80
175 #define COMP_PTRN 0x02
176 #define MTP_ALERT 0x01
180 #define CS3_PTRN 0x04
181 #define CS2_PTRN 0x02
182 #define CS1_PTRN 0x01
186 #define TIME280ms 0x00
187 #define TIME560ms 0x01
188 #define TIME1120ms 0x02
189 #define TIME2240ms 0x03
unsigned char CAP1203_MultitouchEvent(void)
Return true if a multitouch event was detected.
void CAP1203_Write(unsigned char reg, unsigned char data)
Write data value to register address.
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...
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.
unsigned char CAP1203_Read(unsigned char reg)
Reads data from register reg address.
void CAP1203_SetPowerButton(button_type button)
Configures the button as a power button.
void CAP1203_ConfigureMultiTouch(touch_type number, unsigned char chan)
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 CAP1203_ClearInterrupt(void)
Clears any impending interrupts.
unsigned int CAP1203_ReadID(void)
Returns product chip and manufacturing ID.
unsigned char CAP1203_DeepSleep(void)
Configures the controller in deep sleep mode.