gpio_isr_register() function
Register GPIO interrupt handler, the handler is an ISR. The handler will be attached to the same CPU core that this function is running on. This ISR function is called whenever any GPIO interrupt occurs. See the alternative gpio_install_isr_service() and gpio_isr_handler_add() API in order to have the driver support per-GPIO ISRs. \verbatim embed:rst:leading-asterisk To disable or remove the ISR, pass the returned handle to the :doc:`interrupt allocation functions `. \endverbatim
Arguments
fn
Interrupt handler function.
arg
Parameter for handler function
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.
handle
Pointer to return handle. If non-NULL, a handle for the interrupt will be returned here.
Return value
- ESP_OK Success ; - ESP_ERR_INVALID_ARG GPIO error - ESP_ERR_NOT_FOUND No free interrupt found with the specified flags
gpio_isr_register() is called by 1 function and calls 7 functions:
![]()
gpio_isr_register()
gpio_isr_register() reads 11 variables and writes 6 variables:
![]()
gpio_isr_register()