Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit c9fe2f8

Browse files
committed
fix tone 1200baud trick not works
1 parent 9d6e244 commit c9fe2f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/Tone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ void tone(uint8_t pin, unsigned int frequency, unsigned long duration)
5555
timer.setOverflow(1000000/frequency/4);
5656
timer.setMode(TIMER_CH1, TIMER_OUTPUT_COMPARE);
5757
timer.setCompare(TIMER_CH1, 1); // Interrupt 1 count after each update
58-
//timer.attachInterrupt(TIMER_CH1, handler_tone);
5958
timer.toneAttachInterrupt(TIMER_CH1, handler_tone);
6059
timer.refresh(); // start it up
6160
timer.resume();
@@ -73,6 +72,7 @@ void noTone(uint8_t pin)
7372
timer.refresh();
7473
timer.resume();
7574
gpio_write_bit(PIN_MAP[pin].gpio_device, PIN_MAP[pin].gpio_bit, 0);
75+
pinMode(pin,INPUT); //to fix dfu issue
7676

7777
return;
7878
}

0 commit comments

Comments
 (0)