I am working on Interrupt. I need to disable and enable the interrupt run time.
Here is a piece of code that I am using to initialize the interrupt.
Code: Select all
#define GPIO_1 GPIO_NUM_25
gpio_set_direction(GPIO_1, GPIO_MODE_INPUT);
gpio_set_pull_mode(GPIO_1, GPIO_PULLUP_ONLY);
attachInterrupt(digitalPinToInterrupt(GPIO_1), sw1_isr, CHANGE);
Code: Select all
gpio_intr_disable(GPIO_1);
Code: Select all
gpio_intr_enable(GPIO_1);