Restructure Arduino.h a bit to help eclipse code indexer

This commit is contained in:
me-no-dev 2017-02-20 15:06:22 +02:00
parent 422d24b43f
commit e873d577f7

View File

@ -20,10 +20,6 @@
#ifndef Arduino_h #ifndef Arduino_h
#define Arduino_h #define Arduino_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
@ -105,8 +101,6 @@ extern "C" {
#define _NOP() do { __asm__ volatile ("nop"); } while (0) #define _NOP() do { __asm__ volatile ("nop"); } while (0)
#endif #endif
typedef unsigned int word;
#define bit(b) (1UL << (b)) #define bit(b) (1UL << (b))
#define _BV(b) (1UL << (b)) #define _BV(b) (1UL << (b))
@ -125,14 +119,23 @@ typedef unsigned int word;
typedef bool boolean; typedef bool boolean;
typedef uint8_t byte; typedef uint8_t byte;
typedef unsigned int word;
void setup(void);
void loop(void);
long random(long, long);
void randomSeed(unsigned long);
long map(long, long, long, long, long);
#ifdef __cplusplus
extern "C" {
#endif
void init(void); void init(void);
void initVariant(void); void initVariant(void);
void initArduino(void); void initArduino(void);
void setup(void);
void loop(void);
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout); unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout); unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
@ -170,10 +173,6 @@ extern "C" void configTime(long gmtOffset_sec, int daylightOffset_sec,
long random(long); long random(long);
#endif /* __cplusplus */ #endif /* __cplusplus */
long random(long, long);
void randomSeed(unsigned long);
long map(long, long, long, long, long);
#ifndef _GLIBCXX_VECTOR #ifndef _GLIBCXX_VECTOR
// arduino is not compatible with std::vector // arduino is not compatible with std::vector
#define min(a,b) ((a)<(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b))
@ -182,6 +181,7 @@ long map(long, long, long, long, long);
#define _min(a,b) ((a)<(b)?(a):(b)) #define _min(a,b) ((a)<(b)?(a):(b))
#define _max(a,b) ((a)>(b)?(a):(b)) #define _max(a,b) ((a)>(b)?(a):(b))
#include "pins_arduino.h" #include "pins_arduino.h"
#endif /* _ESP32_CORE_ARDUINO_H_ */ #endif /* _ESP32_CORE_ARDUINO_H_ */