please do not use #define for function names - this bashes every other library #9372
Closed
1 task done
Labels
Status: Awaiting triage
Issue is waiting for triage
Board
ESP32 family
Device Description
any
Hardware Configuration
n/a
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
any
Flash frequency
n/a
PSRAM enabled
yes
Upload speed
n/a
Description
It seems that in 3.xx ESP BSP decides to use #define to remap functions like analogWrite() with #define
https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/io_pin_remap.h#L18
however, this means any library that uses a function like analogWrite (say a DAC interface library) or analogRead (from a ADC interface library) will act unusually/incorrectly/may-not-even-compile because the #define is changing the function call invisibly.
https://forums.adafruit.com/viewtopic.php?p=1000372
please please please do not do this!
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: