driver: modem: Print sent data if verbose debugging is enabled
User is currently able to enable verbose packet debugging for received packets. This commit enables the same for sent packets. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
17b19eb810
commit
ded0ea62a1
1 changed files with 14 additions and 0 deletions
|
@ -400,6 +400,20 @@ static int _modem_cmd_send(struct modem_iface *iface,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_MODEM_CONTEXT_VERBOSE_DEBUG)
|
||||||
|
LOG_HEXDUMP_DBG(buf, strlen(buf), "SENT DATA");
|
||||||
|
|
||||||
|
if (data->eol_len > 0) {
|
||||||
|
if (data->eol[0] != '\r') {
|
||||||
|
/* Print the EOL only if it is not \r, otherwise there
|
||||||
|
* is just too much printing.
|
||||||
|
*/
|
||||||
|
LOG_HEXDUMP_DBG(data->eol, data->eol_len, "SENT EOL");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOG_DBG("EOL not set!!!");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
iface->write(iface, buf, strlen(buf));
|
iface->write(iface, buf, strlen(buf));
|
||||||
iface->write(iface, data->eol, data->eol_len);
|
iface->write(iface, data->eol, data->eol_len);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue