Skip to content

Commit 21c3c63

Browse files
ensure only digital pins are set to OUTPUT on startup and reset
1 parent 65310fd commit 21c3c63

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

examples/StandardFirmata/StandardFirmata.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: August 9th, 2015
23+
Last updated by Jeff Hoefs: October 24th, 2015
2424
*/
2525

2626
#include <Servo.h>
@@ -654,7 +654,7 @@ void systemResetCallback()
654654
if (IS_PIN_ANALOG(i)) {
655655
// turns off pullup, configures everything
656656
setPinModeCallback(i, ANALOG);
657-
} else {
657+
} else if (IS_PIN_DIGITAL(i)) {
658658
// sets the output to 0, configures portConfigInputs
659659
setPinModeCallback(i, OUTPUT);
660660
}

examples/StandardFirmataChipKIT/StandardFirmataChipKIT.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
See file LICENSE.txt for further informations on licensing terms.
2323
24-
Last updated by Brian Schmalz: August 9th, 2015
24+
Last updated by Jeff Hoefs: October 24th, 2015
2525
*/
2626

2727
#include <SoftPWMServo.h> // Gives us PWM and Servo on every pin
@@ -663,7 +663,7 @@ void systemResetCallback()
663663
if (IS_PIN_ANALOG(i)) {
664664
// turns off pullup, configures everything
665665
setPinModeCallback(i, ANALOG);
666-
} else {
666+
} else if (IS_PIN_DIGITAL(i)) {
667667
// sets the output to 0, configures portConfigInputs
668668
setPinModeCallback(i, OUTPUT);
669669
}

examples/StandardFirmataEthernet/StandardFirmataEthernet.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: August 9th, 2015
23+
Last updated by Jeff Hoefs: October 24th, 2015
2424
*/
2525

2626
/*
@@ -770,7 +770,7 @@ void systemResetCallback()
770770
if (IS_PIN_ANALOG(i)) {
771771
// turns off pullup, configures everything
772772
setPinModeCallback(i, ANALOG);
773-
} else {
773+
} else if (IS_PIN_DIGITAL(i)) {
774774
// sets the output to 0, configures portConfigInputs
775775
setPinModeCallback(i, OUTPUT);
776776
}

examples/StandardFirmataEthernetPlus/StandardFirmataEthernetPlus.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
See file LICENSE.txt for further informations on licensing terms.
2222
23-
Last updated by Jeff Hoefs: October 4th, 2015
23+
Last updated by Jeff Hoefs: October 24th, 2015
2424
*/
2525

2626
/*
@@ -1026,7 +1026,7 @@ void systemResetCallback()
10261026
if (IS_PIN_ANALOG(i)) {
10271027
// turns off pullup, configures everything
10281028
setPinModeCallback(i, ANALOG);
1029-
} else {
1029+
} else if (IS_PIN_DIGITAL(i)) {
10301030
// sets the output to 0, configures portConfigInputs
10311031
setPinModeCallback(i, OUTPUT);
10321032
}

examples/StandardFirmataPlus/StandardFirmataPlus.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ void systemResetCallback()
962962
if (IS_PIN_ANALOG(i)) {
963963
// turns off pullup, configures everything
964964
setPinModeCallback(i, ANALOG);
965-
} else {
965+
} else if (IS_PIN_DIGITAL(i)) {
966966
// sets the output to 0, configures portConfigInputs
967967
setPinModeCallback(i, OUTPUT);
968968
}

examples/StandardFirmataYun/StandardFirmataYun.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
See file LICENSE.txt for further informations on licensing terms.
2323
24-
Last updated by Jeff Hoefs: August 9th, 2015
24+
Last updated by Jeff Hoefs: October 24th, 2015
2525
*/
2626

2727
/*
@@ -666,7 +666,7 @@ void systemResetCallback()
666666
if (IS_PIN_ANALOG(i)) {
667667
// turns off pullup, configures everything
668668
setPinModeCallback(i, ANALOG);
669-
} else {
669+
} else if (IS_PIN_DIGITAL(i)) {
670670
// sets the output to 0, configures portConfigInputs
671671
setPinModeCallback(i, OUTPUT);
672672
}

0 commit comments

Comments
 (0)