Skip to content

Commit 5131eef

Browse files
committed
GSM: use define for RESET and power ON pin
1 parent 2cb24df commit 5131eef

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

libraries/GSM/src/GSM.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ mbed::CellularDevice *mbed::CellularDevice::get_default_instance()
4848
int arduino::GSMClass::begin(const char* pin, const char* apn, const char* username, const char* password, RadioAccessTechnologyType rat, uint32_t band, bool restart) {
4949

5050
if(restart || isCmuxEnable()) {
51-
pinMode(PJ_10, OUTPUT);
52-
digitalWrite(PJ_10, HIGH);
51+
pinMode(MBED_CONF_GEMALTO_CINTERION_RST, OUTPUT);
52+
digitalWrite(MBED_CONF_GEMALTO_CINTERION_RST, HIGH);
5353
delay(800);
54-
digitalWrite(PJ_10, LOW);
55-
pinMode(PJ_7, OUTPUT);
56-
digitalWrite(PJ_7, LOW);
54+
digitalWrite(MBED_CONF_GEMALTO_CINTERION_RST, LOW);
55+
pinMode(MBED_CONF_GEMALTO_CINTERION_ON, OUTPUT);
56+
digitalWrite(MBED_CONF_GEMALTO_CINTERION_ON, LOW);
5757
delay(1);
58-
digitalWrite(PJ_7, HIGH);
58+
digitalWrite(MBED_CONF_GEMALTO_CINTERION_ON, HIGH);
5959
delay(1);
6060
// this timer is to make sure that at boottime and when the CMUX is used,
6161
// ^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
6969
printf("Invalid context\n");
7070
return 0;
7171
}
72-
pinMode(PJ_7, INPUT_PULLDOWN);
72+
pinMode(MBED_CONF_GEMALTO_CINTERION_ON, INPUT_PULLDOWN);
7373

7474
static mbed::DigitalOut rts(MBED_CONF_GEMALTO_CINTERION_RTS, 0);
7575

libraries/GSM/src/GSM.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#define MBED_CONF_GEMALTO_CINTERION_RX PI_9
3838
#define MBED_CONF_GEMALTO_CINTERION_RTS PI_10
3939
#define MBED_CONF_GEMALTO_CINTERION_CTS PI_13
40+
#define MBED_CONF_GEMALTO_CINTERION_RST PJ_10
41+
#define MBED_CONF_GEMALTO_CINTERION_ON PJ_7
4042
#define MBED_CONF_APP_SOCK_TYPE 1
4143

4244
#if defined __has_include

0 commit comments

Comments
 (0)