Function esp_idf_svc::hal::sys::rtc_isr_register
source ยท pub unsafe extern "C" fn rtc_isr_register(
handler: Option<unsafe extern "C" fn(_: *mut c_void)>,
handler_arg: *mut c_void,
rtc_intr_mask: u32,
flags: u32,
) -> i32
Expand description
@brief Register a handler for specific RTC_CNTL interrupts
Multiple handlers can be registered using this function. Whenever an RTC interrupt happens, all handlers with matching rtc_intr_mask values will be called.
@param handler handler function to call
@param handler_arg argument to be passed to the handler
@param rtc_intr_mask combination of RTC_CNTL_INT_ENA bits indicating the
sources to call the handler for
@param flags An ORred mask of the RTC_INTR_FLAG defines. You can pass different
flags to it to realize different purpose. If 0, the interrupt will
not handle anything special. If you pass RTC_INTR_FLAG_IRAM
, means
the interrupt can be triggered with cache disabled.
@return
- ESP_OK on success
- ESP_ERR_NO_MEM not enough memory to allocate handler structure
- other errors returned by esp_intr_alloc