EasyManuals Logo

Espressif ESP32-S2 User Manual

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
Page #441 background imageLoading...
Page #441 background image
Chapter 2. API Reference
Note Guard-Sensor: This function is optional. If used, the user must connect the guard channel and Guard-
Ring in PCB. Any channels user wants to protect should be added into Guard-Ring in PCB.
Return
ESP_OK: Successfully initialized
ESP_ERR_INVALID_STATE: Touch element library is not initialized
ESP_ERR_INVALID_ARG: waterproof_config is null or invalid Guard-Sensor channel
ESP_ERR_NO_MEM: Insufficient memory
Parameters
[in] waterproof_config: Waterproof configuration
void touch_element_waterproof_uninstall(void)
Release resources allocated using touch_element_waterproof_install()
esp_err_t touch_element_waterproof_add(touch_elem_handle_t element_handle)
Add a masked handle to protect while Guard-Sensor has been triggered.
This function will add an application handle (button, slider, etc) as a masked handle. While Guard-Sensor
has been triggered, waterproof function will start working and lock the application internal state. While the
influence of water is reduced, the application will be unlock and reset into IDLE state.
Note The waterproof protection logic must follow the real circuit in PCB, it means that all of the channels
inside the input handle must be inside the Guard-Ring in real circuit.
Return
ESP_OK: Successfully added a masked handle
ESP_ERR_INVALID_STATE: Waterproof is not initialized
ESP_ERR_INVALID_ARG: element_handle is null
Parameters
[in] element_handle: Touch element instance handle
esp_err_t touch_element_waterproof_remove(touch_elem_handle_t element_handle)
Remove a masked handle to protect.
This function will remove an application handle from masked handle table.
Return
ESP_OK: Successfully removed a masked handle
ESP_ERR_INVALID_STATE: Waterproof is not initialized
ESP_ERR_INVALID_ARG: element_handle is null
ESP_ERR_NOT_FOUND: Failed to search element_handle from waterproof mask_handle list
Parameters
[in] element_handle: Touch element instance handle
Structures
struct touch_elem_sw_config_t
Touch element software configuration.
Public Members
float waterproof_threshold_divider
Waterproof guard channel threshold divider.
uint8_t processing_period
Processing period(ms)
uint8_t intr_message_size
Interrupt message queue size.
uint8_t event_message_size
Event message queue size.
struct touch_elem_hw_config_t
Touch element hardware configuration.
Espressif Systems 430
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish