RA Flexible Software Package Documentation
Release v5.6.0
|
|
Interface for Capacitive Touch Sensing Unit (CTSU) functions.
The CTSU interface provides CTSU functionality.
Data Structures | |
struct | ctsu_callback_args_t |
struct | ctsu_element_cfg_t |
struct | ctsu_cfg_t |
struct | ctsu_api_t |
struct | ctsu_instance_t |
Typedefs | |
typedef void | ctsu_ctrl_t |
Enumerations | |
enum | ctsu_event_t |
enum | ctsu_cap_t |
enum | ctsu_txvsel_t |
enum | ctsu_txvsel2_t |
enum | ctsu_atune1_t |
enum | ctsu_atune12_t |
enum | ctsu_md_t |
enum | ctsu_posel_t |
enum | ctsu_ssdiv_t |
enum | ctsu_specific_data_type_t |
struct ctsu_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
ctsu_event_t | event | The event can be used to identify what caused the callback. |
void const * | p_context | Placeholder for user data. Set in ctsu_api_t::open function in ctsu_cfg_t. |
struct ctsu_element_cfg_t |
CTSU Configuration parameters. Element Configuration
Data Fields | ||
---|---|---|
ctsu_ssdiv_t | ssdiv | CTSU Spectrum Diffusion Frequency Division Setting (CTSU Only) |
uint16_t | so | CTSU Sensor Offset Adjustment. |
uint8_t | snum | CTSU Measurement Count Setting. |
uint8_t | sdpa | CTSU Base Clock Setting. |
struct ctsu_cfg_t |
User configuration structure, used in open function
Data Fields | |
ctsu_cap_t | cap |
CTSU Scan Start Trigger Select. | |
ctsu_txvsel_t | txvsel |
CTSU Transmission Power Supply Select. | |
ctsu_txvsel2_t | txvsel2 |
CTSU Transmission Power Supply Select 2 (CTSU2 Only) | |
ctsu_atune1_t | atune1 |
CTSU Power Supply Capacity Adjustment (CTSU Only) | |
ctsu_atune12_t | atune12 |
CTSU Power Supply Capacity Adjustment (CTSU2 Only) | |
ctsu_md_t | md |
CTSU Measurement Mode Select. | |
ctsu_posel_t | posel |
CTSU Non-Measured Channel Output Select (CTSU2 Only) | |
uint8_t | ctsuchac0 |
TS00-TS07 enable mask. | |
uint8_t | ctsuchac1 |
TS08-TS15 enable mask. | |
uint8_t | ctsuchac2 |
TS16-TS23 enable mask. | |
uint8_t | ctsuchac3 |
TS24-TS31 enable mask. | |
uint8_t | ctsuchac4 |
TS32-TS39 enable mask. | |
uint8_t | ctsuchtrc0 |
TS00-TS07 mutual-tx mask. | |
uint8_t | ctsuchtrc1 |
TS08-TS15 mutual-tx mask. | |
uint8_t | ctsuchtrc2 |
TS16-TS23 mutual-tx mask. | |
uint8_t | ctsuchtrc3 |
TS24-TS31 mutual-tx mask. | |
uint8_t | ctsuchtrc4 |
TS32-TS39 mutual-tx mask. | |
ctsu_element_cfg_t const * | p_elements |
Pointer to elements configuration array. | |
uint8_t | num_rx |
Number of receive terminals. | |
uint8_t | num_tx |
Number of transmit terminals. | |
uint16_t | num_moving_average |
Number of moving average for measurement data. | |
bool | tunning_enable |
Initial offset tuning flag. | |
void(* | p_callback )(ctsu_callback_args_t *p_args) |
Callback provided when CTSUFN ISR occurs. | |
transfer_instance_t const * | p_transfer_tx |
DTC instance for transmit at CTSUWR. Set to NULL if unused. | |
transfer_instance_t const * | p_transfer_rx |
DTC instance for receive at CTSURD. Set to NULL if unused. | |
adc_instance_t const * | p_adc_instance |
ADC instance for temperature correction. | |
IRQn_Type | write_irq |
CTSU_CTSUWR interrupt vector. | |
IRQn_Type | read_irq |
CTSU_CTSURD interrupt vector. | |
IRQn_Type | end_irq |
CTSU_CTSUFN interrupt vector. | |
void const * | p_context |
User defined context passed into callback function. | |
void const * | p_extend |
Pointer to extended configuration by instance of interface. | |
uint16_t | tuning_self_target_value |
Target self value for initial offset tuning. | |
uint16_t | tuning_mutual_target_value |
Target mutual value for initial offset tuning. | |
uint8_t | majority_mode |
Software majority mode selection. | |
struct ctsu_api_t |
Functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(ctsu_ctrl_t *const p_ctrl, ctsu_cfg_t const *const p_cfg) |
fsp_err_t(* | scanStart )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* | dataGet )(ctsu_ctrl_t *const p_ctrl, uint16_t *p_data) |
fsp_err_t(* | scanStop )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* | diagnosis )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* | callbackSet )(ctsu_ctrl_t *const p_ctrl, void(*p_callback)(ctsu_callback_args_t *), void const *const p_context, ctsu_callback_args_t *const p_callback_memory) |
fsp_err_t(* | close )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* | specificDataGet )(ctsu_ctrl_t *const p_ctrl, uint16_t *p_specific_data, ctsu_specific_data_type_t specific_data_type) |
fsp_err_t(* | dataInsert )(ctsu_ctrl_t *const p_ctrl, uint16_t *p_insert_data) |
fsp_err_t(* | offsetTuning )(ctsu_ctrl_t *const p_ctrl) |
fsp_err_t(* ctsu_api_t::open) (ctsu_ctrl_t *const p_ctrl, ctsu_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(* ctsu_api_t::scanStart) (ctsu_ctrl_t *const p_ctrl) |
Scan start.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* ctsu_api_t::dataGet) (ctsu_ctrl_t *const p_ctrl, uint16_t *p_data) |
Data get.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_data | Pointer to get data array. |
fsp_err_t(* ctsu_api_t::scanStop) (ctsu_ctrl_t *const p_ctrl) |
ScanStop.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* ctsu_api_t::diagnosis) (ctsu_ctrl_t *const p_ctrl) |
Diagnosis.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* ctsu_api_t::callbackSet) (ctsu_ctrl_t *const p_ctrl, void(*p_callback)(ctsu_callback_args_t *), void const *const p_context, ctsu_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(* ctsu_api_t::close) (ctsu_ctrl_t *const p_ctrl) |
Close driver.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* ctsu_api_t::specificDataGet) (ctsu_ctrl_t *const p_ctrl, uint16_t *p_specific_data, ctsu_specific_data_type_t specific_data_type) |
Specific Data get.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_specific_data | Pointer to get specific data array. |
[in] | specific_data_type | Specific data type |
fsp_err_t(* ctsu_api_t::dataInsert) (ctsu_ctrl_t *const p_ctrl, uint16_t *p_insert_data) |
Data Insert.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_insert_data | Pointer to insert data. |
fsp_err_t(* ctsu_api_t::offsetTuning) (ctsu_ctrl_t *const p_ctrl) |
Adjust the offset value to tune the sensor.
[in] | p_ctrl | Pointer to control structure. |
struct ctsu_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
ctsu_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
ctsu_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
ctsu_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void ctsu_ctrl_t |
CTSU Control block. Allocate an instance specific control block to pass into the API calls.
enum ctsu_event_t |
enum ctsu_cap_t |
enum ctsu_txvsel_t |
enum ctsu_txvsel2_t |
enum ctsu_atune1_t |
enum ctsu_atune12_t |
enum ctsu_md_t |
CTSU Measurement Mode Select
enum ctsu_posel_t |
enum ctsu_ssdiv_t |
CTSU Spectrum Diffusion Frequency Division Setting (CTSU Only)
CTSU select data type for slect data get