aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino')
-rwxr-xr-xcores/arduino/HardwareSerial.cpp2
-rwxr-xr-xcores/arduino/HardwareSerial.h2
-rw-r--r--cores/arduino/Stream.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index f8cdebe..43322ae 100755
--- a/cores/arduino/HardwareSerial.cpp
+++ b/cores/arduino/HardwareSerial.cpp
@@ -173,7 +173,7 @@ void HardwareSerial::end()
cbi(*_ucsrb, _rxcie);
}
-uint8_t HardwareSerial::available(void)
+int HardwareSerial::available(void)
{
return (RX_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % RX_BUFFER_SIZE;
}
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h
index 884f9fe..1770a63 100755
--- a/cores/arduino/HardwareSerial.h
+++ b/cores/arduino/HardwareSerial.h
@@ -48,7 +48,7 @@ class HardwareSerial : public Stream
uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x);
void begin(long);
void end();
- virtual uint8_t available(void);
+ virtual int available(void);
virtual int peek(void);
virtual int read(void);
virtual void flush(void);
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h
index 1d3e50b..1c72ec2 100644
--- a/cores/arduino/Stream.h
+++ b/cores/arduino/Stream.h
@@ -26,7 +26,7 @@
class Stream : public Print
{
public:
- virtual uint8_t available() = 0;
+ virtual int available() = 0;
virtual int peek() = 0;
virtual int read() = 0;
virtual void flush() = 0;