Skip to content

Commit 1b14351

Browse files
author
Cruz Monrreal
authored
Merge pull request #7084 from AriParkkila/cellular-debug
Cellular: Enable AT debug also when mbed-trace is disabled
2 parents b989afa + 7482032 commit 1b14351

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,23 +1086,27 @@ void ATHandler::flush()
10861086

10871087
void ATHandler::debug_print(char *p, int len)
10881088
{
1089-
#if MBED_CONF_MBED_TRACE_ENABLE
1089+
#if MBED_CONF_CELLULAR_DEBUG_AT
10901090
if (_debug_on) {
1091+
#if MBED_CONF_MBED_TRACE_ENABLE
10911092
mbed_cellular_trace::mutex_wait();
1093+
#endif
10921094
for (ssize_t i = 0; i < len; i++) {
10931095
char c = *p++;
10941096
if (!isprint(c)) {
10951097
if (c == '\r') {
1098+
debug("\n");
10961099
} else if (c == '\n') {
1097-
debug("%c", c);
10981100
} else {
10991101
debug("[%d]", c);
11001102
}
11011103
} else {
11021104
debug("%c", c);
11031105
}
11041106
}
1107+
#if MBED_CONF_MBED_TRACE_ENABLE
11051108
mbed_cellular_trace::mutex_release();
1106-
}
11071109
#endif
1110+
}
1111+
#endif // MBED_CONF_CELLULAR_DEBUG_AT
11081112
}

0 commit comments

Comments
 (0)