RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for Touch Middleware functions.
The TOUCH interface provides TOUCH functionality.
Data Structures | |
struct | touch_button_cfg_t |
struct | touch_slider_cfg_t |
struct | touch_wheel_cfg_t |
struct | touch_pad_cfg_t |
struct | touch_cfg_t |
struct | touch_sensitivity_info_t |
struct | touch_api_t |
struct | touch_instance_t |
Macros | |
#define | TOUCH_COUNT_MAX |
Value of Maximum count. | |
#define | TOUCH_OFF_VALUE |
Value of Non-touch. | |
Typedefs | |
typedef void | touch_ctrl_t |
typedef struct st_ctsu_callback_args | touch_callback_args_t |
struct touch_button_cfg_t |
struct touch_slider_cfg_t |
struct touch_wheel_cfg_t |
struct touch_pad_cfg_t |
Configuration of each pads
struct touch_cfg_t |
User configuration structure, used in open function
Data Fields | ||
---|---|---|
touch_button_cfg_t const * | p_buttons | Pointer to array of button configuration. |
touch_slider_cfg_t const * | p_sliders | Pointer to array of slider configuration. |
touch_wheel_cfg_t const * | p_wheels | Pointer to array of wheel configuration. |
touch_pad_cfg_t const * | p_pad | Pointer of pad configuration. |
uint8_t | num_buttons | Number of buttons. |
uint8_t | num_sliders | Number of sliders. |
uint8_t | num_wheels | Number of wheels. |
uint8_t | on_freq | The cumulative number of determinations of ON. |
uint8_t | off_freq | The cumulative number of determinations of OFF. |
uint16_t | drift_freq | Base value drift frequency. [0 : no use]. |
uint16_t | cancel_freq | Maximum continuous ON. [0 : no use]. |
uint8_t | number | Configuration number for QE monitor. |
ctsu_instance_t const * | p_ctsu_instance | Pointer to CTSU instance. |
uart_instance_t const * | p_uart_instance | Pointer to UART instance. |
void const * | p_context | User defined context passed into callback function. |
void const * | p_extend | Pointer to extended configuration by instance of interface. |
struct touch_sensitivity_info_t |
struct touch_api_t |
Functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(touch_ctrl_t *const p_ctrl, touch_cfg_t const *const p_cfg) |
fsp_err_t(* | scanStart )(touch_ctrl_t *const p_ctrl) |
fsp_err_t(* | dataGet )(touch_ctrl_t *const p_ctrl, uint64_t *p_button_status, uint16_t *p_slider_position, uint16_t *p_wheel_position) |
fsp_err_t(* | scanStop )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* | padDataGet )(touch_ctrl_t *const p_ctrl, uint16_t *p_pad_rx_coordinate, uint16_t *p_pad_tx_coordinate, uint8_t *p_pad_num_touch) |
fsp_err_t(* | callbackSet )(touch_ctrl_t *const p_ctrl, void(*p_callback)(touch_callback_args_t *), void const *const p_context, touch_callback_args_t *const p_callback_memory) |
fsp_err_t(* | close )(touch_ctrl_t *const p_ctrl) |
fsp_err_t(* | sensitivityRatioGet )(touch_ctrl_t *const p_ctrl, touch_sensitivity_info_t *p_touch_sensitivity_info) |
fsp_err_t(* | thresholdAdjust )(touch_ctrl_t *const p_ctrl, touch_sensitivity_info_t *p_touch_sensitivity_info) |
fsp_err_t(* | driftControl )(touch_ctrl_t *const p_ctrl, uint16_t input_drift_freq) |
fsp_err_t(* touch_api_t::open) (touch_ctrl_t *const p_ctrl, touch_cfg_t const *const p_cfg) |
Open driver.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* touch_api_t::scanStart) (touch_ctrl_t *const p_ctrl) |
Scan start.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* touch_api_t::dataGet) (touch_ctrl_t *const p_ctrl, uint64_t *p_button_status, uint16_t *p_slider_position, uint16_t *p_wheel_position) |
Data get.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_button_status | Pointer to get data bitmap. |
[out] | p_slider_position | Pointer to get data array. |
[out] | p_wheel_position | Pointer to get data array. |
fsp_err_t(* touch_api_t::scanStop) (ctsu_ctrl_t *const p_ctrl) |
ScanStop.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* touch_api_t::padDataGet) (touch_ctrl_t *const p_ctrl, uint16_t *p_pad_rx_coordinate, uint16_t *p_pad_tx_coordinate, uint8_t *p_pad_num_touch) |
pad data get.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_pad_rx_coordinate | Pointer to get coordinate of receiver side. |
[out] | p_pad_tx_coordinate | Pointer to get coordinate of transmitter side. |
[out] | p_pad_num_touch | Pointer to get touch count. |
fsp_err_t(* touch_api_t::callbackSet) (touch_ctrl_t *const p_ctrl, void(*p_callback)(touch_callback_args_t *), void const *const p_context, touch_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Pointer to the CTSU control block. |
[in] | p_callback | Callback function |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* touch_api_t::close) (touch_ctrl_t *const p_ctrl) |
Close driver.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* touch_api_t::sensitivityRatioGet) (touch_ctrl_t *const p_ctrl, touch_sensitivity_info_t *p_touch_sensitivity_info) |
Sensitivity ratio get.
[in] | p_ctrl | Pointer to control structure. |
[in,out] | p_touch_sensitivity_info | Pointer to touch sensitivity structure. |
fsp_err_t(* touch_api_t::thresholdAdjust) (touch_ctrl_t *const p_ctrl, touch_sensitivity_info_t *p_touch_sensitivity_info) |
Threshold adjust.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_touch_sensitivity_info | Pointer to touch sensitivity structure. |
fsp_err_t(* touch_api_t::driftControl) (touch_ctrl_t *const p_ctrl, uint16_t input_drift_freq) |
Drift control.
[in] | p_ctrl | Pointer to control structure. |
[in] | input_drift_freq | Drift frequency value. |
struct touch_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
touch_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
touch_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
touch_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void touch_ctrl_t |
Control block. Allocate an instance specific control block to pass into the API calls.
typedef struct st_ctsu_callback_args touch_callback_args_t |
Callback function parameter data