diff --git a/libraries/GSM/src/GSM.cpp b/libraries/GSM/src/GSM.cpp index 9285ce838..19305540b 100644 --- a/libraries/GSM/src/GSM.cpp +++ b/libraries/GSM/src/GSM.cpp @@ -48,14 +48,14 @@ mbed::CellularDevice *mbed::CellularDevice::get_default_instance() int arduino::GSMClass::begin(const char* pin, const char* apn, const char* username, const char* password, RadioAccessTechnologyType rat, uint32_t band, bool restart) { if(restart || isCmuxEnable()) { - pinMode(PJ_10, OUTPUT); - digitalWrite(PJ_10, HIGH); + pinMode(MBED_CONF_GEMALTO_CINTERION_RST, OUTPUT); + digitalWrite(MBED_CONF_GEMALTO_CINTERION_RST, HIGH); delay(800); - digitalWrite(PJ_10, LOW); - pinMode(PJ_7, OUTPUT); - digitalWrite(PJ_7, LOW); + digitalWrite(MBED_CONF_GEMALTO_CINTERION_RST, LOW); + pinMode(MBED_CONF_GEMALTO_CINTERION_ON, OUTPUT); + digitalWrite(MBED_CONF_GEMALTO_CINTERION_ON, LOW); delay(1); - digitalWrite(PJ_7, HIGH); + digitalWrite(MBED_CONF_GEMALTO_CINTERION_ON, HIGH); delay(1); // this timer is to make sure that at boottime and when the CMUX is used, // ^SYSTART is received in time to avoid stranger behaviour @@ -69,7 +69,7 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern printf("Invalid context\n"); return 0; } - pinMode(PJ_7, INPUT_PULLDOWN); + pinMode(MBED_CONF_GEMALTO_CINTERION_ON, INPUT_PULLDOWN); static mbed::DigitalOut rts(MBED_CONF_GEMALTO_CINTERION_RTS, 0); diff --git a/libraries/GSM/src/GSM.h b/libraries/GSM/src/GSM.h index e9e95fc77..278cb1e92 100644 --- a/libraries/GSM/src/GSM.h +++ b/libraries/GSM/src/GSM.h @@ -37,6 +37,8 @@ #define MBED_CONF_GEMALTO_CINTERION_RX PI_9 #define MBED_CONF_GEMALTO_CINTERION_RTS PI_10 #define MBED_CONF_GEMALTO_CINTERION_CTS PI_13 +#define MBED_CONF_GEMALTO_CINTERION_RST PJ_10 +#define MBED_CONF_GEMALTO_CINTERION_ON PJ_7 #define MBED_CONF_APP_SOCK_TYPE 1 #if defined __has_include