Skip to content

Commit

Permalink
Adding overloads for other integer types in Wire.write(). (Paul Stoff…
Browse files Browse the repository at this point in the history
  • Loading branch information
damellis committed Dec 2, 2011
1 parent 6fa5f18 commit 6a6ed3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/Wire/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class TwoWire : public Stream
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;
};

Expand Down

0 comments on commit 6a6ed3d

Please sign in to comment.