MSP430™CapTIvateSoftwareLibraryAPIGuide  1_83_00_05
Data Fields
tSensor Struct Reference

For large code model devices, a function pointer should be 32-bits. More...

#include <CAPT_Type.h>

Collaboration diagram for tSensor:
Collaboration graph
[legend]

Data Fields

void(* pvCallback )(struct tSensor *)
 
const tCycle ** pCycle
 
tGenericSensorParamspSensorParams
 Pointer to the sensor-specific parameter structure. More...
 
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. More...
 
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. More...
 
uint8_t ui8CntBeta: 3
 Defines the count filter beta coefficient for this sensor. More...
 
uint8_t ui8LTABeta: 3
 Defines the LTA filter beta coefficient for this sensor. More...
 
uint8_t ui8BiasControl: 2
 
uint8_t ui8InputSyncControl: 2
 
tSenseTechnology SensingMethod: 1
 
tDirectionOfInterest DirectionOfInterest: 1
 Direction of Interest: Increasing counts or decreasing counts. More...
 
bool bSensorUpdating: 1
 Indicates that the sensor is currently updating. More...
 
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. More...
 
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. More...
 
bool bSensorNoiseState: 1
 Indicates whether the sensor is experiencing noise. More...
 

Detailed Description

For large code model devices, a function pointer should be 32-bits.

typedef tSensor

The generic sensor structure holds the basic properties for a sensor

Field Documentation

§ pvCallback

void(* tSensor::pvCallback) (struct tSensor *)

Pointer to a callback function. If !=NULL, this function will be called after this sensor is measured. For large code model devices, a function pointer should be 32-bits

§ pCycle

const tCycle** tSensor::pCycle

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

§ pSensorParams

tGenericSensorParams* tSensor::pSensorParams

Pointer to the sensor-specific parameter structure.

§ ui16ConversionGain

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.

§ ui16ConversionCount

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.

§ ui16ErrorThreshold

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.

§ ui16ProxThreshold

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.

§ ui16NegativeTouchThreshold

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.

§ ui16TimeoutThreshold

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.

§ ui16Timeout

uint16_t tSensor::ui16Timeout

Timeout counter for the sensor.

§ ProxDbThreshold

tDeBounceSettings tSensor::ProxDbThreshold

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

§ TouchDbThreshold

tDeBounceSettings tSensor::TouchDbThreshold

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

§ ui8NrOfCycles

uint8_t tSensor::ui8NrOfCycles

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

§ ui8FreqDiv

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).

§ ui8ChargeLength

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.

§ ui8TransferLength

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.

§ TypeOfSensor

tSensorType tSensor::TypeOfSensor

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

Referenced by CAPT_initUI(), and CAPT_updateUI().

§ bCountFilterEnable

bool tSensor::bCountFilterEnable

Enables or disables count filtering of elements in this sensor.

§ ui8CntBeta

uint8_t tSensor::ui8CntBeta

Defines the count filter beta coefficient for this sensor.

§ ui8LTABeta

uint8_t tSensor::ui8LTABeta

Defines the LTA filter beta coefficient for this sensor.

§ ui8BiasControl

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.

§ ui8InputSyncControl

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.

§ SensingMethod

tSenseTechnology tSensor::SensingMethod

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

§ DirectionOfInterest

tDirectionOfInterest tSensor::DirectionOfInterest

Direction of Interest: Increasing counts or decreasing counts.

§ bSensorUpdating

bool tSensor::bSensorUpdating

Indicates that the sensor is currently updating.

§ bCsDischarge

bool tSensor::bCsDischarge

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

§ bModEnable

bool tSensor::bModEnable

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

§ bLpmControl

bool tSensor::bLpmControl

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

§ bTimerSyncControl

bool tSensor::bTimerSyncControl

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

§ bReCalibrateEnable

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.

§ bIdleState

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.

§ bSensorHalt

bool tSensor::bSensorHalt

Immediately halt the LTA of all elements in this sensor.

§ bPTSensorHalt

bool tSensor::bPTSensorHalt

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

§ bPTElementHalt

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.

§ bSensorDetect

bool tSensor::bSensorDetect

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

§ bSensorProx

bool tSensor::bSensorProx

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

Referenced by CAPT_getGlobalUIProximityStatus().

§ bSensorTouch

bool tSensor::bSensorTouch

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

§ bSensorPrevTouch

bool tSensor::bSensorPrevTouch

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

§ bSensorNegativeTouch

bool tSensor::bSensorNegativeTouch

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

§ bMaxCountError

bool tSensor::bMaxCountError

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

§ bCalibrationError

bool tSensor::bCalibrationError

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

§ bCounterOVF

bool tSensor::bCounterOVF

Indicates whether a counter overflow occured.

§ bSensorNoiseState

bool tSensor::bSensorNoiseState

Indicates whether the sensor is experiencing noise.


The documentation for this struct was generated from the following file:
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale