Skip to content

Commit b91f67b

Browse files
Randall Bohn (Huckle)
authored andcommitted
Don't start_pmode if we're already in pmode.
1 parent 1923759 commit b91f67b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build/shared/examples/ArduinoISP/ArduinoISP.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
void pulse(int pin, int times);
6767

6868
void setup() {
69-
Serial.begin(19200);
69+
Serial.begin(9600);
7070
pinMode(LED_PMODE, OUTPUT);
7171
pulse(LED_PMODE, 2);
7272
pinMode(LED_ERR, OUTPUT);
@@ -491,9 +491,13 @@ int avrisp() {
491491
fill(5);
492492
empty_reply();
493493
break;
494-
495494
case 'P':
496-
start_pmode();
495+
if (pmode) {
496+
pulse(LED_ERR, 3);
497+
}
498+
else {
499+
start_pmode();
500+
}
497501
empty_reply();
498502
break;
499503
case 'U': // set address (word)

0 commit comments

Comments
 (0)