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.
Revision 40:19c834eb9106, committed 2020-04-02
- Comitter:
- mudassar0121
- Date:
- Thu Apr 02 15:59:41 2020 +0500
- Parent:
- 37:a2466fcd63c3
- Commit message:
- Removed onboard_modem_api and UARTSerial, added UBLOX_onboard_modem_api and BufferedSerial to power up modem
Changed in this revision
UbloxCellularBase.cpp | Show annotated file Show diff for this revision Revisions of this file |
UbloxCellularBase.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a2466fcd63c3 -r 19c834eb9106 UbloxCellularBase.cpp --- a/UbloxCellularBase.cpp Mon Jan 06 14:25:07 2020 +0500 +++ b/UbloxCellularBase.cpp Thu Apr 02 15:59:41 2020 +0500 @@ -13,10 +13,8 @@ * limitations under the License. */ -#include "UARTSerial.h" #include "APN_db.h" #include "UbloxCellularBase.h" -#include "onboard_modem_api.h" #ifdef FEATURE_COMMON_PAL #include "mbed_trace.h" #define TRACE_GROUP "UCB" @@ -432,7 +430,6 @@ * PROTECTED METHODS **********************************************************************/ -#if MODEM_ON_BOARD void UbloxCellularBase::modem_init() { ::onboard_modem_init(); @@ -452,27 +449,6 @@ { ::onboard_modem_power_down(); } -#else -void UbloxCellularBase::modem_init() -{ - // Meant to be overridden -} - -void UbloxCellularBase::modem_deinit() -{ - // Meant to be overridden -} - -void UbloxCellularBase::modem_power_up() -{ - // Meant to be overridden -} - -void UbloxCellularBase::modem_power_down() -{ - // Mmeant to be overridden -} -#endif // Constructor. // Note: to allow this base class to be inherited as a virtual base class @@ -530,7 +506,7 @@ if (baud > 115200) { baud = 115200; } - _fh = new UARTSerial(tx, rx, baud); + _fh = new BufferedSerial(tx, rx, baud); // Set up the AT parser #ifdef TARGET_UBLOX_C030_R41XM @@ -634,7 +610,7 @@ if (_at->send("AT+IPR=%d", _baud) && _at->recv("OK")) { // Need to wait for things to be sorted out on the modem side ThisThread::sleep_for(100); - ((UARTSerial *)_fh)->set_baud(_baud); + ((BufferedSerial *)_fh)->set_baud(_baud); // Turn off modem echoing and turn on verbose responses success = _at->send("ATE0;+CMEE=2") && _at->recv("OK") &&
diff -r a2466fcd63c3 -r 19c834eb9106 UbloxCellularBase.h --- a/UbloxCellularBase.h Mon Jan 06 14:25:07 2020 +0500 +++ b/UbloxCellularBase.h Thu Apr 02 15:59:41 2020 +0500 @@ -20,6 +20,8 @@ #include "mbed_toolchain.h" // for MBED_DEPRECATED #include "UbloxATCmdParser.h" #include "FileHandle.h" +#include "drivers/BufferedSerial.h" +#include "UBLOX_onboard_modem_api.h" #ifdef TARGET_UBLOX_C030_R410M #define MAX_NUM_PROFILES 12 //ref to enum MNOProfile