Function esp_idf_hal::sys::esp_event_post
source · pub unsafe extern "C" fn esp_event_post(
event_base: *const i8,
event_id: i32,
event_data: *const c_void,
event_data_size: usize,
ticks_to_wait: u32,
) -> i32
Expand description
@brief 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.
@param[in] event_base the event base that identifies the event @param[in] event_id the event ID that identifies the event @param[in] event_data the data, specific to the event occurrence, that gets passed to the handler @param[in] event_data_size the size of the event data @param[in] ticks_to_wait number of ticks to block on a full event queue
@return
- 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