Type Alias esp_idf_sys::pcnt_watch_cb_t

source ·
pub type pcnt_watch_cb_t = Option<unsafe extern "C" fn(unit: pcnt_unit_handle_t, edata: *const pcnt_watch_event_data_t, user_ctx: *mut c_void) -> bool>;
Expand description

@brief PCNT watch event callback prototype

@note The callback function is invoked from an ISR context, so it should meet the restrictions of not calling any blocking APIs when implementing the callback. e.g. must use ISR version of FreeRTOS APIs.

@param[in] unit PCNT unit handle @param[in] edata PCNT event data, fed by the driver @param[in] user_ctx User data, passed from pcnt_unit_register_event_callbacks() @return Whether a high priority task has been woken up by this function

Aliased Type§

enum pcnt_watch_cb_t {
    None,
    Some(unsafe extern "C" fn(_: *mut i32, _: *const pcnt_watch_event_data_t, _: *mut c_void) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut i32, _: *const pcnt_watch_event_data_t, _: *mut c_void) -> bool)

Some value of type T.