diff --git a/cores/esp8266/WMath.cpp b/cores/esp8266/WMath.cpp index 2cc20b9f5..d8dc1f82f 100644 --- a/cores/esp8266/WMath.cpp +++ b/cores/esp8266/WMath.cpp @@ -23,6 +23,8 @@ $Id$ */ +#include "Arduino.h" + extern "C" { #include } @@ -77,10 +79,10 @@ long map(long x, long in_min, long in_max, long out_min, long out_max) { return (delta * dividend + (divisor / 2)) / divisor + out_min; } -unsigned int makeWord(unsigned int w) { +uint16_t makeWord(uint16_t w) { return w; } -unsigned int makeWord(unsigned char h, unsigned char l) { +uint16_t makeWord(byte h, byte l) { return (h << 8) | l; }