From 2515a3cfed79488ee68effa9ef2dc11c071b9124 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Sun, 13 Nov 2016 13:23:44 +0200 Subject: [PATCH] Make compiler not complain about 2 random prototypes Issue is when Arduino.h is included in C file --- cores/esp32/Arduino.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cores/esp32/Arduino.h b/cores/esp32/Arduino.h index 5375d695..485238c5 100644 --- a/cores/esp32/Arduino.h +++ b/cores/esp32/Arduino.h @@ -134,8 +134,14 @@ typedef unsigned int word; #include "HardwareSerial.h" #include "Esp.h" +// WMath prototypes +long random(long); #endif /* __cplusplus */ +long random(long, long); +void randomSeed(unsigned long); +long map(long, long, long, long, long); + #ifndef _GLIBCXX_VECTOR // arduino is not compatible with std::vector #define min(a,b) ((a)<(b)?(a):(b)) @@ -145,12 +151,6 @@ typedef unsigned int word; #define _min(a,b) ((a)<(b)?(a):(b)) #define _max(a,b) ((a)>(b)?(a):(b)) -// WMath prototypes -long random(long); -long random(long, long); -void randomSeed(unsigned long); -long map(long, long, long, long, long); - #include "pins_arduino.h" #endif /* _ESP32_CORE_ARDUINO_H_ */