EasyManua.ls Logo

Espressif ESP32-S2 - Page 413

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Parameters
touch_num: touch pad index
esp_err_t touch_pad_reset(void)
Reset the FSM of touch module.
Note Call this function after touch_pad_fsm_stop.
Return
ESP_OK Success
touch_pad_t touch_pad_get_current_meas_channel(void)
Get the current measure channel.
Note Should be called when touch sensor measurement is in cyclic scan mode.
Return
touch channel number
uint32_t touch_pad_read_intr_status_mask(void)
Get the touch sensor interrupt status mask.
Return
touch interrupt bit
esp_err_t touch_pad_intr_enable(touch_pad_intr_mask_t int_mask)
Enable touch sensor interrupt by bitmask.
Note This API can be called in ISR handler.
Return
ESP_OK on success
Parameters
int_mask: Pad mask to enable interrupts
esp_err_t touch_pad_intr_disable(touch_pad_intr_mask_t int_mask)
Disable touch sensor interrupt by bitmask.
Note This API can be called in ISR handler.
Return
ESP_OK on success
Parameters
int_mask: Pad mask to disable interrupts
esp_err_t touch_pad_intr_clear(touch_pad_intr_mask_t int_mask)
Clear touch sensor interrupt by bitmask.
Return
ESP_OK on success
Parameters
int_mask: Pad mask to clear interrupts
esp_err_t touch_pad_isr_register(intr_handler_t fn, void *arg, touch_pad_intr_mask_t intr_mask)
Register touch-pad ISR. The handler will be attached to the same CPU core that this function is running on.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG Arguments error
ESP_ERR_NO_MEM No memory
Parameters
fn: Pointer to ISR handler
arg: Parameter for ISR
intr_mask: Enable touch sensor interrupt handler by bitmask.
esp_err_t touch_pad_timeout_set(bool enable, uint32_t threshold)
Enable/disable the timeout check and set timeout threshold for all touch sensor channels measurements. If
enable: When the touch reading of a touch channel exceeds the measurement threshold, a timeout interrupt
will be generated. If disable: the FSM does not check if the channel under measurement times out.
Espressif Systems 402
Submit Document Feedback
Release v4.4

Table of Contents