5
5
6
6
#define MAXRETRY 3
7
7
8
+
8
9
mbed::CellularDevice *mbed::CellularDevice::get_default_instance ()
9
10
{
10
- static BufferedSerial serial (MBED_CONF_GEMALTO_CINTERION_TX, MBED_CONF_GEMALTO_CINTERION_RX, 115200 );
11
+ static mbed:: BufferedSerial serial (MBED_CONF_GEMALTO_CINTERION_TX, MBED_CONF_GEMALTO_CINTERION_RX, 115200 );
11
12
#if defined(MBED_CONF_GEMALTO_CINTERION_RTS) && defined(MBED_CONF_GEMALTO_CINTERION_CTS)
12
- serial.set_flow_control (mbed::SerialBase::RTSCTS , MBED_CONF_GEMALTO_CINTERION_RTS, MBED_CONF_GEMALTO_CINTERION_CTS);
13
+ serial.set_flow_control (mbed::SerialBase::RTSCTS_SW , MBED_CONF_GEMALTO_CINTERION_RTS, MBED_CONF_GEMALTO_CINTERION_CTS);
13
14
#endif
14
- static GEMALTO_CINTERION device (&serial);
15
+ static mbed:: GEMALTO_CINTERION device (&serial);
15
16
return &device;
16
17
}
17
18
@@ -22,7 +23,6 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
22
23
}
23
24
24
25
static mbed::DigitalOut on (PJ_7, 1 );
25
- static mbed::DigitalOut rts (MBED_CONF_GEMALTO_CINTERION_RTS, 0 );
26
26
27
27
_context->set_sim_pin (pin);
28
28
@@ -39,7 +39,7 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
39
39
40
40
_context->set_access_technology (rat);
41
41
42
- uint8_t connect_status = NSAPI_ERROR_AUTH_FAILURE;
42
+ int connect_status = NSAPI_ERROR_AUTH_FAILURE;
43
43
uint8_t retryCount = 0 ;
44
44
while (connect_status != NSAPI_ERROR_OK && retryCount < MAXRETRY) {
45
45
@@ -60,15 +60,15 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
60
60
61
61
}
62
62
63
- return connect_status;
63
+ return connect_status == NSAPI_ERROR_OK ? 1 : 0 ;
64
64
}
65
65
66
66
void arduino::GSMClass::end () {
67
67
68
68
}
69
69
70
70
int arduino::GSMClass::disconnect () {
71
-
71
+ return 0 ;
72
72
}
73
73
74
74
unsigned long arduino::GSMClass::getTime ()
0 commit comments