Posts an event to the system default event loop. The event loop library keeps a copy of event_data and manages the copy's lifetime automatically (allocation + deletion); this ensures that the data the handler receives is always valid.
the data, specific to the event occurrence, that gets passed to the handler
event_data_size
the size of the event data
ticks_to_wait
number of ticks to block on a full event queue
Return value
- ESP_OK: Success - ESP_ERR_TIMEOUT: Time to wait for event queue to unblock expired, queue full when posting from ISR - ESP_ERR_INVALID_ARG: Invalid combination of event base and event ID - Others: Fail
Examples
esp_event_post() is referenced by 4 libraries and example projects: