CTSU V2 Framework.
More...
|
| 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) |
| |
CTSU V2 Framework.
◆ SF_TOUCH_CTSU_CallbackSet()
Updates the user callback and has option of providing memory for callback structure. Implements sf_touch_ctsu_api_t::callbackSet
- Return values
-
| SSP_SUCCESS | Callback updated successfully. |
| SSP_ERR_ASSERTION | A required pointer is NULL. |
| SSP_ERR_NOT_OPEN | The control block has not been opened. |
◆ SF_TOUCH_CTSU_Close()
Disables specified TOUCH control block. Implements sf_touch_ctsu_api_t::close.
- Return values
-
| SSP_SUCCESS | Successfully closed. |
| SSP_ERR_ASSERTION | p_ctrl or p_ctrl->p_api is NULL. |
| SSP_ERR_NOT_OPEN | Driver 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_SUCCESS | Successfully data decoded. |
| SSP_ERR_ASSERTION | Null pointer passed as a parameter. |
| SSP_ERR_NOT_OPEN | Module is not open. |
| SSP_ERR_CTSU_SCANNING | Scanning this instance. |
| SSP_ERR_CTSU_INCOMPLETE_TUNING | Incomplete initial offset tuning. |
◆ SF_TOUCH_CTSU_Open()
Opens and configures the TOUCH Middle module. Implements sf_touch_ctsu_api_t::open.
- Return values
-
| SSP_SUCCESS | Initialization was successful. |
| SSP_ERR_ASSERTION | One of the following parameters may be NULL: p_ctrl, p_api, or p_cfg. See HAL driver for other possible causes. |
| SSP_ERR_ALREADY_OPEN | Module is already open. This module can only be opened once. |
| SSP_ERR_INVALID_ARGUMENT | Configuration parameter error. |
Parameter Setting
◆ SF_TOUCH_CTSU_ScanStart()
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_SUCCESS | Successfully started. |
| SSP_ERR_ASSERTION | Null pointer passed as a parameter. |
| SSP_ERR_NOT_OPEN | Module is not open. |
| SSP_ERR_CTSU_SCANNING | Scanning this instance or other. |
| SSP_ERR_CTSU_NOT_GET_DATA | The previous data has not been retrieved by DataGet. |
◆ SF_TOUCH_CTSU_VersionGet()
Return TOUCH Middle module version. Implements sf_touch_ctsu_api_t::versionGet.
- Return values
-
| SSP_SUCCESS | Version returned successfully. |
| SSP_ERR_ASSERTION | Null pointer passed as a parameter |