rtc_isr_register() function
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.
Arguments
handler
handler function to call
handler_arg
argument to be passed to the handler
rtc_intr_mask
combination of RTC_CNTL_*_INT_ENA bits indicating the sources to call the handler for
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 value
- ESP_OK on success - ESP_ERR_NO_MEM not enough memory to allocate handler structure - other errors returned by esp_intr_alloc
rtc_isr_register() is called by 4 functions and calls 6 functions:
![]()
rtc_isr_register()
rtc_isr_register() reads 1 variable and writes 4 variables:
![]()
rtc_isr_register()