Example from the core libraries to reproduce the issue
Version
[x] Yes I use the latest core version and verified this!
Current behavior
If the internal pullup for input is activated once by using pinMode(pin,INPUT_PULLUP); it keeps being activated after reconfiguring to a normal INPUT (pinMode(pin,INPUT). Libaries like ADCTouch which reconfigure the pullup resistor therefore don't show the expected behaviour. ATTinycore explicitly disables pullups when setting pinMode(pin,INPUT)
Expected behavior
pinMode(pin,INPUT) should disable the internal pullup independent of the current setting.
The expected behavior should be achievable by changing the INPUT block of the pinMode function in wiring_digital.c but I'm not sure if this could cause other issues
Bug Report
Board
IDE
Example from the core libraries to reproduce the issue
Version
Current behavior
If the internal pullup for input is activated once by using
pinMode(pin,INPUT_PULLUP);
it keeps being activated after reconfiguring to a normal INPUT (pinMode(pin,INPUT
). Libaries like ADCTouch which reconfigure the pullup resistor therefore don't show the expected behaviour. ATTinycore explicitly disables pullups when settingpinMode(pin,INPUT)
Expected behavior
pinMode(pin,INPUT)
should disable the internal pullup independent of the current setting.Arduino Reference: pinMode
The expected behavior should be achievable by changing the INPUT block of the pinMode function in wiring_digital.c but I'm not sure if this could cause other issues