Search found 2 matches
- Fri Jun 21, 2019 10:41 am
- Forum: ESP-IDF 中文讨论版
- Topic: GPIO中断
- Replies: 1
- Views: 4340
GPIO中断
<t>请问我再中断中关闭中断使能,再应用中开启中断使能。但是开始会响应。才是多按几次按钮中断就不响应呢怎么办呢?中断代码和线程<br/> 代码如下:<br/> static void IRAM_ATTR gpio_isr_handle(void* arg)<br/> {<br/> uint32_t gpio_num = (uint32_t)arg;<br/> xQueueSendFromISR(gpio_pen_queue,&gpio_num,NULL);<br/> GPIO.pin[GPIO_PEN_SDA_IO].int_ena = 0; ///关闭中断<br/> }<br/> stati...
- Fri Jun 21, 2019 10:40 am
- Forum: ESP-IDF 中文讨论版
- Topic: 再中断中失能中断,线程中开启中断。中断不响应问题
- Replies: 1
- Views: 4662
再中断中失能中断,线程中开启中断。中断不响应问题
static void IRAM_ATTR gpio_isr_handle(void* arg) { uint32_t gpio_num = (uint32_t)arg; xQueueSendFromISR(gpio_pen_queue,&gpio_num,NULL); GPIO.pin[GPIO_PEN_SDA_IO].int_ena = 0; ///关闭中断 } static void gpio_task_example(void* arg) { uint32_t io_num; for(;;) { if(xQueueReceive(gpio_pen_queue, &io_num, por...