diff options
author | Marti Bolivar <mbolivar@mit.edu> | 2010-11-16 07:41:03 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@mit.edu> | 2010-11-16 07:41:03 -0500 |
commit | 3a9a119e9a8ce72c0e1b8fa4d3904bdf84ce355c (patch) | |
tree | 6dac43a2dd023bafee0ae45e4cb95b9f9b85fde5 | |
parent | a3e8044e083e87e5aed459629ebc374d0332e997 (diff) | |
download | librambutan-3a9a119e9a8ce72c0e1b8fa4d3904bdf84ce355c.tar.gz librambutan-3a9a119e9a8ce72c0e1b8fa4d3904bdf84ce355c.zip |
fixed highByte() implementation for when sizeof(argument) > 2
-rw-r--r-- | wirish/wirish.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/wirish.h b/wirish/wirish.h index c1c46cb..311c74f 100644 --- a/wirish/wirish.h +++ b/wirish/wirish.h @@ -62,8 +62,8 @@ extern "C"{ #define LSBFIRST 0 #define MSBFIRST 1 -#define lowByte(w) ((w) & 0xff) -#define highByte(w) ((w) >> 8) +#define lowByte(w) ((w) & 0xFF) +#define highByte(w) (((w) >> 8) & 0xFF) #define bitRead(value, bit) (((value) >> (bit)) & 0x01) #define bitSet(value, bit) ((value) |= (1UL << (bit))) #define bitClear(value, bit) ((value) &= ~(1UL << (bit))) |