ublox-cellular-base

Revision:
40:19c834eb9106
Parent:
37:a2466fcd63c3
--- 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") &&