diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2012-08-29 16:32:05 -0400 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2012-08-29 16:32:05 -0400 |
commit | c29b408a9d420f1850b6c6692f37d11b22e7bedb (patch) | |
tree | 38bfd9b559d56d6cda6470e0b3016cd7e22e5838 /cores/arduino/HardwareSerial.h | |
parent | 00ab72619ea4364ed446d929e77143ed467514c1 (diff) |
Adding overloads so Serial.write(0) works.
http://code.google.com/p/arduino/issues/detail?id=1006
Diffstat (limited to 'cores/arduino/HardwareSerial.h')
-rw-r--r-- | cores/arduino/HardwareSerial.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index 5bceb75..9a42773 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -57,6 +57,10 @@ class HardwareSerial : public Stream virtual int read(void); virtual void flush(void); virtual size_t write(uint8_t); + 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; // pull in write(str) and write(buf, size) from Print operator bool(); }; |