Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
uart_mcumgr.h
Go to the documentation of this file.
1/*
2 * Copyright Runtime.io 2018. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
13#ifndef ZEPHYR_INCLUDE_DRIVERS_CONSOLE_UART_MCUMGR_H_
14#define ZEPHYR_INCLUDE_DRIVERS_CONSOLE_UART_MCUMGR_H_
15
16#include <stdlib.h>
17#include <zephyr/types.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27 void *fifo_reserved; /* 1st word reserved for use by fifo */
28 uint8_t data[CONFIG_UART_MCUMGR_RX_BUF_SIZE];
29 int length;
30};
31
41typedef void uart_mcumgr_recv_fn(struct uart_mcumgr_rx_buf *rx_buf);
42
51int uart_mcumgr_send(const uint8_t *data, int len);
52
59
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
Contains an mcumgr fragment received over UART.
Definition: uart_mcumgr.h:26
int length
Definition: uart_mcumgr.h:29
uint8_t data[CONFIG_UART_MCUMGR_RX_BUF_SIZE]
Definition: uart_mcumgr.h:28
void * fifo_reserved
Definition: uart_mcumgr.h:27
void uart_mcumgr_register(uart_mcumgr_recv_fn *cb)
Registers an mcumgr UART receive handler.
void uart_mcumgr_recv_fn(struct uart_mcumgr_rx_buf *rx_buf)
Function that gets called when an mcumgr packet is received.
Definition: uart_mcumgr.h:41
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.