Sensorian  1.0
C API Reference Guide Library
Capacitive Touch Controller

Functions

void CAP1203_Initialize (void)
 Basic configuration for the capacitive touch controller. Configures the sensor inactive mode and activates all three channels. More...
 
unsigned char CAP1203_ActiveMode (void)
 Configures the controller in active mode. More...
 
unsigned char CAP1203_StandbyMode (void)
 Configures the controller in standby mode. More...
 
unsigned char CAP1203_DeepSleep (void)
 Configures the controller in deep sleep mode. More...
 
unsigned char CAP1203_ResumeFromDeepSleep (void)
 Takes the controller out of deep sleep mode. More...
 
void CAP1203_ConfigureMultiTouch (touch_type number, unsigned char mulchan)
 Enables the multi-touch capability of the controller. More...
 
unsigned char CAP1203_MultitouchEvent (void)
 Return true if a multitouch event was detected. More...
 
void CAP1203_SetPowerButton (button_type button)
 Configures the button as a power button. More...
 
unsigned char CAP1203_ReadPowerButton (void)
 Read the status of the power button. More...
 
unsigned char CAP1203_ReadPressedButton (void)
 Return id indicating which button was pressed. More...
 
unsigned char CAP1203_GetStatusReg (void)
 Reads the status register. More...
 
void CAP1203_EnableInterrupt (button_type pin)
 Enable interrupt, the ALERT pin goes high once an interrupt occurs. More...
 
void CAP1203_SetSensitivity (sensitivity_type sensitivity)
 Sets the sensitivity of each channel. More...
 
unsigned char CAP1203_CheckSensorStatus (void)
 Checks the sensor status. More...
 
unsigned char CAP1203_ClearInterrupt (void)
 Clears any impending interrupts. More...
 
unsigned int CAP1203_ReadID (void)
 Returns product chip and manufacturing ID. More...
 

Detailed Description

These functions let you communicate with the CAP1203 capacitive touch controller.

Function Documentation

unsigned char CAP1203_ActiveMode ( void  )

Configures the controller in active mode.

Returns
status Contents of status register

Definition at line 52 of file CAP1203.c.

unsigned char CAP1203_CheckSensorStatus ( void  )

Checks the sensor status.

Returns
Status Current chip status

Definition at line 221 of file CAP1203.c.

unsigned char CAP1203_ClearInterrupt ( void  )

Clears any impending interrupts.

Returns
intStatus Interrupt status

Definition at line 232 of file CAP1203.c.

void CAP1203_ConfigureMultiTouch ( touch_type  number,
unsigned char  mulchan 
)

Enables the multi-touch capability of the controller.

Parameters
numbertouch type
mulchanOne of the three channels.
Returns
none

Definition at line 103 of file CAP1203.c.

unsigned char CAP1203_DeepSleep ( void  )

Configures the controller in deep sleep mode.

Returns
reg Status register

Definition at line 77 of file CAP1203.c.

void CAP1203_EnableInterrupt ( button_type  pin)

Enable interrupt, the ALERT pin goes high once an interrupt occurs.

Parameters
pinEnables interrupt on the specific pin
Returns
none

Definition at line 201 of file CAP1203.c.

unsigned char CAP1203_GetStatusReg ( void  )

Reads the status register.

Returns
status Contents of status register

Definition at line 190 of file CAP1203.c.

void CAP1203_Initialize ( void  )

Basic configuration for the capacitive touch controller. Configures the sensor inactive mode and activates all three channels.

Returns
none
Examples:
CapacitiveTouch.c.

Definition at line 41 of file CAP1203.c.

unsigned char CAP1203_MultitouchEvent ( void  )

Return true if a multitouch event was detected.

Returns
none

Definition at line 114 of file CAP1203.c.

unsigned int CAP1203_ReadID ( void  )

Returns product chip and manufacturing ID.

Returns
chipID 16 bit chip and manufacturer ID

Definition at line 243 of file CAP1203.c.

unsigned char CAP1203_ReadPowerButton ( void  )

Read the status of the power button.

Returns
powerbutton status

Definition at line 141 of file CAP1203.c.

unsigned char CAP1203_ReadPressedButton ( void  )

Return id indicating which button was pressed.

Returns
Button pressed
Examples:
CapacitiveTouch.c.

Definition at line 159 of file CAP1203.c.

unsigned char CAP1203_ResumeFromDeepSleep ( void  )

Takes the controller out of deep sleep mode.

Returns
reg Status register

Definition at line 89 of file CAP1203.c.

void CAP1203_SetPowerButton ( button_type  button)

Configures the button as a power button.

Parameters
buttonOne of the three buttons
Returns
none

Definition at line 130 of file CAP1203.c.

void CAP1203_SetSensitivity ( sensitivity_type  sensitivity)

Sets the sensitivity of each channel.

Parameters
sensitivityChange button sensitivity settings.
Returns
none

Definition at line 212 of file CAP1203.c.

unsigned char CAP1203_StandbyMode ( void  )

Configures the controller in standby mode.

Returns
status Contents of status register

Definition at line 64 of file CAP1203.c.