From b6593efa3c23b3ab53d412d7d398ff1bacd2a91e Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Tue, 17 Jan 2017 10:12:57 +1000 Subject: [PATCH] esp8266_pinToGpio not needed for tone() The '_pin = esp8266_pinToGpio[_pin];' pin remapping is not needed in the tone library - this actually broke the tone support, and only worked with P3 as it remaps to GPIO3. --- cores/oak/Tone.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cores/oak/Tone.cpp b/cores/oak/Tone.cpp index dfba490..e3e1a20 100644 --- a/cores/oak/Tone.cpp +++ b/cores/oak/Tone.cpp @@ -33,7 +33,6 @@ static long toggle_counts[AVAILABLE_TONE_PINS] = { 0, }; void t1IntHandler(); static int8_t toneBegin(uint8_t _pin) { - _pin = esp8266_pinToGpio[_pin]; int8_t _index = -1; // if we're already using the pin, reuse it. @@ -57,7 +56,6 @@ static int8_t toneBegin(uint8_t _pin) { // frequency (in hertz) and duration (in milliseconds). void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) { - _pin = esp8266_pinToGpio[_pin]; int8_t _index; _index = toneBegin(_pin);