Zhengyang Gu / Mbed 2 deprecated C027_ModemTransparentSerial_BBB

Dependencies:   mbed

Fork of C027_ModemTransparentSerial by u-blox

Revision:
5:1141d3cfd1ef
Parent:
4:fafdcaf842ee
Child:
6:1e5c9b6b2e90
--- a/main.cpp	Fri Dec 06 09:56:13 2013 +0000
+++ b/main.cpp	Thu Dec 19 17:31:35 2013 +0000
@@ -9,6 +9,8 @@
     // open the mdm serial port
     Serial mdm(MDMTXD, MDMRXD);
     mdm.baud(MDMBAUD);
+    // use hardware flow control to make the connection more reliable
+    mdm.set_flow_control(SerialBase::RTSCTS, MDMRTS, MDMCTS);
     
     // open the PC serial port and (use the same baudrate)
     Serial pc(USBTX, USBRX);