diff options
Diffstat (limited to 'libraries/Wire/Wire.h')
-rwxr-xr-x | libraries/Wire/Wire.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libraries/Wire/Wire.h b/libraries/Wire/Wire.h index 51df04e..9ea4afd 100755 --- a/libraries/Wire/Wire.h +++ b/libraries/Wire/Wire.h @@ -52,15 +52,20 @@ class TwoWire : public Stream uint8_t endTransmission(void); uint8_t requestFrom(uint8_t, uint8_t); uint8_t requestFrom(int, int); - virtual void write(uint8_t); - virtual void write(const char *); - virtual void write(const uint8_t *, size_t); + virtual size_t write(uint8_t); + virtual size_t write(const uint8_t *, size_t); virtual int available(void); virtual int read(void); virtual int peek(void); virtual void flush(void); void onReceive( void (*)(int) ); void onRequest( void (*)(void) ); + + inline size_t write(unsigned long n) { return write((uint8_t)n); } + inline size_t write(long n) { return write((uint8_t)n); } + inline size_t write(unsigned int n) { return write((uint8_t)n); } + inline size_t write(int n) { return write((uint8_t)n); } + using Print::write; }; extern TwoWire Wire; |