aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wirish/comm/HardwareSerial.cpp4
-rw-r--r--wirish/comm/HardwareSerial.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/wirish/comm/HardwareSerial.cpp b/wirish/comm/HardwareSerial.cpp
index 3e855ea..93cf909 100644
--- a/wirish/comm/HardwareSerial.cpp
+++ b/wirish/comm/HardwareSerial.cpp
@@ -97,6 +97,10 @@ void HardwareSerial::begin(uint32 baud) {
usart_init(usartNum, baud);
}
+void HardwareSerial::end(void) {
+ usart_disable(usartNum);
+}
+
HardwareSerial Serial1(1);
HardwareSerial Serial2(2);
HardwareSerial Serial3(3);
diff --git a/wirish/comm/HardwareSerial.h b/wirish/comm/HardwareSerial.h
index a488244..5ed81cd 100644
--- a/wirish/comm/HardwareSerial.h
+++ b/wirish/comm/HardwareSerial.h
@@ -39,6 +39,7 @@ class HardwareSerial : public Print {
public:
HardwareSerial(uint8);
void begin(uint32);
+ void end(void);
uint32 available(void);
uint8 read(void);
void flush(void);