Function esp_idf_svc::hal::sys::esp_event_post_to
source · pub unsafe extern "C" fn esp_event_post_to(
event_loop: *mut c_void,
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 specified 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.
This function behaves in the same manner as esp_event_post, except the additional specification of the event loop to post the event to.
@param[in] event_loop the event loop to post to, must not be NULL @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