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.
Dependencies: Socket lwip-sys lwip
Fork of AbitUSBModem by
Revision 102:f5bcfb224067, committed 2015-07-01
- Comitter:
- phsfan
- Date:
- Wed Jul 01 01:00:31 2015 +0000
- Parent:
- 101:b330179423c8
- Commit message:
- fix flow control
Changed in this revision
| AbitModemInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
| AbitModemInterface.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/AbitModemInterface.cpp Thu May 28 08:45:20 2015 +0000
+++ b/AbitModemInterface.cpp Wed Jul 01 01:00:31 2015 +0000
@@ -53,7 +53,15 @@
m_reset = 0;
m_module.baud(baud);
#if DEVICE_SERIAL_FC
- m_module.set_flow_control(Serial::RTSCTS, rts, cts);
+ if (rts != NC && cts != NC) {
+ m_module.set_flow_control(Serial::RTSCTS, rts, cts);
+ } else
+ if (rts != NC && cts == NC) {
+ m_module.set_flow_control(Serial::RTS, rts);
+ } else
+ if (rts == NC && cts != NC) {
+ m_module.set_flow_control(Serial::CTS, cts);
+ }
#else
m_rts = 0;
m_cts.mode(PullUp);
--- a/AbitModemInterface.h Thu May 28 08:45:20 2015 +0000
+++ b/AbitModemInterface.h Wed Jul 01 01:00:31 2015 +0000
@@ -32,7 +32,7 @@
#include "ip/PPPIPInterface.h"
#include "sms/SMSInterface.h"
-#undef DEVICE_SERIAL_FC
+#define DEVICE_SERIAL_FC 1
class AbitModemInterface {
public:
