21
21
22
22
#include " mbed.h"
23
23
#include " CellularLog.h"
24
+ #include " CellularDevice.h"
24
25
#include " CellularContext.h"
25
26
#include " CellularInterface.h"
26
27
#include " GEMALTO_CINTERION_CellularStack.h"
27
28
28
29
#define MAXRETRY 3
29
30
30
- arduino::CMUXClass * arduino::CMUXClass::get_default_instance ()
31
+ arduino::CMUXClass *arduino::CMUXClass::get_default_instance ()
31
32
{
32
33
static mbed::UnbufferedSerial serial (MBED_CONF_GEMALTO_CINTERION_TX, MBED_CONF_GEMALTO_CINTERION_RX, 115200 );
33
34
serial.set_flow_control (mbed::SerialBase::RTSCTS_SW, MBED_CONF_GEMALTO_CINTERION_CTS, NC);
@@ -37,11 +38,11 @@ arduino::CMUXClass * arduino::CMUXClass::get_default_instance()
37
38
38
39
mbed::CellularDevice *mbed::CellularDevice::get_default_instance ()
39
40
{
40
- static auto cmux = arduino::CMUXClass::get_default_instance ();
41
- static mbed::GEMALTO_CINTERION device (cmux->get_serial (0 ));
42
- nextSerialPort++;
43
- device.enableCMUXChannel = mbed::callback (cmux, &arduino::CMUXClass::enableCMUXChannel);
44
- return &device;
41
+ static auto cmux = arduino::CMUXClass::get_default_instance ();
42
+ static mbed::GEMALTO_CINTERION device (cmux->get_serial (0 ));
43
+ nextSerialPort++;
44
+ device.enableCMUXChannel = mbed::callback (cmux, &arduino::CMUXClass::enableCMUXChannel);
45
+ return &device;
45
46
}
46
47
47
48
int arduino::GSMClass::begin (const char * pin, const char * apn, const char * username, const char * password, RadioAccessTechnologyType rat, uint32_t band, bool restart) {
@@ -117,11 +118,11 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
117
118
return connect_status == NSAPI_ERROR_OK ? 1 : 0 ;
118
119
}
119
120
120
- void arduino::GSMClass::enableCmux (){
121
+ void arduino::GSMClass::enableCmux () {
121
122
_cmuxGSMenable = true ;
122
123
}
123
124
124
- bool arduino::GSMClass::isCmuxEnable (){
125
+ bool arduino::GSMClass::isCmuxEnable () {
125
126
return _cmuxGSMenable;
126
127
}
127
128
0 commit comments