Function esp_idf_sys::esp_event_isr_post

source ยท
pub unsafe extern "C" fn esp_event_isr_post(
    event_base: esp_event_base_t,
    event_id: i32,
    event_data: *const c_void,
    event_data_size: usize,
    task_unblocked: *mut BaseType_t,
) -> esp_err_t
Expand description

@brief Special variant of esp_event_post for posting events from interrupt handlers.

@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; max is 4 bytes @param[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.

@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 default event loop full
  • ESP_ERR_INVALID_ARG: Invalid combination of event base and event ID, data size of more than 4 bytes
  • Others: Fail