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 #849 background imageLoading...
Page #849 background image
Chapter 2. API Reference
Event loop profiling
A configuration option CONFIG_ESP_EVENT_LOOP_PROFILING can be enabled in order to activate statistics col-
lection for all event loops created. The function esp_event_dump() can be used to output the collected statistics
to a file stream. More details on the information included in the dump can be found in the esp_event_dump()
API Reference.
Application Example
Examples on using the esp_event library can be found in system/esp_event. The examples cover event declaration,
loop creation, handler registration and unregistration and event posting.
Other examples which also adopt esp_event library:
NMEA Parser , which will decode the statements received from GPS.
API Reference
Header File
components/esp_event/include/esp_event.h
Functions
esp_err_t esp_event_loop_create(const esp_event_loop_args_t *event_loop_args,
esp_event_loop_handle_t *event_loop)
Create a new event loop.
Return
ESP_OK: Success
ESP_ERR_INVALID_ARG: event_loop_args or event_loop was NULL
ESP_ERR_NO_MEM: Cannot allocate memory for event loops list
ESP_FAIL: Failed to create task loop
Others: Fail
Parameters
[in] event_loop_args: configuration structure for the event loop to create
[out] event_loop: handle to the created event loop
esp_err_t esp_event_loop_delete(esp_event_loop_handle_t event_loop)
Delete an existing event loop.
Return
ESP_OK: Success
Others: Fail
Parameters
[in] event_loop: event loop to delete, must not be NULL
esp_err_t esp_event_loop_create_default(void)
Create default event loop.
Return
ESP_OK: Success
ESP_ERR_NO_MEM: Cannot allocate memory for event loops list
ESP_FAIL: Failed to create task loop
Others: Fail
esp_err_t esp_event_loop_delete_default(void)
Delete the default event loop.
Return
ESP_OK: Success
Others: Fail
Espressif Systems 838
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