EasyManua.ls Logo

Espressif ESP32-S2 - Page 855

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
Loading...
Chapter 2. API Reference
[in] event_base: the event base that identifies the event
[in] event_id: the event id that identies 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 event_loop, esp_event_base_t
event_base, int32_t event_id, void *event_data, size_t
event_data_size, BaseType_t *task_unblocked)
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 identies 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 - memory address of the event loop
name - name of the event loop, 'none' if no dedicated task
total_recieved - number of successfully posted events
total_dropped - number of events unsuccessfully posted due to queue
,being full
handler
format: address ev:base,id inv:total_invoked run:total_runtime
where:
address - address of the handler function
base,id - the event specified by event base and id this handler
,executes
(continues on next page)
Espressif Systems 844
Submit Document Feedback
Release v4.4

Table of Contents