Skip to content

Commit 2515a3c

Browse files
committed
Make compiler not complain about 2 random prototypes
Issue is when Arduino.h is included in C file
1 parent d1b94df commit 2515a3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: cores/esp32/Arduino.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,14 @@ typedef unsigned int word;
134134
#include "HardwareSerial.h"
135135
#include "Esp.h"
136136

137+
// WMath prototypes
138+
long random(long);
137139
#endif /* __cplusplus */
138140

141+
long random(long, long);
142+
void randomSeed(unsigned long);
143+
long map(long, long, long, long, long);
144+
139145
#ifndef _GLIBCXX_VECTOR
140146
// arduino is not compatible with std::vector
141147
#define min(a,b) ((a)<(b)?(a):(b))
@@ -145,12 +151,6 @@ typedef unsigned int word;
145151
#define _min(a,b) ((a)<(b)?(a):(b))
146152
#define _max(a,b) ((a)>(b)?(a):(b))
147153

148-
// WMath prototypes
149-
long random(long);
150-
long random(long, long);
151-
void randomSeed(unsigned long);
152-
long map(long, long, long, long, long);
153-
154154
#include "pins_arduino.h"
155155

156156
#endif /* _ESP32_CORE_ARDUINO_H_ */

0 commit comments

Comments
 (0)