diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 7b6519b80a9d07e81c7bd17fc83c63dbf37a33c9..a37ad3ffdb220d05e9ff606bb0c46eac598855c2 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -20,11 +20,16 @@ #ifndef Arduino_h #define Arduino_h +#include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <math.h> +typedef bool boolean; +typedef uint8_t byte; +typedef uint16_t word; + // some libraries and sketches depend on this AVR stuff, // assuming Arduino.h or WProgram.h automatically includes it... // diff --git a/cores/arduino/wiring_constants.h b/cores/arduino/wiring_constants.h index 94d6cfbafc11b184004d4ec6448e4078c12b0b81..30b110139267f5a2c010a89d9419fa7695ffe9d4 100644 --- a/cores/arduino/wiring_constants.h +++ b/cores/arduino/wiring_constants.h @@ -31,9 +31,6 @@ extern "C"{ //#define OUTPUT (0x1) //#define INPUT_PULLUP (0x2) -#define true (0x1) -#define false (0x0) - #define PI 3.1415926535897932384626433832795 #define HALF_PI 1.5707963267948966192313216916398 #define TWO_PI 6.283185307179586476925286766559 @@ -92,13 +89,8 @@ enum BitOrder { #define bitClear(value, bit) ((value) &= ~(1UL << (bit))) #define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) -typedef unsigned int word; - #define bit(b) (1UL << (b)) -typedef bool boolean; -typedef uint8_t byte; - #ifdef __cplusplus } // extern "C" #endif // __cplusplus