Chapter 2. API Reference
Related Documents
Legacy event loop
API Reference
Header File
•
components/esp_event/include/esp_event_legacy.h
Functions
esp_err_t esp_event_send(system_event_t
Send a event to event task.
Other task/modules, such as the tcpip_adapter, can call this API to send an event to event task
Note This API is part of the legacy event system. New code should use event library API in esp_event.h
Return ESP_OK : succeed
Return others : fail
Parameters
• event: Event to send
esp_err_t esp_event_send_internal(esp_event_base_t
Send a event to event task.
Other task/modules, such as the tcpip_adapter, can call this API to send an event to event task
Note This API is used by WiFi Driver only.
Return ESP_OK : succeed
Return others : fail
Parameters
• [in] event_base: the event base that identifies the event
• [in] event_id: the event id that identifies the event
• [in] event_data: the data, specific to the event occurence, that gets passed to the handler
• [in] event_data_size: the size of the event data
• [in] ticks_to_wait: number of ticks to block on a full event queue
esp_err_t esp_event_process_default(system_event_t
Default event handler for system events.
This function performs default handling of system events. When using esp_event_loop APIs, it is called auto-
matically before invoking the user-provided callback function.
Note This API is part of the legacy event system. New code should use event library API in esp_event.h
Applications which implement a custom event loop must call this function as part of event processing.
Return ESP_OK if an event was handled successfully
Parameters
• event: pointer to event to be handled
void esp_event_set_default_eth_handlers(void)
Install default event handlers for Ethernet interface.
Note This API is part of the legacy event system. New code should use event library API in esp_event.h
void esp_event_set_default_wifi_handlers(void)
Install default event handlers for Wi-Fi interfaces (station and AP)
Note This API is part of the legacy event system. New code should use event library API in esp_event.h
Espressif Systems
*event)
*event_data,
size_t
ticks_to_wait)
*event)
846
Submit Document Feedback
event_base,
int32_t
event_id,
event_data_size,
void
TickType_t
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?