Skip to content

Commit 163b316

Browse files
committed
SATSE: Add separate function to configure debug
1 parent 779f1b3 commit 163b316

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libraries/SoftwareATSE/src/SoftwareATSE.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ int SoftwareATSEClass::begin(const char * name, bool readOnly, const char* parti
3434
{
3535
string res = "";
3636
modem.begin();
37-
modem.debug(Serial,2);
3837
if (name != nullptr && strlen(name) > 0) {
3938
if (modem.write(string(PROMPT(_SOFTSE_BEGIN)), res, "%s%s,%d,%s\r\n", CMD_WRITE(_SOFTSE_BEGIN), name, readOnly, partition_label != NULL ? partition_label : "")) {
4039
return atoi(res.c_str());
@@ -49,6 +48,11 @@ void SoftwareATSEClass::end()
4948
modem.write(string(PROMPT(_SOFTSE_END)), res, "%s", CMD(_SOFTSE_END));
5049
}
5150

51+
void SoftwareATSEClass::debug(Stream &u, uint8_t level)
52+
{
53+
modem.debug(u,level);
54+
}
55+
5256
String SoftwareATSEClass::serialNumber()
5357
{
5458
string res = "";

libraries/SoftwareATSE/src/SoftwareATSE.h

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class SoftwareATSEClass
3232
int begin(const char * name = "se", bool readOnly = false, const char* partition_label = NULL);
3333
void end();
3434

35+
void debug(Stream &u, uint8_t level = 0);
36+
3537
String serialNumber();
3638

3739
long random(long min, long max);

0 commit comments

Comments
 (0)