aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/WProgram.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2008-10-25 12:52:07 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2008-10-25 12:52:07 +0000
commitda84adb1e9d09b069137dd90f2e99c43a4db42ad (patch)
tree1adee6ae83c6159a9a952183d5feed51a2fbf779 /cores/arduino/WProgram.h
parent5444b25e11bce6139a58c8a641dccd266f90a0f1 (diff)
Adding word datatype and cast/construction macros, bitRead(), bitWrite(), bitSet(), bitClear(), bit().
Diffstat (limited to 'cores/arduino/WProgram.h')
-rwxr-xr-xcores/arduino/WProgram.h5
1 files changed, 5 insertions, 0 deletions
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