CAPSENSE™ Middleware Library 5.0
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 smart sensing algorithm 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 maxRawCountRow
 Calculated row 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.
 
uint16_t noiseTh
 Widget Noise Threshold.
 
uint16_t nNoiseTh
 Widget Negative Noise Threshold.
 
uint16_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_MAX_SUPPORTED_FREQ_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. More...
 
uint8_t rowIdacMod [CY_CAPSENSE_MAX_SUPPORTED_FREQ_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.
 
uint16_t numSubConversions
 Number of sub-conversions in a scan. More...
 
uint8_t cdacRef
 Sets the capacitance of the reference CDAC. More...
 
uint8_t rowCdacRef
 Sets the capacitance of the row reference CDAC for CSD Touchpad and CSD Matrix buttons widgets. More...
 
uint8_t cicRate
 Sets decimation rate when CIC2 is enabled. More...
 
uint8_t cdacDitherEn
 Enabled CDAC dithering. More...
 
uint8_t cdacDitherValue
 CDAC dither scale value in bits. More...
 
uint8_t coarseInitBypassEn
 Skip Cmod coarse initialization sensors scan within widget. More...
 
uint16_t cdacCompDivider
 Number of time DAC switched in sense clock period. More...
 
uint8_t lfsrBits
 Defines the number of LSB bits to use by the LSFR unit to achieve the desired clock dithering variation. More...
 
uint8_t cicShift
 Sets the right shift value applied to CIC2 accumulator to form rawcounts when CIC2 is enabled. More...
 
uint8_t rowCicShift
 Sets the right shift value applied to CIC2 accumulator to form rawcounts when CIC2 is enabled. More...
 

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

Note
This field is available only for the fourth-generation CAPSENSE™.

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

For fourth-generation CAPSENSE™:

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

For fifth-generation and fifth-generation low power CAPSENSE™: bit[3] - Indicates auto mode of PRS clock source bit[2] - Indicates auto mode of SSC clock source

  • bit[0:1] - Clock source:
    • 0 - Direct (CY_CAPSENSE_CLK_SOURCE_DIRECT)
    • 1 - SSC (CY_CAPSENSE_CLK_SOURCE_SSC)
    • 2 - PRS (CY_CAPSENSE_CLK_SOURCE_PRS)

◆ idacMod

uint8_t cy_stc_capsense_widget_context_t::idacMod[CY_CAPSENSE_MAX_SUPPORTED_FREQ_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.

Note
This field is available only for the fourth-generation CAPSENSE™.

◆ idacGainIndex

uint8_t cy_stc_capsense_widget_context_t::idacGainIndex

Index of IDAC gain in table cy_stc_capsense_idac_gain_table_t.

Note
This field is available only for the fourth-generation CAPSENSE™.

◆ rowIdacMod

uint8_t cy_stc_capsense_widget_context_t::rowIdacMod[CY_CAPSENSE_MAX_SUPPORTED_FREQ_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.

Note
This field is available only for the fourth-generation CAPSENSE™.

◆ 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 Enable (CY_CAPSENSE_WD_ENABLE_MASK)
  • bit[2] - Widget Working (CY_CAPSENSE_WD_WORKING_MASK)
  • bit[3] - Widget maximum raw count calculation enabled (CY_CAPSENSE_WD_MAXCOUNT_CALC_MASK)
  • bit[4] - Widget row maximum raw count calculation enable (CY_CAPSENSE_WD_MAXCOUNT_ROW_CALC_MASK)

◆ numSubConversions

uint16_t cy_stc_capsense_widget_context_t::numSubConversions

Number of sub-conversions in a scan.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ cdacRef

uint8_t cy_stc_capsense_widget_context_t::cdacRef

Sets the capacitance of the reference CDAC.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ rowCdacRef

uint8_t cy_stc_capsense_widget_context_t::rowCdacRef

Sets the capacitance of the row reference CDAC for CSD Touchpad and CSD Matrix buttons widgets.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ cicRate

uint8_t cy_stc_capsense_widget_context_t::cicRate

Sets decimation rate when CIC2 is enabled.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ cdacDitherEn

uint8_t cy_stc_capsense_widget_context_t::cdacDitherEn

Enabled CDAC dithering.

Note
This field is available only for the fifth-generation CAPSENSE™.

◆ cdacDitherValue

uint8_t cy_stc_capsense_widget_context_t::cdacDitherValue

CDAC dither scale value in bits.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ coarseInitBypassEn

uint8_t cy_stc_capsense_widget_context_t::coarseInitBypassEn

Skip Cmod coarse initialization sensors scan within widget.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ cdacCompDivider

uint16_t cy_stc_capsense_widget_context_t::cdacCompDivider

Number of time DAC switched in sense clock period.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ lfsrBits

uint8_t cy_stc_capsense_widget_context_t::lfsrBits

Defines the number of LSB bits to use by the LSFR unit to achieve the desired clock dithering variation.

Note
This field is available for the fifth-generation CAPSENSE™ and fifth-generation low power CAPSENSE™.

◆ cicShift

uint8_t cy_stc_capsense_widget_context_t::cicShift

Sets the right shift value applied to CIC2 accumulator to form rawcounts when CIC2 is enabled.

Note
This field is available for the fifth-generation low power CAPSENSE™.

◆ rowCicShift

uint8_t cy_stc_capsense_widget_context_t::rowCicShift

Sets the right shift value applied to CIC2 accumulator to form rawcounts when CIC2 is enabled.

Note
This field is available for the fifth-generation low power CAPSENSE™.