Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
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
12
#ifndef ZEPHYR_INCLUDE_MGMT_SMP_SHELL_H_
13
#define ZEPHYR_INCLUDE_MGMT_SMP_SHELL_H_
14
21
22
#include <
zephyr/kernel.h
>
23
#include <
zephyr/types.h
>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
#define SMP_SHELL_RX_BUF_SIZE 127
30
32
struct
smp_shell_data
{
33
struct
net_buf_pool
*
buf_pool
;
34
struct
k_fifo
buf_ready
;
35
struct
net_buf
*
buf
;
36
atomic_t
esc_state
;
37
};
38
51
size_t
smp_shell_rx_bytes
(
struct
smp_shell_data
*
data
,
const
uint8_t
*bytes,
52
size_t
size
);
53
61
void
smp_shell_process
(
struct
smp_shell_data
*
data
);
62
71
int
smp_shell_init
(
void
);
72
73
#ifdef __cplusplus
74
}
75
#endif
76
80
81
#endif
atomic_t
long atomic_t
Atomic integer variable.
Definition
atomic_types.h:31
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.
types.h
kernel.h
Public kernel APIs.
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
k_fifo
Kernel FIFO structure.
Definition
kernel.h:2948
net_buf_pool
Network buffer pool representation.
Definition
net_buf.h:1151
net_buf
Network buffer representation.
Definition
net_buf.h:1015
net_buf::size
uint16_t size
Amount of data that this buffer can store.
Definition
net_buf.h:1110
net_buf::data
uint8_t * data
Pointer to the start of data in the buffer.
Definition
net_buf.h:1104
smp_shell_data
Data used by SMP shell.
Definition
smp_shell.h:32
smp_shell_data::buf
struct net_buf * buf
Definition
smp_shell.h:35
smp_shell_data::buf_ready
struct k_fifo buf_ready
Definition
smp_shell.h:34
smp_shell_data::buf_pool
struct net_buf_pool * buf_pool
Definition
smp_shell.h:33
smp_shell_data::esc_state
atomic_t esc_state
Definition
smp_shell.h:36
zephyr
mgmt
mcumgr
transport
smp_shell.h
Generated on
for Zephyr API by
1.17.0