Re-enable of interrupt is not working
Posted: Wed Apr 04, 2018 3:53 am
Hi,
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.
At some point of time I meed to disable the interrupt, for that I used.
And after some time I need to re-enable it again.I do it using,
But I found that, Once I disable the interrupt. I am not able to detect is even after I have enabled it as a mention.
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);