aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2008-10-26 12:31:45 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2008-10-26 12:31:45 +0000
commite42b8d7ef811df7f552582c57cda66a275670fe4 (patch)
tree891c8ca3e11e15a0bdc5e8dfb9e894f1c0c61d5f
parentda84adb1e9d09b069137dd90f2e99c43a4db42ad (diff)
Moving makeWord() function defintion into WMath.cpp (out of WProgram.h).
-rw-r--r--cores/arduino/WMath.cpp3
-rwxr-xr-xcores/arduino/WProgram.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/cores/arduino/WMath.cpp b/cores/arduino/WMath.cpp
index 294d0dd..2120c4c 100644
--- a/cores/arduino/WMath.cpp
+++ b/cores/arduino/WMath.cpp
@@ -55,3 +55,6 @@ long map(long x, long in_min, long in_max, long out_min, long out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
+
+unsigned int makeWord(unsigned int w) { return w; }
+unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } \ No newline at end of file
diff --git a/cores/arduino/WProgram.h b/cores/arduino/WProgram.h
index e20cab5..fc14923 100755
--- a/cores/arduino/WProgram.h
+++ b/cores/arduino/WProgram.h
@@ -12,8 +12,8 @@
#ifdef __cplusplus
#include "HardwareSerial.h"
-uint16_t makeWord(uint16_t w) { return w; }
-uint16_t makeWord(byte h, byte l) { return (h << 8) | l; }
+uint16_t makeWord(uint16_t w);
+uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(__VA_ARGS__)