Espressif ESP32-S2 Programming Manual page 452

Table of Contents

Advertisement

Chapter 2. API Reference
Return
• ESP_OK: Successfully set the time of long press event
• ESP_ERR_INVALID_STATE: Touch matrix driver was not initialized
• ESP_ERR_INVALID_ARG: matrix_handle is null or time (ms) is 0
Parameters
• [in] matrix_handle: Matrix button handle
• [in] threshold_time: Threshold time (ms) of long press event occur
const
touch_matrix_message_t
Touch matrix get message.
This function decodes the element message from touch_element_message_receive() and return a matrix mes-
sage pointer.
Return Touch matrix message pointer
Parameters
• [in] element_message: element message
Structures
struct touch_matrix_global_config_t
Matrix button initialization configuration passed to touch_matrix_install.
Public Members
float threshold_divider
Matrix button channel threshold divider.
uint32_t default_lp_time
Matrix button default LongPress event time (ms)
struct touch_matrix_config_t
Matrix button configuration (for new instance) passed to touch_matrix_create()
Public Members
const
touch_pad_t
Matrix button x-axis channels array.
const
touch_pad_t
Matrix button y-axis channels array.
const float *x_sensitivity_array
Matrix button x-axis channels sensitivity array.
const float *y_sensitivity_array
Matrix button y-axis channels sensitivity array.
uint8_t x_channel_num
The number of channels in x-axis.
uint8_t y_channel_num
The number of channels in y-axis.
struct touch_matrix_position_t
Matrix button position data type.
Public Members
uint8_t x_axis
Matrix button x axis position.
Espressif Systems
*touch_matrix_get_message(const
*x_channel_array
*y_channel_array
Submit Document Feedback
*element_message)
441
touch_elem_message_t
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