PHS module APM-002 library. see: https://developer.mbed.org/users/phsfan/notebook/abitusbmodem/
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 |
diff -r b330179423c8 -r f5bcfb224067 AbitModemInterface.cpp --- 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);
diff -r b330179423c8 -r f5bcfb224067 AbitModemInterface.h --- 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: