From da84adb1e9d09b069137dd90f2e99c43a4db42ad Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 25 Oct 2008 12:52:07 +0000 Subject: Adding word datatype and cast/construction macros, bitRead(), bitWrite(), bitSet(), bitClear(), bit(). --- cores/arduino/WProgram.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cores/arduino/WProgram.h') diff --git a/cores/arduino/WProgram.h b/cores/arduino/WProgram.h index 20650df..e20cab5 100755 --- a/cores/arduino/WProgram.h +++ b/cores/arduino/WProgram.h @@ -12,6 +12,11 @@ #ifdef __cplusplus #include "HardwareSerial.h" +uint16_t makeWord(uint16_t w) { return w; } +uint16_t makeWord(byte h, byte l) { return (h << 8) | l; } + +#define word(...) makeWord(__VA_ARGS__) + unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); // WMath prototypes -- cgit v1.2.3-18-g5258