1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 05:31:24 +01:00

Enable pullups for Arduino input pins as a default

This commit is contained in:
Neil McKechnie 2021-08-24 22:15:50 +01:00
parent c45337d5d4
commit 777d189cc5

View File

@ -292,7 +292,7 @@ ArduinoPins::ArduinoPins(VPIN firstVpin, int nPins) {
_pinPullups = (uint8_t *)calloc(2, arrayLen); _pinPullups = (uint8_t *)calloc(2, arrayLen);
_pinModes = (&_pinPullups[0]) + arrayLen; _pinModes = (&_pinPullups[0]) + arrayLen;
for (int i=0; i<arrayLen; i++) { for (int i=0; i<arrayLen; i++) {
_pinPullups[i] = -1; _pinPullups[i] = 0xff; // default to pullup on, for inputs
_pinModes[i] = 0; _pinModes[i] = 0;
} }
} }