Espressif ESP32-S2 Programming Manual page 855

Table of Contents

Advertisement

Chapter 2. API Reference
• [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; max is 4 bytes
• [out] task_unblocked: an optional parameter (can be NULL) which indicates that an event
task with higher priority than currently running task has been unblocked by the posted event; a
context switch should be requested before the interrupt is existed.
esp_err_t esp_event_isr_post_to(esp_event_loop_handle_t
Special variant of esp_event_post_to for posting events from interrupt handlers.
Note this function is only available when CONFIG_ESP_EVENT_POST_FROM_ISR is enabled
Note when this function is called from an interrupt handler placed in IRAM, this function should be placed in
IRAM as well by enabling CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR
Return
• ESP_OK: Success
• ESP_FAIL: Event queue for the loop full
• ESP_ERR_INVALID_ARG: Invalid combination of event base and event id, data size of more than
4 bytes
• Others: Fail
Parameters
• [in] event_loop: the event loop to post to, must not be NULL
• [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
• [out] task_unblocked: an optional parameter (can be NULL) which indicates that an event
task with higher priority than currently running task has been unblocked by the posted event; a
context switch should be requested before the interrupt is existed.
esp_err_t
esp_event_dump(FILE *file)
Dumps statistics of all event loops.
Dumps event loop info in the format:
event loop
handler
handler
...
event loop
handler
handler
...
where:
event loop
format: address,name rx:total_recieved dr:total_dropped
where:
address
name
total_recieved
total_dropped
being full
handler
format: address
where:
address
base,id
executes
Espressif Systems
event_base,
event_data_size, BaseType_t *task_unblocked)
-
memory address of the event loop
-
name of the event loop,
-
number of successfully posted events
-
number of events unsuccessfully posted due to
ev:base,id
inv:total_invoked run:total_runtime
-
address of the handler function
-
the event specified by event base
Submit Document Feedback
event_loop,
int32_t
event_id,
void
'none'
if
no dedicated task
and id
844
esp_event_base_t
*event_data,
size_t
queue␣
this
handler␣
(continues on next page)
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?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF