Skip to content

Commit f3dac47

Browse files
sandeepmistrycmaglie
authored andcommitted
Port Wire.write(...) overloads
Port of arduino/Arduino@6a6ed3d ad97fa06f0
1 parent 351c9e8 commit f3dac47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/Wire/Wire.h

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class TwoWire : public Stream
5757
void onReceive(void(*)(int));
5858
void onRequest(void(*)(void));
5959

60+
inline size_t write(unsigned long n) { return write((uint8_t)n); }
61+
inline size_t write(long n) { return write((uint8_t)n); }
62+
inline size_t write(unsigned int n) { return write((uint8_t)n); }
63+
inline size_t write(int n) { return write((uint8_t)n); }
6064
using Print::write;
6165

6266
void onService(void);

0 commit comments

Comments
 (0)