!
This sentence has two functions:
Write 1 into bit 12 of GPIO_ENABLE_W1TS register. It enables the MTDI output
•
function.
Write 1 into bit 12 of GPIO_OUT_W1TS register. It sets MTDI output to high level.
•
! Note:
To set MTDI output to low level, set the second parameter of this function to be 0.
GPIO_OUTPUT_SET(GPIO_ID_PIN(12), 0);
This sentence has two functions:
•
•
3. Enable the MTDI pull up.
PIN_PULLUP_EN(PERIPHS_IO_MUX_MTDI_U);
It writes 1 into bit 7 of PERIPHS_IO_MUX_MTDI_U. It enables the MTDI pull up.
! Note:
To disable the MTDI pull up, use the following sentence:
PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTDI_U);
2.3.2. Parameter Configuration for Scene 2
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. Get the MTDI pin level status.
Uint8 level=0;
level=GPIO_INPUT_GET(GPIO_ID_PIN(12))
GPIO_INPUT_GET(GPIO_ID_PIN(12)) gets the status of bit 12 of GPIO_IN register. The
value of this register shows the input level of related pin. (Enable the input function of the
related pin first to get effective register status)
Espressif
Write 1 into bit 12 of GPIO_ENABLE_W1TS register. It enables the MTDI output
function.
Write 1 into bit 12 of GPIO_OUT_W1TC register. It sets MTDI output to low level.
10 86
!
/!
2. GPIO
2016.05
Need help?
Do you have a question about the ESP8266 and is the answer not in the manual?
Questions and answers