From fe28586154ac07105f22408619199a7b05dee389 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 23 Dec 2009 00:00:17 +0000 Subject: Adding Serial.end(). --- cores/arduino/HardwareSerial.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cores/arduino/HardwareSerial.cpp') diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 1af6a66..712a4c7 100755 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -165,6 +165,13 @@ void HardwareSerial::begin(long baud) sbi(*_ucsrb, _rxcie); } +void HardwareSerial::end() +{ + cbi(*_ucsrb, _rxen); + cbi(*_ucsrb, _txen); + cbi(*_ucsrb, _rxcie); +} + uint8_t HardwareSerial::available(void) { return (RX_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % RX_BUFFER_SIZE; -- cgit v1.2.3-18-g5258