Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Shell transport for the mcumgr SMP protocol. More...
#include <zephyr/types.h>
Go to the source code of this file.
Data Structures | |
struct | smp_shell_data |
Data used by SMP shell. More... | |
Macros | |
#define | SMP_SHELL_RX_BUF_SIZE 127 |
Functions | |
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. | |
void | smp_shell_process (struct smp_shell_data *data) |
Processes SMP data and executes command if full frame was received. | |
int | smp_shell_init (void) |
Initializes SMP transport over shell. | |
Shell transport for the mcumgr SMP protocol.
#define SMP_SHELL_RX_BUF_SIZE 127 |
int smp_shell_init | ( | void | ) |
Initializes SMP transport over shell.
This function should be called before feeding SMP transport with received data.
void smp_shell_process | ( | struct smp_shell_data * | data | ) |
Processes SMP data and executes command if full frame was received.
This function should be called from thread context.
data | SMP shell transfer data. |
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.
Called to scan buffer from the beginning and consume all bytes that are part of SMP frame until frame or buffer ends.
data | SMP shell transfer data. |
bytes | Buffer with bytes to process |
size | Number of bytes to process |