diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2008-10-25 12:52:07 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2008-10-25 12:52:07 +0000 |
commit | da84adb1e9d09b069137dd90f2e99c43a4db42ad (patch) | |
tree | 1adee6ae83c6159a9a952183d5feed51a2fbf779 /cores/arduino/WProgram.h | |
parent | 5444b25e11bce6139a58c8a641dccd266f90a0f1 (diff) |
Adding word datatype and cast/construction macros, bitRead(), bitWrite(), bitSet(), bitClear(), bit().
Diffstat (limited to 'cores/arduino/WProgram.h')
-rwxr-xr-x | cores/arduino/WProgram.h | 5 |
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 |