Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
A driver for sending and receiving mcumgr packets over UART. More...
Go to the source code of this file.
Data Structures | |
struct | uart_mcumgr_rx_buf |
Contains an mcumgr fragment received over UART. More... | |
Typedefs | |
typedef void | uart_mcumgr_recv_fn(struct uart_mcumgr_rx_buf *rx_buf) |
Function that gets called when an mcumgr packet is received. | |
Functions | |
int | uart_mcumgr_send (const uint8_t *data, int len) |
Sends an mcumgr packet over UART. | |
void | uart_mcumgr_free_rx_buf (struct uart_mcumgr_rx_buf *rx_buf) |
Frees the supplied receive buffer. | |
void | uart_mcumgr_register (uart_mcumgr_recv_fn *cb) |
Registers an mcumgr UART receive handler. | |
A driver for sending and receiving mcumgr packets over UART.
typedef void uart_mcumgr_recv_fn(struct uart_mcumgr_rx_buf *rx_buf) |
Function that gets called when an mcumgr packet is received.
Function that gets called when an mcumgr packet is received. This function gets called in the interrupt context. Ownership of the specified buffer is transferred to the callback when this function gets called.
rx_buf | A buffer containing the incoming mcumgr packet. |
void uart_mcumgr_free_rx_buf | ( | struct uart_mcumgr_rx_buf * | rx_buf | ) |
Frees the supplied receive buffer.
rx_buf | The buffer to free. |
void uart_mcumgr_register | ( | uart_mcumgr_recv_fn * | cb | ) |
Registers an mcumgr UART receive handler.
Configures the mcumgr UART driver to call the specified function when an mcumgr request packet is received.
cb | The callback to execute when an mcumgr request packet is received. |
int uart_mcumgr_send | ( | const uint8_t * | data, |
int | len ) |
Sends an mcumgr packet over UART.
data | Buffer containing the mcumgr packet to send. |
len | The length of the buffer, in bytes. |