9#ifndef ZEPHYR_INCLUDE_SHELL_DUMMY_H_
10#define ZEPHYR_INCLUDE_SHELL_DUMMY_H_
27 char buf[CONFIG_SHELL_BACKEND_DUMMY_BUF_SIZE];
36 char input_buf[CONFIG_SHELL_BACKEND_DUMMY_BUF_SIZE];
39#define SHELL_DUMMY_DEFINE(_name) \
40 static struct shell_dummy _name##_shell_dummy; \
41 struct shell_transport _name = { \
42 .api = &shell_dummy_transport_api, \
43 .ctx = (struct shell_dummy *)&_name##_shell_dummy \
const struct shell * shell_backend_dummy_get_ptr(void)
This function shall not be used directly.
const struct shell_transport_api shell_dummy_transport_api
void shell_backend_dummy_clear_output(const struct shell *sh)
Clears the output buffer in the shell backend.
int shell_backend_dummy_push_input(const struct shell *sh, const char *data, size_t len)
Push input data to the dummy shell backend.
void shell_backend_dummy_clear_input(const struct shell *sh)
Clear the input buffer in the shell backend.
const char * shell_backend_dummy_get_output(const struct shell *sh, size_t *sizep)
Returns the buffered output in the shell and resets the pointer.
Definition shell_dummy.h:20
char input_buf[CONFIG_SHELL_BACKEND_DUMMY_BUF_SIZE]
input buffer for simulating user input
Definition shell_dummy.h:36
bool initialized
Definition shell_dummy.h:21
size_t len
current number of bytes in output buffer (0 if no output)
Definition shell_dummy.h:24
char buf[CONFIG_SHELL_BACKEND_DUMMY_BUF_SIZE]
output buffer to collect shell output
Definition shell_dummy.h:27
size_t input_len
current number of bytes in input buffer
Definition shell_dummy.h:30
size_t input_pos
current read position in input buffer
Definition shell_dummy.h:33
Unified shell transport interface.
Definition shell.h:818
Shell instance internals.
Definition shell.h:1063