Cypress CapSense Middleware Library
cy_stc_capsense_widget_context_t Struct Reference

Description

Widget context structure.

Data Fields

uint16_t fingerCap
 Widget finger capacitance parameter used for the CSD widgets only when SmartSense is enabled.
 
uint16_t sigPFC
 The 75% of signal per user-defined finger capacitance.
 
uint16_t resolution
 Provides scan resolution for the CSD Widgets. More...
 
uint16_t maxRawCount
 Calculated maximum raw count of widget.
 
uint16_t fingerTh
 Widget Finger Threshold.
 
uint16_t proxTh
 Widget Proximity Threshold.
 
uint16_t lowBslnRst
 The widget low baseline reset count. More...
 
uint16_t snsClk
 Sense Clock Divider. More...
 
uint16_t rowSnsClk
 Row Sense Clock Divider for the Matrix Buttons and Touchpad widgets.
 
uint16_t gestureDetected
 Mask of detected gestures.
 
uint16_t gestureDirection
 Mask of directions of detected gestures.
 
int16_t xDelta
 The filtered by Ballistic Multiplier X-displacement.
 
int16_t yDelta
 The filtered by Ballistic Multiplier Y-displacement.
 
uint8_t noiseTh
 Widget Noise Threshold.
 
uint8_t nNoiseTh
 Widget Negative Noise Threshold.
 
uint8_t hysteresis
 Widget Hysteresis for the signal crossing finger threshold.
 
uint8_t onDebounce
 Widget Debounce for the signal above the finger threshold 1 to 255. More...
 
uint8_t snsClkSource
 Widget clock source: More...
 
uint8_t idacMod [CY_CAPSENSE_FREQ_CHANNELS_NUM]
 Sets the current of the modulation IDAC for the CSD widgets. More...
 
uint8_t idacGainIndex
 Index of IDAC gain in table cy_stc_capsense_idac_gain_table_t.
 
uint8_t rowIdacMod [CY_CAPSENSE_FREQ_CHANNELS_NUM]
 Sets the current of the modulation IDAC for the row sensors for the CSD Touchpad and Matrix Button widgets. More...
 
uint8_t bslnCoeff
 Baseline IIR filter coefficient. More...
 
uint8_t status
 Contains masks: More...
 
cy_stc_capsense_touch_t wdTouch
 Widget touch structure used for Matrix Buttons, Sliders, and Touchpads.
 

Field Documentation

◆ resolution

uint16_t cy_stc_capsense_widget_context_t::resolution

Provides scan resolution for the CSD Widgets.

Provides number of sub-conversions for the CSX Widgets

◆ lowBslnRst

uint16_t cy_stc_capsense_widget_context_t::lowBslnRst

The widget low baseline reset count.

Specifies the number of samples the sensor signal must be below the Negative Noise Threshold nNoiseTh to trigger a baseline reset

◆ snsClk

uint16_t cy_stc_capsense_widget_context_t::snsClk

Sense Clock Divider.

For the Matrix Buttons and Touchpad widgets specifies the column sense clock divider

◆ onDebounce

uint8_t cy_stc_capsense_widget_context_t::onDebounce

Widget Debounce for the signal above the finger threshold 1 to 255.

  • 1 - touch reported immediately as soon as detected
  • 2 - touch reported on the second consecutive detection
  • 3 - touch reported on the third consecutive detection

◆ snsClkSource

uint8_t cy_stc_capsense_widget_context_t::snsClkSource

Widget clock source:

  • bit[7] - Indicates auto mode of clock source selection
  • bit[0:6] - Clock source:
    • 0 - Direct (CY_CAPSENSE_CLK_SOURCE_DIRECT)
    • 1 - SSC6 (CY_CAPSENSE_CLK_SOURCE_SSC6)
    • 2 - SSC7 (CY_CAPSENSE_CLK_SOURCE_SSC7)
    • 3 - SSC9 (CY_CAPSENSE_CLK_SOURCE_SSC9)
    • 4 - SSC10 (CY_CAPSENSE_CLK_SOURCE_SSC10)
    • 5 - PRS8 (CY_CAPSENSE_CLK_SOURCE_PRS8)
    • 6 - PRS12 (CY_CAPSENSE_CLK_SOURCE_PRS12)

◆ idacMod

uint8_t cy_stc_capsense_widget_context_t::idacMod[CY_CAPSENSE_FREQ_CHANNELS_NUM]

Sets the current of the modulation IDAC for the CSD widgets.

For the CSD Touchpad and Matrix Button widgets sets the current of the modulation IDAC for the column sensors. Not used for the CSX widgets.

◆ rowIdacMod

uint8_t cy_stc_capsense_widget_context_t::rowIdacMod[CY_CAPSENSE_FREQ_CHANNELS_NUM]

Sets the current of the modulation IDAC for the row sensors for the CSD Touchpad and Matrix Button widgets.

Not used for the CSX widgets.

◆ bslnCoeff

uint8_t cy_stc_capsense_widget_context_t::bslnCoeff

Baseline IIR filter coefficient.

Lower value leads to higher filtering.

◆ status

uint8_t cy_stc_capsense_widget_context_t::status

Contains masks:

  • bit[0] - Widget Active (CY_CAPSENSE_WD_ACTIVE_MASK)
  • bit[1] - Widget Disabled (CY_CAPSENSE_WD_DISABLE_MASK)
  • bit[2] - Widget Working (CY_CAPSENSE_WD_WORKING_MASK) - reserved