Skip to content

Commit d6857ed

Browse files
committed
Fixed regression on boolean type definition
1 parent 2730cc0 commit d6857ed

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

cores/arduino/Arduino.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@
2020
#ifndef Arduino_h
2121
#define Arduino_h
2222

23+
#include <stdbool.h>
2324
#include <stdint.h>
2425
#include <stdlib.h>
2526
#include <string.h>
2627
#include <math.h>
2728

29+
typedef bool boolean;
30+
typedef uint8_t byte;
31+
typedef uint16_t word;
32+
2833
// some libraries and sketches depend on this AVR stuff,
2934
// assuming Arduino.h or WProgram.h automatically includes it...
3035
//

cores/arduino/wiring_constants.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ extern "C"{
3131
//#define OUTPUT (0x1)
3232
//#define INPUT_PULLUP (0x2)
3333

34-
#define true (0x1)
35-
#define false (0x0)
36-
3734
#define PI 3.1415926535897932384626433832795
3835
#define HALF_PI 1.5707963267948966192313216916398
3936
#define TWO_PI 6.283185307179586476925286766559
@@ -92,13 +89,8 @@ enum BitOrder {
9289
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
9390
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
9491

95-
typedef unsigned int word;
96-
9792
#define bit(b) (1UL << (b))
9893

99-
typedef bool boolean;
100-
typedef uint8_t byte;
101-
10294
#ifdef __cplusplus
10395
} // extern "C"
10496
#endif // __cplusplus

0 commit comments

Comments
 (0)