aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary J. Fields <zachary_fields@yahoo.com>2014-05-07 17:39:08 -0700
committerZachary J. Fields <zachary_fields@yahoo.com>2014-05-07 17:39:08 -0700
commitc16768565b4ea62a06d21fa6d5cb0cbb0af902fa (patch)
treea3eacd06d3dc0944d3bffc22be5bcac661d6037d
parent908c526c4c10d51ea604a15d6cd97d803e3749dd (diff)
Match return value to type in available()
-rw-r--r--cores/arduino/HardwareSerial.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index eb2365f..1a2f8ce 100644
--- a/cores/arduino/HardwareSerial.cpp
+++ b/cores/arduino/HardwareSerial.cpp
@@ -426,7 +426,7 @@ void HardwareSerial::end()
int HardwareSerial::available(void)
{
- return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE;
+ return (int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE;
}
int HardwareSerial::peek(void)