File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
#include <zephyr/mgmt/mcumgr/transport/serial.h>
16
16
#include <zephyr/drivers/console/uart_mcumgr.h>
17
17
18
+ #include <zephyr/logging/log.h>
19
+ LOG_MODULE_REGISTER (uart_mcumgr , CONFIG_MCUMGR_TRANSPORT_LOG_LEVEL );
20
+
18
21
static const struct device * const uart_mcumgr_dev =
19
22
DEVICE_DT_GET (DT_CHOSEN (zephyr_uart_mcumgr ));
20
23
@@ -89,7 +92,7 @@ static struct uart_mcumgr_rx_buf *uart_mcumgr_rx_byte(uint8_t byte)
89
92
if (uart_mcumgr_cur_buf == NULL ) {
90
93
uart_mcumgr_cur_buf = uart_mcumgr_alloc_rx_buf ();
91
94
if (uart_mcumgr_cur_buf == NULL ) {
92
- /* Insufficient buffers; drop this fragment. */
95
+ LOG_WRN ( " Insufficient buffers, fragment dropped" );
93
96
uart_mcumgr_ignoring = true;
94
97
}
95
98
}
@@ -98,7 +101,7 @@ static struct uart_mcumgr_rx_buf *uart_mcumgr_rx_byte(uint8_t byte)
98
101
rx_buf = uart_mcumgr_cur_buf ;
99
102
if (!uart_mcumgr_ignoring ) {
100
103
if (rx_buf -> length >= sizeof (rx_buf -> data )) {
101
- /* Line too long; drop this fragment. */
104
+ LOG_WRN ( " Line too long, fragment dropped" );
102
105
uart_mcumgr_free_rx_buf (uart_mcumgr_cur_buf );
103
106
uart_mcumgr_cur_buf = NULL ;
104
107
uart_mcumgr_ignoring = true;
You can’t perform that action at this time.
0 commit comments