Skip to content

Commit 337b811

Browse files
author
merge
committed
add the possibility to customize the delimiter of the ATHandler in ATCellularDevice class
1 parent 47a32a0 commit 337b811

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AT_CellularDevice : public CellularDevice {
6767
};
6868

6969
public:
70-
AT_CellularDevice(FileHandle *fh);
70+
AT_CellularDevice(FileHandle *fh, char* delim = "\r");
7171
virtual ~AT_CellularDevice();
7272

7373
virtual nsapi_error_t clear();

connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ using namespace std::chrono_literals;
3939
#define DEFAULT_AT_TIMEOUT 1s // at default timeout
4040
const int MAX_SIM_RESPONSE_LENGTH = 16;
4141

42-
AT_CellularDevice::AT_CellularDevice(FileHandle *fh) :
42+
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char* delim):
4343
CellularDevice(),
44-
_at(fh, _queue, DEFAULT_AT_TIMEOUT, "\r"),
44+
_at(fh, _queue, DEFAULT_AT_TIMEOUT, delim),
4545
#if MBED_CONF_CELLULAR_USE_SMS
4646
_sms(0),
4747
#endif // MBED_CONF_CELLULAR_USE_SMS

0 commit comments

Comments
 (0)