Zephyr API Documentation 4.5.0-rc1
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
12#ifndef ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_SMP_SHELL_H_
13#define ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_SMP_SHELL_H_
14
21
22#include <zephyr/device.h>
23#include <zephyr/kernel.h>
24#include <zephyr/types.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#define SMP_SHELL_RX_BUF_SIZE 127
31
39 struct net_buf *buf;
43 const struct shell_uart_common *uart;
44};
45
58size_t smp_shell_rx_bytes(struct smp_shell_data *data, const uint8_t *bytes,
59 size_t size);
60
69
79
80#ifdef __cplusplus
81}
82#endif
83
87
88#endif /* ZEPHYR_INCLUDE_MGMT_MCUMGR_TRANSPORT_SMP_SHELL_H_ */
APIs and macros for the Zephyr device model.
long atomic_t
Atomic integer variable.
Definition atomic_types.h:34
int smp_shell_init(void)
Initializes SMP transport over shell.
void smp_shell_process(struct smp_shell_data *data)
Processes SMP data and executes command if full frame was received.
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.
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Kernel FIFO structure.
Definition kernel.h:2951
Network buffer pool representation.
Definition net_buf.h:1190
Network buffer representation.
Definition net_buf.h:1054
Data used by SMP shell.
Definition smp_shell.h:33
struct net_buf * buf
Currently active receive buffer.
Definition smp_shell.h:39
struct k_fifo buf_ready
FIFO of frames ready to be processed.
Definition smp_shell.h:37
struct net_buf_pool * buf_pool
Network buffer pool for received frames.
Definition smp_shell.h:35
atomic_t esc_state
Which parts of the SMP over console frame have been detected.
Definition smp_shell.h:41
const struct shell_uart_common * uart
Receiving UART shell object.
Definition smp_shell.h:43