mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Don't start_pmode if we're already in pmode.
This commit is contained in:
parent
a2a06f56cc
commit
d968c7a8ee
@ -66,7 +66,7 @@
|
|||||||
void pulse(int pin, int times);
|
void pulse(int pin, int times);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(19200);
|
Serial.begin(9600);
|
||||||
pinMode(LED_PMODE, OUTPUT);
|
pinMode(LED_PMODE, OUTPUT);
|
||||||
pulse(LED_PMODE, 2);
|
pulse(LED_PMODE, 2);
|
||||||
pinMode(LED_ERR, OUTPUT);
|
pinMode(LED_ERR, OUTPUT);
|
||||||
@ -510,9 +510,13 @@ int avrisp() {
|
|||||||
fill(5);
|
fill(5);
|
||||||
empty_reply();
|
empty_reply();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
start_pmode();
|
if (pmode) {
|
||||||
|
pulse(LED_ERR, 3);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
start_pmode();
|
||||||
|
}
|
||||||
empty_reply();
|
empty_reply();
|
||||||
break;
|
break;
|
||||||
case 'U': // set address (word)
|
case 'U': // set address (word)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user