Skip to content

Commit e873d57

Browse files
committed
Restructure Arduino.h a bit to help eclipse code indexer
1 parent 422d24b commit e873d57

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Diff for: cores/esp32/Arduino.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#ifndef Arduino_h
2121
#define Arduino_h
2222

23-
#ifdef __cplusplus
24-
extern "C" {
25-
#endif
26-
2723
#include <stdbool.h>
2824
#include <stdint.h>
2925
#include <stdarg.h>
@@ -105,8 +101,6 @@ extern "C" {
105101
#define _NOP() do { __asm__ volatile ("nop"); } while (0)
106102
#endif
107103

108-
typedef unsigned int word;
109-
110104
#define bit(b) (1UL << (b))
111105
#define _BV(b) (1UL << (b))
112106

@@ -125,14 +119,23 @@ typedef unsigned int word;
125119

126120
typedef bool boolean;
127121
typedef uint8_t byte;
122+
typedef unsigned int word;
123+
124+
void setup(void);
125+
void loop(void);
126+
127+
long random(long, long);
128+
void randomSeed(unsigned long);
129+
long map(long, long, long, long, long);
130+
131+
#ifdef __cplusplus
132+
extern "C" {
133+
#endif
128134

129135
void init(void);
130136
void initVariant(void);
131137
void initArduino(void);
132138

133-
void setup(void);
134-
void loop(void);
135-
136139
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
137140
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
138141

@@ -170,10 +173,6 @@ extern "C" void configTime(long gmtOffset_sec, int daylightOffset_sec,
170173
long random(long);
171174
#endif /* __cplusplus */
172175

173-
long random(long, long);
174-
void randomSeed(unsigned long);
175-
long map(long, long, long, long, long);
176-
177176
#ifndef _GLIBCXX_VECTOR
178177
// arduino is not compatible with std::vector
179178
#define min(a,b) ((a)<(b)?(a):(b))
@@ -182,6 +181,7 @@ long map(long, long, long, long, long);
182181

183182
#define _min(a,b) ((a)<(b)?(a):(b))
184183
#define _max(a,b) ((a)>(b)?(a):(b))
184+
185185
#include "pins_arduino.h"
186186

187187
#endif /* _ESP32_CORE_ARDUINO_H_ */

0 commit comments

Comments
 (0)