Logo
MSP430™ CapTIvate Library API Guide  LIB_VERSION=1.04.00.00
tSensor Struct Reference

#include <CAPT_Type.h>

Data Fields

void(* pvCallback )()
 
const tCycle ** pCycle
 
tGenericSensorParamspSensorParams
 Pointer to the sensor-specific parameter structure.
 
uint16_t ui16ConversionGain
 
uint16_t ui16ConversionCount
 
uint16_t ui16ErrorThreshold
 
uint16_t ui16ProxThreshold
 
uint16_t ui16NegativeTouchThreshold
 
uint16_t ui16TimeoutThreshold
 
uint16_t ui16Timeout
 Timeout counter for the sensor.
 
tDeBounceSettings ProxDbThreshold
 
tDeBounceSettings TouchDbThreshold
 
uint8_t ui8NrOfCycles: 5
 
uint8_t ui8FreqDiv: 3
 
uint8_t ui8ChargeLength: 4
 
uint8_t ui8TransferLength: 4
 
tSensorType TypeOfSensor: 4
 
bool bCountFilterEnable: 1
 Enables or disables count filtering of elements in this sensor.
 
uint8_t ui8CntBeta: 3
 Defines the count filter beta coefficient for this sensor.
 
uint8_t ui8LTABeta: 3
 Defines the LTA filter beta coefficient for this sensor.
 
uint8_t ui8BiasControl: 2
 
uint8_t ui8InputSyncControl: 2
 
tSenseTechnology SensingMethod: 1
 
tDirectionOfInterest DirectionOfInterest: 1
 Direction of Interest: Increasing counts or decreasing counts.
 
bool bSensorUpdating: 1
 Indicates that the sensor is currently updating.
 
bool bCsDischarge: 1
 
bool bModEnable: 1
 
bool bLpmControl: 1
 
bool bTimerSyncControl: 1
 
bool bReCalibrateEnable: 1
 
bool bIdleState: 1
 
bool bSensorHalt: 1
 Immediately halt the LTA of all elements in this sensor.
 
bool bPTSensorHalt: 1
 
bool bPTElementHalt: 1
 
bool bSensorDetect: 1
 
bool bSensorProx: 1
 
bool bSensorTouch: 1
 
bool bSensorPrevTouch: 1
 
bool bSensorNegativeTouch: 1
 
bool bMaxCountError: 1
 
bool bCalibrationError: 1
 
bool bCounterOVF: 1
 Indicates whether a counter overflow occured.
 
bool bSensorNoiseState: 1
 Indicates whether the sensor is experiencing noise.
 

Detailed Description

typedef tSensor

The generic sensor structure holds the basic properties for a sensor

Field Documentation

bool tSensor::bCalibrationError

Indicates whether any element in this sensor experienced an error during runtime calibration.

bool tSensor::bCsDischarge

Defines the sample capacitor discharge level. 0 indicates 0V, 1 indicates 0.5V.

bool tSensor::bIdleState

Defines whether the pins of the elements in this sensor are grounded or set to high impedance when not being measured. 0=High-Z, 1=GND.

bool tSensor::bLpmControl

Defines whether the CapTIvate™ analog domain is powered down after each cycle completes measurement. (CAPCTRL01:CAPLPMCFG)

bool tSensor::bMaxCountError

Indicates whether any element in this sensor experienced a max count error (crossing of the ui16ErrorThreshold).

bool tSensor::bModEnable

Defines whether conversion clock modulation is enabled to reduce radiated emissions.

bool tSensor::bPTElementHalt

Defines whether to halt the LTA of a specific element in this sensor if that element enters a proximity or touch state.

bool tSensor::bPTSensorHalt

Defines whether to halt the LTA for all elements in this sensor if any enter a proximity or touch state.

bool tSensor::bReCalibrateEnable

Defines whether the sensor will re-calibrate if an element's LTA drifts outside of 1/8th of the conversion count specification.

bool tSensor::bSensorDetect

Indicates whether any element in the sensor experienced a detection via the FSM.

bool tSensor::bSensorNegativeTouch

Indicates whether any element in the sensor experienced a negative touch (via the FSM).

bool tSensor::bSensorPrevTouch

Indicates whether the previous sample was in a touch state. This aids in identifying a new touch versus a stale touch.

bool tSensor::bSensorProx

Indicates that at least one element in the sensor is in a proximity state.

bool tSensor::bSensorTouch

Indicates that at least one element in the sensor is in a touch state.

bool tSensor::bTimerSyncControl

Defines whether measurements for cycles in this sensor pend on a timer event.

const tCycle** tSensor::pCycle

Pointer to an array of cycle pointers. The cycle pointer array length must be equal to the value in ui8NrOfCycles.

tDeBounceSettings tSensor::ProxDbThreshold

Defines the proximity de-bounce in and out thresholds for the sensor. Valid values are 0 (off) to 15 samples.

void(* tSensor::pvCallback) ()

Pointer to a callback function. If !=NULL, this function will be called after this sensor is measured.

tSenseTechnology tSensor::SensingMethod

Defines the capacitive sensing method to use with this sensor (self capacitance or projected (mutual) capacitance).

tDeBounceSettings tSensor::TouchDbThreshold

Defines the touch de-bounce in and out thresholds for the sensor. Valid values are 0 (off) to 15 samples.

tSensorType tSensor::TypeOfSensor

Defines the type of sensor being defined here (Button Group, Slider, Wheel, Proximity). Up to 16 sensor types are supported.

uint16_t tSensor::ui16ConversionCount

Defines the sensor conversion gain. This value must be less than the conversion count above. Lowering the value increases the amount of offset applied to the measurement for each element in this sensor. This is an input to the automatic calibration algorithm. Valid values are < 8192.

uint16_t tSensor::ui16ConversionGain

Defines the sensor conversion count. This is the desired count value for all elements in this sensor. This establishes the resolution of the measurement, and is an input to the automatic calibration algorithm. Valid values are < 8192.

uint16_t tSensor::ui16ErrorThreshold

Defines the error threshold for the sensor in absolute counts. A measurement that exceeds this threshold will show a max count error.

uint16_t tSensor::ui16NegativeTouchThreshold

Defines the negative (reverse) touch threshold for the sensor relative to each element's LTA. This threshold allows detection of a touch removal if a system powers up or re-calibrates while being touched.

uint16_t tSensor::ui16ProxThreshold

Defines the proximity threshold for the sensor relative to each element's LTA. This is the detection threshold used by the finite state machine.

uint16_t tSensor::ui16TimeoutThreshold

Defines the timeout threshold for the sensor, in samples. If any element in this sensor is in a touch/prox state for this many samples, the touch/prox state is cleared and the LTA/Count filters are reset.

uint8_t tSensor::ui8BiasControl

Defines the bias control setting (only applicable in mutual capacitance mode). There are four possible bias current levels, 0-3, with 0 being lowest power and 3 being highest power.

uint8_t tSensor::ui8ChargeLength

Defines the charge phase length. There are 16 possible lengths, with 0 representing 1 conversion clock cycle and 15 representing 16 conversion clock cycles.

uint8_t tSensor::ui8FreqDiv

Defines the conversion clock frequency divider. There are 8 possible clock dividers from 0 to 7 (Divide by 1 to divide by 128).

uint8_t tSensor::ui8InputSyncControl

Defines the dead time between charge and transfer phases. There are 5 possible times that can be selected. Defines whether measurements for cycles in this sensor pend on a input sync event. 0=disabled, 1=rising edge triggered, 2=falling edge triggered.

uint8_t tSensor::ui8NrOfCycles

Defines the number of cycles that are implemented in this sensor. The maximum number of cycles supported is 32.

uint8_t tSensor::ui8TransferLength

Defines the transfer phase length. There are 16 possible lengths, with 0 representing 1 conversion clock cycle and 15 representing 16 conversion clock cycles.


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