MSP430™CapTIvateSoftwareLibraryAPIGuide
1_83_00_05
|
For large code model devices, a function pointer should be 32-bits. More...
#include <CAPT_Type.h>
Data Fields | |
void(* | pvCallback )(struct tSensor *) |
const tCycle ** | pCycle |
tGenericSensorParams * | pSensorParams |
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... | |
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
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
const tCycle** tSensor::pCycle |
Pointer to an array of cycle pointers. The cycle pointer array length must be equal to the value in ui8NrOfCycles.
tGenericSensorParams* tSensor::pSensorParams |
Pointer to the sensor-specific parameter structure.
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::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::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::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::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::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.
uint16_t tSensor::ui16Timeout |
Timeout counter for the sensor.
tDeBounceSettings tSensor::ProxDbThreshold |
Defines the proximity de-bounce in and out thresholds for the sensor. Valid values are 0 (off) to 15 samples.
tDeBounceSettings tSensor::TouchDbThreshold |
Defines the touch de-bounce in and out thresholds for the sensor. Valid values are 0 (off) to 15 samples.
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::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::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::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.
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().
bool tSensor::bCountFilterEnable |
Enables or disables count filtering of elements in this sensor.
uint8_t tSensor::ui8CntBeta |
Defines the count filter beta coefficient for this sensor.
uint8_t tSensor::ui8LTABeta |
Defines the LTA filter beta coefficient for this sensor.
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::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.
tSenseTechnology tSensor::SensingMethod |
Defines the capacitive sensing method to use with this sensor (self capacitance or projected (mutual) capacitance).
tDirectionOfInterest tSensor::DirectionOfInterest |
Direction of Interest: Increasing counts or decreasing counts.
bool tSensor::bSensorUpdating |
Indicates that the sensor is currently updating.
bool tSensor::bCsDischarge |
Defines the sample capacitor discharge level. 0 indicates 0V, 1 indicates 0.5V.
bool tSensor::bModEnable |
Defines whether conversion clock modulation is enabled to reduce radiated emissions.
bool tSensor::bLpmControl |
Defines whether the CapTIvate™ analog domain is powered down after each cycle completes measurement. (CAPCTRL01:CAPLPMCFG)
bool tSensor::bTimerSyncControl |
Defines whether measurements for cycles in this sensor pend on a timer event.
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::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::bSensorHalt |
Immediately halt the LTA of all elements in this sensor.
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::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::bSensorDetect |
Indicates whether any element in the sensor experienced a detection via the FSM.
bool tSensor::bSensorProx |
Indicates that at least one element in the sensor is in a proximity state.
Referenced by CAPT_getGlobalUIProximityStatus().
bool tSensor::bSensorTouch |
Indicates that at least one element in the sensor is in a touch state.
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::bSensorNegativeTouch |
Indicates whether any element in the sensor experienced a negative touch (via the FSM).
bool tSensor::bMaxCountError |
Indicates whether any element in this sensor experienced a max count error (crossing of the ui16ErrorThreshold).
bool tSensor::bCalibrationError |
Indicates whether any element in this sensor experienced an error during runtime calibration.
bool tSensor::bCounterOVF |
Indicates whether a counter overflow occured.
bool tSensor::bSensorNoiseState |
Indicates whether the sensor is experiencing noise.