From 6dc34077c4aeb19684ac946b755104959507c717 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 5 Dec 2016 22:50:51 +0200 Subject: [PATCH] Add correct definitions for word fixes: https://github.com/espressif/arduino-esp32/issues/76 --- cores/esp32/Arduino.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cores/esp32/Arduino.h b/cores/esp32/Arduino.h index 7906b161..f55edb73 100644 --- a/cores/esp32/Arduino.h +++ b/cores/esp32/Arduino.h @@ -117,7 +117,6 @@ extern "C" { typedef bool boolean; typedef uint8_t byte; -typedef unsigned int word; uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); @@ -154,6 +153,11 @@ long map(long, long, long, long, long); #define _min(a,b) ((a)<(b)?(a):(b)) #define _max(a,b) ((a)>(b)?(a):(b)) +uint16_t makeWord(uint16_t w); +uint16_t makeWord(byte h, byte l); + +#define word(...) makeWord(__VA_ARGS__) + #include "pins_arduino.h" #endif /* _ESP32_CORE_ARDUINO_H_ */