Espressif ESP32-S2 Programming Manual page 448

Table of Contents

Advertisement

Chapter 2. API Reference
• ESP_OK: Successfully subscribed touch slider event
• ESP_ERR_INVALID_STATE: Touch slider driver was not initialized
• ESP_ERR_INVALID_ARG: slider_handle is null or event is not supported
Parameters
• [in] slider_handle: Slider handle
• [in] event_mask: Slider subscription event mask
• [in] arg: User input argument
esp_err_t touch_slider_set_dispatch_method(touch_slider_handle_t
Touch slider set dispatch method.
This function sets a dispatch method that the driver core will use this method as the event notification method.
Return
• ESP_OK: Successfully set dispatch method
• ESP_ERR_INVALID_STATE: Touch slider driver was not initialized
• ESP_ERR_INVALID_ARG: slider_handle is null or dispatch_method is invalid
Parameters
• [in] slider_handle: Slider handle
• [in] dispatch_method: Dispatch method (By callback/event)
esp_err_t touch_slider_set_callback(touch_slider_handle_t
Touch slider set callback.
This function sets a callback routine into touch element driver core, when the subscribed events occur, the
callback routine will be called.
Note Slider message will be passed from the callback function and it will be destroyed when the callback
function return.
Warning Since this input callback routine runs on driver core (esp-timer callback routine), it should not do
something that attempts to Block, such as calling vTaskDelay().
Return
• ESP_OK: Successfully set callback
• ESP_ERR_INVALID_STATE: Touch slider driver was not initialized
• ESP_ERR_INVALID_ARG: slider_handle or slider_callback is null
Parameters
• [in] slider_handle: Slider handle
• [in] slider_callback: User input callback
const
touch_slider_message_t
Touch slider get message.
This function decodes the element message from touch_element_message_receive() and return a slider message
pointer.
Return Touch slider message pointer
Parameters
• [in] element_message: element message
Structures
struct touch_slider_global_config_t
Slider initialization configuration passed to touch_slider_install.
Public Members
float quantify_lower_threshold
Slider signal quantification threshold.
Espressif Systems
touch_slider_callback_t
*touch_slider_get_message(const
437
Submit Document Feedback
touch_elem_dispatch_t
dispatch_method)
slider_callback)
touch_elem_message_t
*element_message)
slider_handle,
slider_handle,
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF