Synergy Software Package User's Manual

CTSU V2 Framework. More...

Data Structures

struct  sf_touch_ctsu_button_info_t
 
struct  sf_touch_ctsu_slider_info_t
 
struct  sf_touch_ctsu_wheel_info_t
 
struct  sf_touch_ctsu_instance_ctrl_t
 

Functions

ssp_err_t SF_TOUCH_CTSU_Open (sf_touch_ctsu_ctrl_t *const p_ctrl, sf_touch_ctsu_cfg_t const *const p_cfg)
 Opens and configures the TOUCH Middle module. Implements sf_touch_ctsu_api_t::open. More...
 
ssp_err_t SF_TOUCH_CTSU_ScanStart (sf_touch_ctsu_ctrl_t *const p_ctrl)
 This function should be called each time a periodic timer expires. If initial offset tuning is enabled, The first several calls are used to tuning for the sensors. Before starting the next scan, first get the data with SF_TOUCH_CTSU_DataGet(). If a different control block scan should be run, check the scan is complete before executing. Implements sf_touch_ctsu_api_t::scanStart. More...
 
ssp_err_t SF_TOUCH_CTSU_DataGet (sf_touch_ctsu_ctrl_t *const p_ctrl, uint64_t *p_button_status, uint16_t *p_slider_position, uint16_t *p_wheel_position)
 Gets the 64-bit mask indicating which buttons are pressed. Also, this function gets the current position of where slider or wheel is being pressed. If initial offset tuning is enabled, The first several calls are used to tuning for the sensors. Implements sf_touch_ctsu_api_t::dataGet. More...
 
ssp_err_t SF_TOUCH_CTSU_CallbackSet (sf_touch_ctsu_ctrl_t *const p_api_ctrl, void(*p_callback)(sf_touch_ctsu_callback_args_t *), void const *const p_context, sf_touch_ctsu_callback_args_t *const p_callback_memory)
 
ssp_err_t SF_TOUCH_CTSU_Close (sf_touch_ctsu_ctrl_t *const p_ctrl)
 Disables specified TOUCH control block. Implements sf_touch_ctsu_api_t::close. More...
 
ssp_err_t SF_TOUCH_CTSU_VersionGet (ssp_version_t *const p_version)
 

Detailed Description

CTSU V2 Framework.

Function Documentation

◆ SF_TOUCH_CTSU_CallbackSet()

ssp_err_t SF_TOUCH_CTSU_CallbackSet ( sf_touch_ctsu_ctrl_t *const  p_api_ctrl,
void(*)(sf_touch_ctsu_callback_args_t *)  p_callback,
void const *const  p_context,
sf_touch_ctsu_callback_args_t *const  p_callback_memory 
)

Updates the user callback and has option of providing memory for callback structure. Implements sf_touch_ctsu_api_t::callbackSet

Return values
SSP_SUCCESSCallback updated successfully.
SSP_ERR_ASSERTIONA required pointer is NULL.
SSP_ERR_NOT_OPENThe control block has not been opened.

◆ SF_TOUCH_CTSU_Close()

ssp_err_t SF_TOUCH_CTSU_Close ( sf_touch_ctsu_ctrl_t *const  p_ctrl)

Disables specified TOUCH control block. Implements sf_touch_ctsu_api_t::close.

Return values
SSP_SUCCESSSuccessfully closed.
SSP_ERR_ASSERTIONp_ctrl or p_ctrl->p_api is NULL.
SSP_ERR_NOT_OPENDriver control block not valid. Call SF_TOUCH_CTSU_Open to configure.

◆ SF_TOUCH_CTSU_DataGet()

ssp_err_t SF_TOUCH_CTSU_DataGet ( sf_touch_ctsu_ctrl_t *const  p_ctrl,
uint64_t *  p_button_status,
uint16_t *  p_slider_position,
uint16_t *  p_wheel_position 
)

Gets the 64-bit mask indicating which buttons are pressed. Also, this function gets the current position of where slider or wheel is being pressed. If initial offset tuning is enabled, The first several calls are used to tuning for the sensors. Implements sf_touch_ctsu_api_t::dataGet.

Return values
SSP_SUCCESSSuccessfully data decoded.
SSP_ERR_ASSERTIONNull pointer passed as a parameter.
SSP_ERR_NOT_OPENModule is not open.
SSP_ERR_CTSU_SCANNINGScanning this instance.
SSP_ERR_CTSU_INCOMPLETE_TUNINGIncomplete initial offset tuning.

◆ SF_TOUCH_CTSU_Open()

ssp_err_t SF_TOUCH_CTSU_Open ( sf_touch_ctsu_ctrl_t *const  p_ctrl,
sf_touch_ctsu_cfg_t const *const  p_cfg 
)

Opens and configures the TOUCH Middle module. Implements sf_touch_ctsu_api_t::open.

Return values
SSP_SUCCESSInitialization was successful.
SSP_ERR_ASSERTIONOne of the following parameters may be NULL: p_ctrl, p_api, or p_cfg. See HAL driver for other possible causes.
SSP_ERR_ALREADY_OPENModule is already open. This module can only be opened once.
SSP_ERR_INVALID_ARGUMENTConfiguration parameter error.

Parameter Setting

◆ SF_TOUCH_CTSU_ScanStart()

ssp_err_t SF_TOUCH_CTSU_ScanStart ( sf_touch_ctsu_ctrl_t *const  p_ctrl)

This function should be called each time a periodic timer expires. If initial offset tuning is enabled, The first several calls are used to tuning for the sensors. Before starting the next scan, first get the data with SF_TOUCH_CTSU_DataGet(). If a different control block scan should be run, check the scan is complete before executing. Implements sf_touch_ctsu_api_t::scanStart.

Return values
SSP_SUCCESSSuccessfully started.
SSP_ERR_ASSERTIONNull pointer passed as a parameter.
SSP_ERR_NOT_OPENModule is not open.
SSP_ERR_CTSU_SCANNINGScanning this instance or other.
SSP_ERR_CTSU_NOT_GET_DATAThe previous data has not been retrieved by DataGet.

◆ SF_TOUCH_CTSU_VersionGet()

ssp_err_t SF_TOUCH_CTSU_VersionGet ( ssp_version_t *const  p_version)

Return TOUCH Middle module version. Implements sf_touch_ctsu_api_t::versionGet.

Return values
SSP_SUCCESSVersion returned successfully.
SSP_ERR_ASSERTIONNull pointer passed as a parameter