Capacitive Touch Library
Description of the Capacitive Touch Library
 All Files Functions Variables Groups
Modules | Functions
API Group

Modules

 Support Group
 

Functions

void TI_CAPT_Raw (const struct Sensor *groupOfElements, uint16_t *counts)
 Measure the capacitance of each element within the Sensor.
 
void TI_CAPT_Init_Baseline (const struct Sensor *groupOfElements)
 Make a single capacitance meausrment to initialize baseline tracking.
 
void TI_CAPT_Update_Baseline (const struct Sensor *groupOfElements, uint8_t numberOfAverages)
 Update baseline tracking by averaging several measurements.
 
void TI_CAPT_Reset_Tracking (void)
 Reset the Baseline Tracking algorithm to the default state.
 
void TI_CAPT_Update_Tracking_DOI (uint8_t direction)
 Update the Baseline Tracking algorithm Direction of Interest.
 
void TI_CAPT_Update_Tracking_Rate (uint8_t rate)
 Update the baseling tracking algorithm tracking rates.
 
void TI_CAPT_Custom (const struct Sensor *groupOfElements, uint16_t *deltaCnt)
 Measure the change in capacitance of the Sensor.
 
uint8_t TI_CAPT_Button (const struct Sensor *groupOfElements)
 Determine if a button is being pressed.
 
struct Element * TI_CAPT_Buttons (const struct Sensor *groupOfElements)
 Determine which button if any is being pressed.
 
uint16_t TI_CAPT_Slider (const struct Sensor *groupOfElements)
 Determine the position on a slider.
 
uint16_t TI_CAPT_Wheel (const struct Sensor *groupOfElements)
 Determine the position on a wheel.
 

Detailed Description

Function Documentation

uint8_t TI_CAPT_Button ( const struct Sensor *  groupOfElements)

Determine if a button is being pressed.

Parameters
groupOfElementsPointer to button to be scanned
Returns
result Indication if button is (1) or is not (0) being pressed
struct Element* TI_CAPT_Buttons ( const struct Sensor *  groupOfElements)
read

Determine which button if any is being pressed.

Parameters
groupOfElementsPointer to buttons to be scanned
Returns
result pointer to element (button) being pressed or 0 none
void TI_CAPT_Custom ( const struct Sensor *  groupOfElements,
uint16_t *  deltaCnt 
)

Measure the change in capacitance of the Sensor.

     This function measures the change in capacitance of each element
     within a sensor and updates the baseline tracking in the event that
     no change exceeds the detection threshold.
     The order of the elements within the Sensor structure is arbitrary 
     but must be consistent between the application and configuration. 
     The first element in the array (deltaCnt) corresponds to the first 
     element within the Sensor structure.
Parameters
groupOfElementsPointer to Sensor structure to be measured
deltaCntAddress to where the measurements are to be written
Returns
none
void TI_CAPT_Init_Baseline ( const struct Sensor *  groupOfElements)

Make a single capacitance meausrment to initialize baseline tracking.

Parameters
groupOfElementsPointer to Sensor structure to be measured
Returns
none
void TI_CAPT_Raw ( const struct Sensor *  groupOfElements,
uint16_t *  counts 
)

Measure the capacitance of each element within the Sensor.

     This function selects the appropriate HAL to perform the capacitance
     measurement based upon the halDefinition found in the sensor 
     structure. 
     The order of the elements within the Sensor structure is arbitrary 
     but must be consistent between the application and configuration. 
     The first element in the array (counts) corresponds to the first 
     element within the Sensor structure.
Parameters
groupOfElementsPointer to Sensor structure to be measured
countsAddress to where the measurements are to be written
Returns
none
void TI_CAPT_Reset_Tracking ( void  )

Reset the Baseline Tracking algorithm to the default state.

Parameters
none
Returns
none
uint16_t TI_CAPT_Slider ( const struct Sensor *  groupOfElements)

Determine the position on a slider.

Parameters
groupOfElementsPointer to slider
Returns
result position on slider or illegal value if no touch
void TI_CAPT_Update_Baseline ( const struct Sensor *  groupOfElements,
uint8_t  numberOfAverages 
)

Update baseline tracking by averaging several measurements.

Parameters
groupOfElementsPointer to Sensor structure to be measured
numberOfAveragesNumber of measurements to be averaged
Returns
none
void TI_CAPT_Update_Tracking_DOI ( uint8_t  direction)

Update the Baseline Tracking algorithm Direction of Interest.

Parameters
directionDirection of increasing or decreasing capacitance
Returns
none
void TI_CAPT_Update_Tracking_Rate ( uint8_t  rate)

Update the baseling tracking algorithm tracking rates.

Parameters
rateRate of tracking changes in and against direction of intrest
Returns
none
uint16_t TI_CAPT_Wheel ( const struct Sensor *  groupOfElements)

Determine the position on a wheel.

Parameters
groupOfElementsPointer to wheel
Returns
result position on wheel or illegal value if no touch