Skip to content

Commit dec6db6

Browse files
committed
io_pin_remap: fix tone() function mapping declaration
Since tone() can have either 2 or 3 parameters, pass any argument after the first to the actual function implementation.
1 parent ae9dae4 commit dec6db6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/esp32/io_pin_remap.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int8_t digitalPinFromGPIONumber(int8_t gpioPin);
1818
#define pulseInLong(pin, state, timeout) pulseInLong(digitalPinToGPIONumber(pin), state, timeout)
1919
#define pulseIn(pin, state, timeout) pulseIn(digitalPinToGPIONumber(pin), state, timeout)
2020
#define noTone(_pin) noTone(digitalPinToGPIONumber(_pin))
21-
#define tone(_pin, frequency, duration) tone(digitalPinToGPIONumber(_pin), frequency, duration)
21+
#define tone(_pin, args...) tone(digitalPinToGPIONumber(_pin), args)
2222

2323
// cores/esp32/esp32-hal.h
2424
#define analogGetChannel(pin) analogGetChannel(digitalPinToGPIONumber(pin))

0 commit comments

Comments
 (0)