Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
3.0.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
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:58
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
drivers
console
uart_mcumgr.h
Generated on Mon Feb 21 2022 22:43:01 for Zephyr API Documentation by
1.9.2