Skip to content

Commit 8e037fd

Browse files
hasheddankartben
authored andcommitted
drivers: console: uart_mcumgr: rename callback
Updates uart_mgumgr_recv_cb to uart_mcumgr_recv_cb to reflect the context in which it is used. Signed-off-by: Daniel Mangum <[email protected]>
1 parent 95edcf7 commit 8e037fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/console/uart_mcumgr.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static const struct device *const uart_mcumgr_dev =
1919
DEVICE_DT_GET(DT_CHOSEN(zephyr_uart_mcumgr));
2020

2121
/** Callback to execute when a valid fragment has been received. */
22-
static uart_mcumgr_recv_fn *uart_mgumgr_recv_cb;
22+
static uart_mcumgr_recv_fn *uart_mcumgr_recv_cb;
2323

2424
/** Contains the fragment currently being received. */
2525
static struct uart_mcumgr_rx_buf *uart_mcumgr_cur_buf;
@@ -140,7 +140,7 @@ static void uart_mcumgr_async(const struct device *dev, struct uart_event *evt,
140140
for (int i = 0; i < len; i++) {
141141
rx_buf = uart_mcumgr_rx_byte(p[i]);
142142
if (rx_buf != NULL) {
143-
uart_mgumgr_recv_cb(rx_buf);
143+
uart_mcumgr_recv_cb(rx_buf);
144144
}
145145
}
146146
break;
@@ -190,7 +190,7 @@ static void uart_mcumgr_isr(const struct device *unused, void *user_data)
190190
for (i = 0; i < chunk_len; i++) {
191191
rx_buf = uart_mcumgr_rx_byte(buf[i]);
192192
if (rx_buf != NULL) {
193-
uart_mgumgr_recv_cb(rx_buf);
193+
uart_mcumgr_recv_cb(rx_buf);
194194
}
195195
}
196196
}
@@ -239,7 +239,7 @@ static void uart_mcumgr_setup(const struct device *uart)
239239

240240
void uart_mcumgr_register(uart_mcumgr_recv_fn *cb)
241241
{
242-
uart_mgumgr_recv_cb = cb;
242+
uart_mcumgr_recv_cb = cb;
243243

244244
if (device_is_ready(uart_mcumgr_dev)) {
245245
uart_mcumgr_setup(uart_mcumgr_dev);

0 commit comments

Comments
 (0)