24
24
#include " PinNames.h"
25
25
// #include "mbed.h"
26
26
27
- #include " UARTSerial .h"
27
+ #include " BufferedSerial .h"
28
28
#include " ONBOARD_TELIT_ME310.h"
29
29
#include " ThisThread.h"
30
30
#include " CellularLog.h"
@@ -68,11 +68,11 @@ nsapi_error_t ONBOARD_TELIT_ME310::init()
68
68
if (err != NSAPI_ERROR_OK) {
69
69
return err;
70
70
}
71
- _at-> lock ();
71
+ _at. lock ();
72
72
#if DEVICE_SERIAL_FC
73
- _at-> at_cmd_discard (" &K3;&C1;&D0" , " " );
73
+ _at. at_cmd_discard (" &K3;&C1;&D0" , " " );
74
74
#else
75
- _at-> at_cmd_discard (" &K0;&C1;&D0" , " " );
75
+ _at. at_cmd_discard (" &K0;&C1;&D0" , " " );
76
76
#endif
77
77
78
78
// AT#QSS=1
@@ -84,7 +84,7 @@ nsapi_error_t ONBOARD_TELIT_ME310::init()
84
84
// <status> values:
85
85
// - 0: SIM not inserted
86
86
// - 1: SIM inserted
87
- _at-> at_cmd_discard (" #QSS" , " =1" );
87
+ _at. at_cmd_discard (" #QSS" , " =1" );
88
88
89
89
// AT#PSNT=1
90
90
// Set command enables unsolicited result code for packet service network type (PSNT)
@@ -94,37 +94,37 @@ nsapi_error_t ONBOARD_TELIT_ME310::init()
94
94
// - 0: GPRS network
95
95
// - 4: LTE network
96
96
// - 5: unknown or not registered
97
- _at-> at_cmd_discard (" #PSNT" , " =1" );
97
+ _at. at_cmd_discard (" #PSNT" , " =1" );
98
98
99
99
// AT+CMER=2
100
100
// Set command enables sending of unsolicited result codes from TA to TE in the case of
101
101
// indicator state changes.
102
102
// Current setting: buffer +CIEV Unsolicited Result Codes in the TA when TA-TE link is
103
103
// reserved (e.g. on-line data mode) and flush them to the TE after
104
104
// reservation; otherwise forward them directly to the TE
105
- _at-> at_cmd_discard (" +CMER" , " =2" );
105
+ _at. at_cmd_discard (" +CMER" , " =2" );
106
106
107
107
// AT+CMEE=2
108
108
// Set command disables the use of result code +CME ERROR: <err> as an indication of an
109
109
// error relating to the +Cxxx command issued. When enabled, device related errors cause the +CME
110
110
// ERROR: <err> final result code instead of the default ERROR final result code. ERROR is returned
111
111
// normally when the error message is related to syntax, invalid parameters or DTE functionality.
112
112
// Current setting: enable and use verbose <err> values
113
- _at-> at_cmd_discard (" +CMEE" , " =2" );
113
+ _at. at_cmd_discard (" +CMEE" , " =2" );
114
114
115
115
// AT#PORTCFG=0
116
116
// Set command allows to connect Service Access Points to the external physical ports giving a great
117
117
// flexibility. Examples of Service Access Points: AT Parser Instance #1, #2, #3, etc..
118
- _at-> at_cmd_discard (" #PORTCFG" , " =" , " %d" , EP_ATLAS_PORT_CONFIGURATION_VARIANT);
118
+ _at. at_cmd_discard (" #PORTCFG" , " =" , " %d" , EP_ATLAS_PORT_CONFIGURATION_VARIANT);
119
119
120
120
// AT&W&P
121
121
// - AT&W: Execution command stores on profile <n> the complete configuration of the device. If
122
122
// parameter is omitted, the command has the same behavior of AT&W0.
123
123
// - AT&P: Execution command defines which full profile will be loaded at startup. If parameter
124
124
// is omitted, the command has the same behavior as AT&P0
125
- _at-> at_cmd_discard (" &W&P" , " " );
125
+ _at. at_cmd_discard (" &W&P" , " " );
126
126
127
- return _at-> unlock_return_error ();
127
+ return _at. unlock_return_error ();
128
128
}
129
129
130
130
void ONBOARD_TELIT_ME310::press_power_button (int time_ms)
@@ -200,7 +200,7 @@ void ONBOARD_TELIT_ME310::onboard_modem_power_down()
200
200
201
201
CellularDevice *CellularDevice::get_target_default_instance ()
202
202
{
203
- static UARTSerial serial (P1_2, P1_1, 115200 );
203
+ static BufferedSerial serial (P1_2, P1_1, 115200 );
204
204
#if DEVICE_SERIAL_FC
205
205
if (P0_11 != NC && P1_8 != NC) {
206
206
tr_debug (" Modem flow control: RTS %d CTS %d" , P0_11, P1_8);
0 commit comments