| Electronic Components Datasheet Search |
|
ESP8266 Datasheet(PDF) 19 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
|
|||||||||||||||||||||||||||||
ESP8266 Datasheet(HTML) 19 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
19 / 117 page ![]() ! 2. GPIO 2.3.3. Parameter Configuration for Scene 3 typedef enum { GPIO_PIN_INTR_DISABLE = 0, GPIO_PIN_INTR_POSEDGE = 1, GPIO_PIN_INTR_NEGEDGE = 2, GPIO_PIN_INTR_ANYEGDE = 3, GPIO_PIN_INTR_LOLEVEL = 4, GPIO_PIN_INTR_HILEVEL = 5 } GPIO_INT_TYPE; This structure is used to configure the GPIO interrupt trigger manner. It is declared in gpio.h. 1. Configure the MTDI to GPIO mode. PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U,FUNC_GPIO12); This sentence writes 1 into bits 4-5 of PERIPHS_IO_MUX_MTDI_U register. When bits 4-5 of PERIPHS_IO_MUX_MTDI_U are set to be 1, the MTDI is configured to the GPIO mode. 2. Configure the MTDI to the input mode. GPIO_DIS_OUTPUT(GPIO_ID_PIN(12)); 3. Disable all IO interrupts. ETS_GPIO_INTR_DISABLE(); 4. Set the interrupt handler function. ETS_GPIO_INTR_ATTACH(GPIO_INTERRUPT,NULL); 5. Configure MTDI to falling edge triggers interrupt. gpio_pin_intr_state_set(GPIO_ID_PIN(12),GPIO_PIN_INTR_NEGEDGE); This sentence writes 0x02 into bit[9:7] of GPIO_PIN12 register. It sets MTDI to falling edge triggers interrupt. 6. Enable the GPIO interrupt. ! Note: • If MTDI is at high level, then the return value of GPIO_INPUT_GET is 1, level = 1; • If MTDI is at low level, then the return value of GPIO_INPUT_GET is 0, level = 0. ! Note: If users want to disable the MTDI interrupt function, write 0x02 into bit[9:7] of GPIO_PIN12 register. For other interrupt triggering mode configuration, refer to 2.2 Instruction on GPIO Registers. Espressif ! /! 11 104 2017.05 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |