Skip to content

Commit bda86bf

Browse files
committed
nano_nora: fix: reset all matrix connections at boot
1 parent e2c8084 commit bda86bf

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

variants/arduino_nano_nora/variant.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@
55

66
extern "C" {
77
void initVariant() {
8+
// FIXME: fix issues with GPIO matrix not being soft reset properly
9+
for (int pin = 0; pin<NUM_DIGITAL_PINS; ++pin) {
10+
switch (pin) {
11+
case LED_RED:
12+
case LED_GREEN:
13+
case LED_BLUE:
14+
// set RGB pins to dig outputs, HIGH=off
15+
pinMode(pin, OUTPUT);
16+
digitalWrite(pin, HIGH);
17+
break;
18+
19+
case TX:
20+
case RX:
21+
// leave UART pins alone
22+
break;
23+
24+
default:
25+
// initialize other pins to dig inputs
26+
pinMode(pin, INPUT);
27+
break;
28+
}
29+
}
830
}
931
}
1032

0 commit comments

Comments
 (0)