aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.cpp
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2010-08-02 22:23:48 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2010-08-02 22:23:48 +0000
commit2b1c9aea350e883c040bc168fde55934d77c5f47 (patch)
tree445d04dab561ce46038dacf1b67dcf8202cd77e1 /cores/arduino/HardwareSerial.cpp
parent58f043e0f3e1551206331efc00cdf47c4c885c10 (diff)
changing available() to return an int (because the Ethernet Client class or another stream might need more than 255 bytes).
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rwxr-xr-xcores/arduino/HardwareSerial.cpp2
1 files changed, 1 insertions, 1 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;
}