Skip to content

Commit 69efed2

Browse files
author
Hasnain Virk
committed
Marking TX and RX pins for UARTSerial as NC
For default construction of the driver, it would be necessary to define the pins. However as we don't know the correct pins, until/unless user sets them up for us. So it makes sense to mark the pins as NC. It would be easier to debug if the pins are set to NC if user forgot to set them up.
1 parent 7ebfa90 commit 69efed2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

features/cellular/framework/targets/QUECTEL/EC2X/QUECTEL_EC2X.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "PinNames.h"
2121
#include "AT_CellularNetwork.h"
2222
#include "rtos/ThisThread.h"
23+
#include "UARTSerial.h"
2324

2425
using namespace mbed;
2526
using namespace rtos;
@@ -33,6 +34,14 @@ using namespace events;
3334
#define MBED_CONF_QUECTEL_EC2X_RST NC
3435
#endif
3536

37+
#if !defined(MBED_CONF_QUECTEL_EC2X_TX)
38+
#define MBED_CONF_QUECTEL_EC2X_TX NC
39+
#endif
40+
41+
#if !defined(MBED_CONF_QUECTEL_EC2X_RX)
42+
#define MBED_CONF_QUECTEL_EC2X_RX NC
43+
#endif
44+
3645
#if !defined(MBED_CONF_QUECTEL_EC2X_POLARITY)
3746
#define MBED_CONF_QUECTEL_EC2X_POLARITY 1 // active high
3847
#endif
@@ -64,7 +73,6 @@ QUECTEL_EC2X::QUECTEL_EC2X(FileHandle *fh, PinName pwr, bool active_high, PinNam
6473
AT_CellularBase::set_cellular_properties(cellular_properties);
6574
}
6675

67-
#include "UARTSerial.h"
6876
CellularDevice *CellularDevice::get_default_instance()
6977
{
7078
static UARTSerial serial(MBED_CONF_QUECTEL_EC2X_TX,

0 commit comments

Comments
 (0)