CapSense Structures¶
-
group
group_capsense_structures
The CapSense structures.
Typedefs
-
typedef uint32_t
cy_capsense_status_t
¶ Unified return status of CapSense operation:
CY_CAPSENSE_STATUS_SUCCESS
CY_CAPSENSE_STATUS_BAD_PARAM
CY_CAPSENSE_STATUS_BAD_DATA
CY_CAPSENSE_STATUS_TIMEOUT
CY_CAPSENSE_STATUS_INVALID_STATE
CY_CAPSENSE_STATUS_BAD_CONFIG
CY_CAPSENSE_STATUS_CONFIG_OVERFLOW
CY_CAPSENSE_STATUS_HW_BUSY
CY_CAPSENSE_STATUS_UNKNOWN
-
typedef uint32_t
cy_capsense_mw_state_t
¶ Unified return state of CapSense Middleware:
CY_CAPSENSE_MW_STATE_READY - No scan is in progress and a next scan frame can be initiated.
CY_CAPSENSE_MW_STATE_INITIALIZATION_MASK - Middleware initialization is in progress and a next scan frame can be initiated.
CY_CAPSENSE_MW_STATE_SCAN_CHANNEL_MASK[x] - The set [x] bit of the result means that the previously initiated scan for the [x] channel is in progress. The next scan frame cannot be started.
CY_CAPSENSE_MW_STATE_CALIBRATION_MASK - The auto-calibration is in progress. The next scan frame cannot be started.
CY_CAPSENSE_MW_STATE_VERIFY_CALIBRATION_MASK - The auto-calibration verification is in progress. The next scan frame cannot be started.
CY_CAPSENSE_MW_STATE_BIST_MASK - BIST in progress - widget CRC test.
CY_CAPSENSE_MW_STATE_SCAN_SLOT_MASK[x] - The set [x] bit of the result means that the previously initiated scan for the [x] slot is in progress. The next scan frame cannot be started.
-
typedef void (*
cy_capsense_callback_t
)(cy_stc_active_scan_sns_t *ptrActiveScan)¶ Provides the typedef for the callback function that is intended to be called when the cy_en_capsense_callback_event_t events occurs.
-
typedef void (*
cy_capsense_ds_init_callback_t
)(void *context)¶ Provides the typedef for the callback function that is called by the Cy_CapSense_Enable() function to change the CapSense configuration from the default configuration to the user’s specific use cases.
Refer to Callbacks section.
note
This callback function is available only for the fifth-generation CapSense.
-
typedef void (*
cy_capsense_tuner_send_callback_t
)(void *context)¶ Provides the typedef for the callback function that is called by the Cy_CapSense_RunTuner() function to establish communication with the CapSense Tuner tool to monitor CapSense operation.
Refer to Callbacks section.
-
typedef void (*
cy_capsense_tuner_receive_callback_t
)(uint8_t **commandPacket, uint8_t **tunerPacket, void *context)¶ Provides the typedef for the callback function that is called by the Cy_CapSense_RunTuner() function to establish communication with the CapSense Tuner tool to support life-time tunning.
Refer to Callbacks section.
-
typedef void (*
cy_func_capsense_csd_setup_widget_ptr_t
)(uint32_t widgetId, cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSDSetupWidget() function.
-
typedef void (*
cy_func_capsense_csd_scan_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSDScan() function.
-
typedef uint32_t (*
cy_func_capsense_dp_process_csd_widget_raw_counts_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsdWidgetRawCounts() function.
-
typedef void (*
cy_func_capsense_dp_process_csd_widget_status_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsdWidgetStatus() function.
-
typedef void (*
cy_func_capsense_csd_disable_mode_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSDDisableMode() function.
-
typedef void (*
cy_func_capsense_csd_initialize_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSDInitialize() function.
-
typedef void (*
cy_func_capsense_csd_scan_isr_ptr_t
)(void *capsenseContext)¶ The type of a pointer to the Cy_CapSense_CSDScanISR() function.
-
typedef void (*
cy_func_capsense_csx_setup_widget_ptr_t
)(uint32_t widgetId, cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSXSetupWidget() function.
-
typedef void (*
cy_func_capsense_csx_scan_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSXScan() function.
-
typedef uint32_t (*
cy_capsense_dp_process_csx_widget_raw_counts_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsxWidgetRawCounts() function.
-
typedef void (*
cy_func_capsense_dp_process_csx_widget_status_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsxWidgetStatus() function.
-
typedef void (*
cy_func_capsense_csx_initialize_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSXInitialize() function.
-
typedef void (*
cy_func_capsense_csx_disablemode_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSXDisableMode() function.
-
typedef void (*
cy_func_capsense_csx_scan_isr_ptr_t
)(void *capsenseContext)¶ The type of a pointer to the Cy_CapSense_CSXScanISR() function.
-
typedef void (*
cy_func_capsense_adaptive_filter_initialize_lib_ptr_t
)(const cy_stc_capsense_adaptive_filter_config_t *config, cy_stc_capsense_position_t *context)¶ The type of a pointer to the Cy_CapSense_AdaptiveFilterInitialize_Lib() function.
-
typedef void (*
cy_func_capsense_adaptive_filter_run_lib_ptr_t
)(const cy_stc_capsense_adaptive_filter_config_t *config, cy_stc_capsense_position_t *context, uint32_t *currentX, uint32_t *currentY)¶ The type of a pointer to the Cy_CapSense_AdaptiveFilterRun_Lib() function.
-
typedef void (*
cy_func_capsense_ballistic_multiplier_lib_ptr_t
)(const cy_stc_capsense_ballistic_config_t *config, const cy_stc_capsense_touch_t *touch, cy_stc_capsense_ballistic_delta_t *delta, uint32_t timestamp, cy_stc_capsense_ballistic_context_t *context)¶ The type of a pointer to the Cy_CapSense_BallisticMultiplier_Lib() function.
-
typedef void (*
cy_func_capsense_initialize_all_filters_ptr_t
)(const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_InitializeAllFilters() function.
-
typedef void (*
cy_func_capsense_ft_run_enabled_filters_internal_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, cy_stc_capsense_sensor_context_t *ptrSnsContext, uint16_t *ptrSnsRawHistory, uint8_t *ptrSnsRawHistoryLow)¶ The type of a pointer to the Cy_CapSense_FtRunEnabledFiltersInternal() function.
-
typedef void (*
cy_func_capsense_process_position_filters_ptr_t
)(cy_stc_capsense_touch_t *newTouch, const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_ProcessPositionFilters() function.
-
typedef void (*
cy_func_capsense_run_position_filters_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, cy_stc_capsense_position_t *ptrInput, cy_stc_capsense_position_t *ptrHistory, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_RunPositionFilters() function.
-
typedef void (*
cy_func_capsense_init_position_filters_ptr_t
)(uint32_t filterConfig, const cy_stc_capsense_position_t *ptrInput, cy_stc_capsense_position_t *ptrHistory)¶ The type of a pointer to the Cy_CapSense_InitPositionFilters() function.
The type of a pointer to the Cy_CapSense_DpProcessButton() function.
-
typedef void (*
cy_func_capsense_dp_process_slider_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessSlider() function.
-
typedef void (*
cy_func_capsense_dp_process_csd_matrix_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsdMatrix() function.
-
typedef void (*
cy_func_capsense_dp_process_csd_touchpad_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsdTouchpad() function.
-
typedef void (*
cy_func_capsense_dp_advanced_centroid_touchpad_ptr_t
)(cy_stc_capsense_touch_t *newTouch, const cy_stc_capsense_widget_config_t *ptrWdConfig)¶ The type of a pointer to the Cy_CapSense_DpAdvancedCentroidTouchpad() function.
-
typedef void (*
cy_func_capsense_dp_process_proximity_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig)¶ The type of a pointer to the Cy_CapSense_DpProcessProximity() function.
-
typedef void (*
cy_func_capsense_dp_process_csx_touchpad_ptr_t
)(const cy_stc_capsense_widget_config_t *ptrWdConfig, const cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_DpProcessCsxTouchpad() function.
-
typedef cy_capsense_status_t (*
cy_func_capsense_calibrate_all_csd_widgets_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CalibrateAllCsdWidgets() function.
-
typedef cy_capsense_status_t (*
cy_func_capsense_csd_calibrate_widget_ptr_t
)(uint32_t widgetId, uint32_t target, cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CSDCalibrateWidget() function.
-
typedef cy_capsense_status_t (*
cy_func_capsense_calibrate_all_csx_widgets_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_CalibrateAllCsxWidgets() function.
-
typedef cy_capsense_status_t (*
cy_func_capsense_ss_auto_tune_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_SsAutoTune() function.
-
typedef void (*
cy_func_capsense_run_noise_envelope_lib_ptr_t
)(uint16_t rawCount, uint16_t sigPFC, cy_stc_capsense_smartsense_csd_noise_envelope_t *ptrNoiseEnvelope)¶ The type of a pointer to the Cy_CapSense_RunNoiseEnvelope_Lib() function.
-
typedef void (*
cy_func_capsense_dp_update_thresholds_ptr_t
)(cy_stc_capsense_widget_context_t *ptrWdContext, const cy_stc_capsense_smartsense_csd_noise_envelope_t *ptrNoiseEnvelope, uint32_t startFlag)¶ The type of a pointer to the Cy_CapSense_DpUpdateThresholds() function.
-
typedef void (*
cy_func_capsense_initialize_noise_envelope_lib_ptr_t
)(uint16_t rawCount, uint16_t sigPFC, cy_stc_capsense_smartsense_csd_noise_envelope_t *ptrNoiseEnvelope)¶ The type of a pointer to the Cy_CapSense_InitializeNoiseEnvelope_Lib() function.
-
typedef void (*
cy_func_capsense_bist_initialize_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_BistInitialize() function.
-
typedef void (*
cy_func_capsense_bist_disable_mode_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_BistDisableMode() function.
-
typedef void (*
cy_func_capsense_bist_ds_initialize_ptr_t
)(cy_stc_capsense_context_t *context)¶ The type of a pointer to the Cy_CapSense_BistDsInitialize() function.
-
struct
cy_stc_capsense_adaptive_filter_config_t
¶ - #include <>
Declares Adaptive Filter configuration parameters.
-
struct
cy_stc_capsense_advanced_centroid_config_t
¶ - #include <>
Declares Advanced Centroid configuration parameters.
-
struct
cy_stc_capsense_position_t
¶ - #include <>
Declares position structure that keep information of a single touch.
Depending on a widget type each structure field keeps the following information:
Structure Field
Slider
Matrix Buttons
CSD Touchpad
CSX Touchpad
x
X-axis position
Active Column
X-axis position
X-axis position
y
Reserved
Active Row
Y-axis position
Y-axis position
z
Reserved
Reserved
Reserved
MSB = Age of touch; LSB = Z-value
id
Reserved
Logical number of button
Reserved
MSB = Debounce; LSB = touch ID
-
struct
cy_stc_capsense_touch_t
¶ - #include <>
Declares touch structure used to store positions of Touchpad, Matrix buttons and Slider widgets.
-
struct
cy_stc_capsense_auto_tune_config_t
¶ - #include <>
Declares HW SmartSense data structure for CSD widgets for fourth-generation CapSense.
-
struct
cy_stc_capsense_hw_smartsense_config_t
¶ - #include <>
Declares HW SmartSense data structure for CSD widgets for fifth-generation CapSense.
-
struct
cy_stc_capsense_smartsense_csd_noise_envelope_t
¶ - #include <>
Declares Noise envelope data structure for CSD widgets when SmartSense is enabled.
-
struct
cy_stc_capsense_smartsense_update_thresholds_t
¶ - #include <>
Declares Update Thresholds structure.
-
struct
cy_stc_capsense_ballistic_config_t
¶ - #include <>
Declares Ballistics Multiplier Configuration data structure.
-
struct
cy_stc_capsense_ballistic_context_t
¶ - #include <>
Declares Ballistics Multiplier Configuration data structure.
-
struct
cy_stc_capsense_ballistic_delta_t
¶ - #include <>
Declares Ballistic Displacement structure.
-
struct
cy_stc_capsense_sensor_context_t
¶ - #include <>
Sensor context structure.
-
struct
cy_stc_capsense_csx_touch_history_t
¶ - #include <>
CSX Touchpad touch tracking history.
-
struct
cy_stc_capsense_csx_touch_buffer_t
¶ - #include <>
Internal CSX Touchpad buffer structure for CSX for Touchpads’ processing.
-
struct
cy_stc_capsense_widget_context_t
¶ - #include <>
Widget context structure.
-
struct
cy_stc_capsense_pin_config_t
¶ - #include <>
Legacy mode pin configuration structure.
-
struct
cy_stc_capsense_electrode_config_t
¶ - #include <>
Electrode objects configuration structure.
-
struct
cy_stc_capsense_advanced_touchpad_config_t
¶ - #include <>
Configuration structure of advanced touchpad.
-
struct
cy_stc_capsense_mptx_table_t
¶ - #include <>
Multi-phase TX table for de-convolution structure.
note
This structure is available only for the fifth-generation CapSense.
-
struct
cy_stc_capsense_widget_config_t
¶ - #include <>
Widget configuration structure.
-
struct
cy_stc_capsense_idac_gain_table_t
¶ - #include <>
Declares the IDAC gain table.
note
This structure is available only for the fourth-generation CapSense.
-
struct
cy_stc_capsense_scan_slot_t
¶ - #include <>
Declares the scan order of widget and sensor.
note
This structure is available only for the fifth-generation CapSense.
-
struct
cy_stc_msc_channel_config_t
¶ - #include <>
Declares MSC channel (HW block) configuration.
note
This structure is available only for the fifth-generation CapSense.
-
struct
cy_stc_capsense_common_config_t
¶ - #include <>
Common configuration structure.
-
struct
cy_stc_capsense_bist_context_t
¶ - #include <>
Declares BIST Context Data Structure.
note
This structure is available only for the fourth-generation CapSense.
-
struct
cy_stc_capsense_bist_custom_parameters_t
¶ - #include <>
Declares the BIST structure with custom scan parameters.
note
This structure is available only for the fourth-generation CapSense.
-
struct
cy_stc_active_scan_sns_t
¶ - #include <>
Declares active sensor details.
note
This structure is available only for the fourth-generation CapSense.
-
struct
cy_stc_capsense_internal_context_t
¶ - #include <>
Declares internal Context Data Structure.
-
struct
cy_stc_capsense_widget_crc_data_t
¶ - #include <>
Declares the structure that is intended to store the cy_stc_capsense_widget_context_t data structure fields, the CRC checking should be applied for.
note
This structure is available only for the fourth-generation CapSense.
-
struct
cy_stc_capsense_common_context_t
¶ - #include <>
Declares top-level Context Data Structure.
-
struct
cy_stc_capsense_context_t
¶ - #include <>
Declares top-level CapSense context data structure.
-
struct
cy_stc_capsense_fptr_config_t
¶ - #include <>
Function pointers configuration structure.
-
typedef uint32_t