Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: WizFi250_AP_HelloWorld
Fork of mbed-src by
Diff: common/SerialBase.cpp
- Revision:
- 64:7b352733b00a
- Parent:
- 36:ab3ee77451e7
- Child:
- 65:46be7cdf873f
diff -r a46ad637dc84 -r 7b352733b00a common/SerialBase.cpp
--- a/common/SerialBase.cpp Thu Dec 19 09:00:06 2013 +0000
+++ b/common/SerialBase.cpp Thu Dec 19 13:15:07 2013 +0000
@@ -81,6 +81,28 @@
serial_break_clear(&_serial);
}
+#ifdef DEVICE_SERIAL_FC
+void SerialBase::set_flow_control(Flow type, PinName flow1, PinName flow2) {
+ FlowControl flow_type = (FlowControl)type;
+ switch(type) {
+ case RTS:
+ serial_set_flow_control(&_serial, flow_type, flow1, NC);
+ break;
+
+ case CTS:
+ serial_set_flow_control(&_serial, flow_type, NC, flow1);
+ break;
+
+ case RTSCTS:
+ serial_set_flow_control(&_serial, flow_type, flow1, flow2);
+ break;
+
+ default:
+ break;
+ }
+}
+#endif
+
} // namespace mbed
#endif
