From c29b408a9d420f1850b6c6692f37d11b22e7bedb Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 29 Aug 2012 16:32:05 -0400 Subject: Adding overloads so Serial.write(0) works. http://code.google.com/p/arduino/issues/detail?id=1006 --- cores/arduino/HardwareSerial.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cores/arduino') 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(); }; -- cgit v1.2.3-18-g5258