Skip to content

Commit be74f52

Browse files
authored
Merge pull request #457 from adafruit/fix-wire-write
fix #456 Wire Write ambiguous
2 parents 7444ba4 + a2d32e9 commit be74f52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/Wire/Wire.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ class TwoWire : public Stream
5959
void onRequest(void(*)(void));
6060
void onService(void);
6161

62+
inline size_t write(unsigned long n) { return write((uint8_t)n); }
63+
inline size_t write(long n) { return write((uint8_t)n); }
64+
inline size_t write(unsigned int n) { return write((uint8_t)n); }
65+
inline size_t write(int n) { return write((uint8_t)n); }
6266
using Print::write;
6367

6468
private:

0 commit comments

Comments
 (0)