Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
smp_shell.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
11
#ifndef ZEPHYR_INCLUDE_MGMT_SMP_SHELL_H_
12
#define ZEPHYR_INCLUDE_MGMT_SMP_SHELL_H_
13
14
#include <
zephyr/kernel.h
>
15
#include <
zephyr/types.h
>
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
#define SMP_SHELL_RX_BUF_SIZE 127
22
24
struct
smp_shell_data
{
25
struct
net_buf_pool
*
buf_pool
;
26
struct
k_fifo
buf_ready
;
27
struct
net_buf
*
buf
;
28
atomic_t
esc_state
;
29
};
30
43
size_t
smp_shell_rx_bytes
(
struct
smp_shell_data
*
data
,
const
uint8_t
*bytes,
44
size_t
size
);
45
53
void
smp_shell_process
(
struct
smp_shell_data
*
data
);
54
63
int
smp_shell_init
(
void
);
64
65
#ifdef __cplusplus
66
}
67
#endif
68
69
#endif
atomic_t
long atomic_t
Definition
atomic_types.h:15
types.h
kernel.h
Public kernel APIs.
smp_shell_init
int smp_shell_init(void)
Initializes SMP transport over shell.
smp_shell_process
void smp_shell_process(struct smp_shell_data *data)
Processes SMP data and executes command if full frame was received.
smp_shell_rx_bytes
size_t smp_shell_rx_bytes(struct smp_shell_data *data, const uint8_t *bytes, size_t size)
Attempt to process received bytes as part of an SMP frame.
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
k_fifo
Definition
kernel.h:2524
net_buf_pool
Network buffer pool representation.
Definition
net_buf.h:1078
net_buf
Network buffer representation.
Definition
net_buf.h:1006
net_buf::size
uint16_t size
Amount of data that this buffer can store.
Definition
net_buf.h:1038
smp_shell_data
Data used by SMP shell.
Definition
smp_shell.h:24
smp_shell_data::buf
struct net_buf * buf
Definition
smp_shell.h:27
smp_shell_data::buf_ready
struct k_fifo buf_ready
Definition
smp_shell.h:26
smp_shell_data::buf_pool
struct net_buf_pool * buf_pool
Definition
smp_shell.h:25
smp_shell_data::esc_state
atomic_t esc_state
Definition
smp_shell.h:28
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
zephyr
mgmt
mcumgr
transport
smp_shell.h
Generated on Mon Apr 21 2025 11:55:49 for Zephyr API Documentation by
1.12.0