Function esp_idf_sys::pcnt_isr_register
source ยท pub unsafe extern "C" fn pcnt_isr_register(
fn_: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
arg: *mut c_void,
intr_alloc_flags: c_int,
handle: *mut pcnt_isr_handle_t,
) -> esp_err_t
Expand description
@brief Register PCNT interrupt handler, the handler is an ISR. The handler will be attached to the same CPU core that this function is running on. Please do not use pcnt_isr_service_install if this function was called.
@param fn Interrupt handler function. @param arg Parameter for handler function @param intr_alloc_flags Flags used to allocate the interrupt. One or multiple (ORred) ESP_INTR_FLAG_* values. See esp_intr_alloc.h for more info. @param handle Pointer to return handle. If non-NULL, a handle for the interrupt will be returned here. Calling pcnt_isr_unregister to unregister this ISR service if needed, but only if the handle is not NULL.
@return - ESP_OK Success - ESP_ERR_NOT_FOUND Can not find the interrupt that matches the flags. - ESP_ERR_INVALID_ARG Function pointer error.