diff --git a/hardware/cores/arduino/WMath.cpp b/hardware/cores/arduino/WMath.cpp index 294d0dd19..2120c4cc1 100644 --- a/hardware/cores/arduino/WMath.cpp +++ b/hardware/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/hardware/cores/arduino/WProgram.h b/hardware/cores/arduino/WProgram.h index e20cab56e..fc14923e8 100755 --- a/hardware/cores/arduino/WProgram.h +++ b/hardware/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__)