mirror of https://github.com/ARMmbed/mbed-os.git
updates for mbed os 6
parent
b8687ab524
commit
1d8da69586
|
@ -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()
|
|||
// <status> 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: <err> as an indication of an
|
||||
|
@ -110,21 +110,21 @@ nsapi_error_t ONBOARD_TELIT_ME310::init()
|
|||
// ERROR: <err> 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 <err> 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 <n> 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);
|
||||
|
|
Loading…
Reference in New Issue