Skip to content

Commit 77f5044

Browse files
authored
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. (#5230)
Fixes #5229
1 parent 67de199 commit 77f5044

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: cores/esp32/Arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ using std::min;
165165
using ::round;
166166

167167
uint16_t makeWord(uint16_t w);
168-
uint16_t makeWord(byte h, byte l);
168+
uint16_t makeWord(uint8_t h, uint8_t l);
169169

170170
#define word(...) makeWord(__VA_ARGS__)
171171

Diff for: cores/esp32/WMath.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ long map(long x, long in_min, long in_max, long out_min, long out_max) {
7777
return (delta * dividend + (divisor / 2)) / divisor + out_min;
7878
}
7979

80-
unsigned int makeWord(unsigned int w)
80+
uint16_t makeWord(uint16_t w)
8181
{
8282
return w;
8383
}
8484

85-
unsigned int makeWord(unsigned char h, unsigned char l)
85+
uint16_t makeWord(uint8_t h, uint8_t l)
8686
{
8787
return (h << 8) | l;
8888
}

0 commit comments

Comments
 (0)