Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By GeoNomad
#3892 I see reference to macros that can enable or disable internal pullup or pulldown resistors.

However, the only place I find that is on the UART.

Has anyone tried to change the configuration on other GPIO pins?

Nothing in user_plug.c but the macros do show up in uart.c.


Please refer to \user\ user_plug.c。
5.1.1. PIN setting macro
 PIN_PULLUP_DIS(PIN_NAME)
Disable pin pull up
 PIN_PULLUP_EN(PIN_NAME)
Enable pin pull up
 PIN_PULLDWN_DIS(PIN_NAME)
Disable pin pull down
 PIN_PULLDWN_EN(PIN_NAME)
Enable pin pull down
 PIN_FUNC_SELECT(PIN_NAME, FUNC)
Select pin function
Example:PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, FUNC_GPIO12);
Use MTDI pin as GPIO12。
User avatar
By GeoNomad
#3922
erl wrote:I do this in my driver for the DS18B20 one-wire temperature sensor in the Frankenstein hardware. See:

https://github.com/nekromant/esp8266-fr ... _ds18b20.c

In the ds_init function.

Happy hacking!


Awesome!

Thank you for the quick reply.

And for sharing that very useful code with us.