Skip to content

Commit d994efc

Browse files
authored
Merge pull request #15273 from Tobi15/main
add the possibility to customize the delimiter of the ATHandler in AT…
2 parents 6170f55 + 73f2dd6 commit d994efc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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

connectivity/cellular/tests/UNITTESTS/doubles/AT_CellularDevice_stub.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ bool AT_CellularDevice_stub::pin_needed = false;
3333
bool AT_CellularDevice_stub::supported_bool = false;
3434
int AT_CellularDevice_stub::max_sock_value = 1;
3535

36-
AT_CellularDevice::AT_CellularDevice(FileHandle *fh) :
36+
AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim) :
3737
CellularDevice(),
38-
_at(fh, _queue, get_property(AT_CellularDevice::PROPERTY_AT_SEND_DELAY), "\r"),
38+
_at(fh, _queue, get_property(AT_CellularDevice::PROPERTY_AT_SEND_DELAY), delim),
3939
#if MBED_CONF_CELLULAR_USE_SMS
4040
_sms(0),
4141
#endif // MBED_CONF_CELLULAR_USE_SMS

0 commit comments

Comments
 (0)