From 1d8da69586487a788cbdd08f6ff793b5338b856d Mon Sep 17 00:00:00 2001 From: Vance Farren <37904409+farrenv@users.noreply.github.com> Date: Tue, 16 Jun 2020 14:31:26 -0400 Subject: [PATCH] updates for mbed os 6 --- .../TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp index c135359fb2..268b38a500 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/ONBOARD_TELIT_ME310.cpp @@ -24,7 +24,7 @@ #include "PinNames.h" //#include "mbed.h" -#include "UARTSerial.h" +#include "BufferedSerial.h" #include "ONBOARD_TELIT_ME310.h" #include "ThisThread.h" #include "CellularLog.h" @@ -68,11 +68,11 @@ nsapi_error_t ONBOARD_TELIT_ME310::init() if (err != NSAPI_ERROR_OK) { return err; } - _at->lock(); + _at.lock(); #if DEVICE_SERIAL_FC - _at->at_cmd_discard("&K3;&C1;&D0", ""); + _at.at_cmd_discard("&K3;&C1;&D0", ""); #else - _at->at_cmd_discard("&K0;&C1;&D0", ""); + _at.at_cmd_discard("&K0;&C1;&D0", ""); #endif // AT#QSS=1 @@ -84,7 +84,7 @@ nsapi_error_t ONBOARD_TELIT_ME310::init() // values: // - 0: SIM not inserted // - 1: SIM inserted - _at->at_cmd_discard("#QSS", "=1"); + _at.at_cmd_discard("#QSS", "=1"); // AT#PSNT=1 // Set command enables unsolicited result code for packet service network type (PSNT) @@ -94,7 +94,7 @@ nsapi_error_t ONBOARD_TELIT_ME310::init() // - 0: GPRS network // - 4: LTE network // - 5: unknown or not registered - _at->at_cmd_discard("#PSNT", "=1"); + _at.at_cmd_discard("#PSNT", "=1"); // AT+CMER=2 // Set command enables sending of unsolicited result codes from TA to TE in the case of @@ -102,7 +102,7 @@ nsapi_error_t ONBOARD_TELIT_ME310::init() // Current setting: buffer +CIEV Unsolicited Result Codes in the TA when TA-TE link is // reserved (e.g. on-line data mode) and flush them to the TE after // reservation; otherwise forward them directly to the TE - _at->at_cmd_discard("+CMER", "=2"); + _at.at_cmd_discard("+CMER", "=2"); // AT+CMEE=2 // Set command disables the use of result code +CME ERROR: as an indication of an @@ -110,21 +110,21 @@ nsapi_error_t ONBOARD_TELIT_ME310::init() // ERROR: final result code instead of the default ERROR final result code. ERROR is returned // normally when the error message is related to syntax, invalid parameters or DTE functionality. // Current setting: enable and use verbose values - _at->at_cmd_discard("+CMEE", "=2"); + _at.at_cmd_discard("+CMEE", "=2"); // AT#PORTCFG=0 // Set command allows to connect Service Access Points to the external physical ports giving a great // flexibility. Examples of Service Access Points: AT Parser Instance #1, #2, #3, etc.. - _at->at_cmd_discard("#PORTCFG", "=", "%d", EP_ATLAS_PORT_CONFIGURATION_VARIANT); + _at.at_cmd_discard("#PORTCFG", "=", "%d", EP_ATLAS_PORT_CONFIGURATION_VARIANT); // AT&W&P // - AT&W: Execution command stores on profile the complete configuration of the device. If // parameter is omitted, the command has the same behavior of AT&W0. // - AT&P: Execution command defines which full profile will be loaded at startup. If parameter // is omitted, the command has the same behavior as AT&P0 - _at->at_cmd_discard("&W&P", ""); + _at.at_cmd_discard("&W&P", ""); - return _at->unlock_return_error(); + return _at.unlock_return_error(); } void ONBOARD_TELIT_ME310::press_power_button(int time_ms) @@ -200,7 +200,7 @@ void ONBOARD_TELIT_ME310::onboard_modem_power_down() CellularDevice *CellularDevice::get_target_default_instance() { - static UARTSerial serial(P1_2, P1_1, 115200); + static BufferedSerial serial(P1_2, P1_1, 115200); #if DEVICE_SERIAL_FC if (P0_11 != NC && P1_8 != NC) { tr_debug("Modem flow control: RTS %d CTS %d", P0_11, P1_8);