Zephyr Project API
3.7.0
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
20
extern
"C"
{
21
#endif
22
26
struct
uart_mcumgr_rx_buf
{
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
41
typedef
void
uart_mcumgr_recv_fn
(
struct
uart_mcumgr_rx_buf
*rx_buf);
42
51
int
uart_mcumgr_send
(
const
uint8_t
*
data
,
int
len);
52
58
void
uart_mcumgr_free_rx_buf
(
struct
uart_mcumgr_rx_buf
*rx_buf);
59
69
void
uart_mcumgr_register
(
uart_mcumgr_recv_fn
*cb);
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
types.h
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
stdlib.h
uart_mcumgr_rx_buf
Contains an mcumgr fragment received over UART.
Definition
uart_mcumgr.h:26
uart_mcumgr_rx_buf::length
int length
Definition
uart_mcumgr.h:29
uart_mcumgr_rx_buf::data
uint8_t data[CONFIG_UART_MCUMGR_RX_BUF_SIZE]
Definition
uart_mcumgr.h:28
uart_mcumgr_rx_buf::fifo_reserved
void * fifo_reserved
Definition
uart_mcumgr.h:27
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
uart_mcumgr_register
void uart_mcumgr_register(uart_mcumgr_recv_fn *cb)
Registers an mcumgr UART receive handler.
uart_mcumgr_recv_fn
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
uart_mcumgr_send
int uart_mcumgr_send(const uint8_t *data, int len)
Sends an mcumgr packet over UART.
uart_mcumgr_free_rx_buf
void uart_mcumgr_free_rx_buf(struct uart_mcumgr_rx_buf *rx_buf)
Frees the supplied receive buffer.
include
zephyr
drivers
console
uart_mcumgr.h
Generated on Sun Sep 15 2024 17:01:29 for Zephyr Project API by
1.9.8