Function esp_idf_sys::esp_event_post_to

source ·
pub unsafe extern "C" fn esp_event_post_to(
    event_loop: esp_event_loop_handle_t,
    event_base: esp_event_base_t,
    event_id: i32,
    event_data: *const c_void,
    event_data_size: usize,
    ticks_to_wait: TickType_t,
) -> esp_err_t
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