Interrupt Function Processing Procedures; Example Of The Interrupt Function Processing Procedures - Espressif ESP8266 Technical Reference

Hide thumbs Also See for ESP8266:
Table of Contents

Advertisement

!
ETS_GPIO_INTR_ENABLE();

2.3.4. Interrupt Function Processing Procedures

1. Clear the interrupt.
Uint16 gpio_status=0;
gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status);
For instructions on GPIO_STATUS and GPIO_STATUS_W1TC, refer to Section 2.2
Instruction on GPIO Registers.
2. check which IO triggered the interrupt (when multiple IOs are configured to be in
interrupt mode)
If(gpio_status==GPIO_Pin_12)
3. If it is double-edge triggered interrupt, check whether this interrupt is triggered by
rising or falling edge.
if(!GPIO_INPUT_GET(GPIO_ID_PIN(12))) //if this MTDI interrupt is
triggered by falling edge.

2.3.5. Example of The Interrupt Function Processing Procedures

Espressif
12 86
!
/!
2. GPIO
2016.05

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP8266 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF