From cedf5fc338baf0640def712077b85872b1dbfe5a Mon Sep 17 00:00:00 2001 From: "Dirk O. Kaar" Date: Mon, 31 May 2021 13:50:13 +0200 Subject: [PATCH] WMath.cpp doesn't include Arduino.h, where makeWord(h, l) is declared, common denominator type therefore is uint8_t, which is in use already in Arduino.h, too. --- cores/esp32/Arduino.h | 2 +- cores/esp32/WMath.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/esp32/Arduino.h b/cores/esp32/Arduino.h index 570a74425d3..70746109b1f 100644 --- a/cores/esp32/Arduino.h +++ b/cores/esp32/Arduino.h @@ -165,7 +165,7 @@ using std::min; using ::round; uint16_t makeWord(uint16_t w); -uint16_t makeWord(byte h, byte l); +uint16_t makeWord(uint8_t h, uint8_t l); #define word(...) makeWord(__VA_ARGS__) diff --git a/cores/esp32/WMath.cpp b/cores/esp32/WMath.cpp index d70171655ef..bb75fc8a2f6 100644 --- a/cores/esp32/WMath.cpp +++ b/cores/esp32/WMath.cpp @@ -77,12 +77,12 @@ 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(uint8_t h, uint8_t l) { return (h << 8) | l; }