diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-30 08:38:06 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-30 08:38:06 -0400 |
commit | 4ce1dea5959eeaeb73391d39f152634d63d244c9 (patch) | |
tree | fc74a0972fcd5c4928bbd304e825b828d3668ded /cores/arduino/HardwareSerial.cpp | |
parent | 39e0796aadfae601492baf9abb1e8e2b8cf1d51d (diff) | |
parent | 5130a1329462aa36d5f18e31851d3d9d5086e411 (diff) |
Merge branch 'mainline' into new-extension
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rw-r--r-- | cores/arduino/HardwareSerial.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 77ccd06..48f5fd3 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -363,12 +363,13 @@ void HardwareSerial::flush() ; } -void HardwareSerial::write(uint8_t c) +size_t HardwareSerial::write(uint8_t c) { int i = (_tx_buffer->head + 1) % SERIAL_BUFFER_SIZE; // If the output buffer is full, there's nothing for it other than to // wait for the interrupt handler to empty it a bit + // ???: return 0 here instead? while (i == _tx_buffer->tail) ; @@ -376,6 +377,8 @@ void HardwareSerial::write(uint8_t c) _tx_buffer->head = i; sbi(*_ucsrb, _udrie); + + return 1; } // Preinstantiate Objects ////////////////////////////////////////////////////// |