File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 36
36
extern "C" {
37
37
#endif
38
38
39
- #define true 1
40
- #define false 0
41
-
42
39
#define PI 3.1415926535897932384626433832795
43
40
#define HALF_PI 1.5707963267948966192313216916398
44
41
#define TWO_PI 6.283185307179586476925286766559
@@ -90,7 +87,6 @@ typedef unsigned int word;
90
87
91
88
#define bit (b ) (1UL << (b))
92
89
93
- typedef uint8_t boolean ;
94
90
typedef uint8_t byte ;
95
91
96
92
uint32_t pulseIn (uint8_t pin , uint8_t state , uint32_t timeout );
@@ -109,4 +105,14 @@ void loop(void);
109
105
} // extern "C"
110
106
#endif
111
107
108
+ // fix C++ boolean issue
109
+ // https://github.com/arduino/Arduino/pull/2151
110
+ #ifdef __cplusplus
111
+ typedef bool boolean ;
112
+ #else
113
+ typedef uint8_t boolean ;
114
+ #define false 0
115
+ #define true (!false)
116
+ #endif
117
+
112
118
#endif
You can’t perform that action at this time.
0 commit comments