Marcus Chang / AsyncSerial
Revision:
17:5dd6bcc93a8a
Parent:
16:55e6fbfc1e9d
Child:
18:9127f9fae61f
diff -r 55e6fbfc1e9d -r 5dd6bcc93a8a source/AsyncSerial.cpp
--- a/source/AsyncSerial.cpp	Fri Apr 17 09:12:22 2015 +0000
+++ b/source/AsyncSerial.cpp	Fri Apr 17 11:08:42 2015 +0100
@@ -50,7 +50,10 @@
     SerialBase::attach<AsyncSerial>(this, &AsyncSerial::putDone, SerialBase::TxIrq);
 
 #if DEVICE_SERIAL_FC
-    SerialBase::set_flow_control(SerialBase::RTSCTS, rts, cts);
+    if ((rts != NC) && (cts != NC))
+    {
+        SerialBase::set_flow_control(SerialBase::RTSCTS, rts, cts);
+    }
 #endif
 }