14#ifndef ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_H_
15#define ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_H_
33#ifndef CONFIG_SHELL_REMOTE_TMP_BUF_SIZE
35#define CONFIG_SHELL_REMOTE_TMP_BUF_SIZE 128
100#define SHELL_REMOTE_CONN(_name, ipc_node) \
101 static struct shell_remote_data shell_remote_data_##_name; \
102 static const STRUCT_SECTION_ITERABLE(shell_remote, _name) = { \
103 .name = STRINGIFY(_name), .ipc = DEVICE_DT_GET(ipc_node), \
104 .ep_cfg = {.name = CONFIG_SHELL_REMOTE_EP_NAME, \
107 .bound = shell_remote_ep_bound, \
108 .received = shell_remote_ep_recv, \
110 .priv = &shell_remote_data_##_name}}
135 uint8_t argc,
const char **argv,
size_t cmd_lvl);
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
#define CONFIG_SHELL_REMOTE_TMP_BUF_SIZE
Default size of the temporary buffer for remote shell command data.
Definition shell_remote.h:35
void shell_remote_ep_bound(void *priv)
Callback function to handle the bound event of the remote shell instance.
void shell_remote_ep_recv(const void *data, size_t len, void *priv)
Callback function to handle the received event of the remote shell instance.
Common APIs for the remote shell.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
Endpoint configuration structure.
Definition ipc_service.h:206
Endpoint instance.
Definition ipc_service.h:196
Semaphore structure.
Definition kernel.h:3663
A structure used to submit work.
Definition kernel.h:4561
Structure to store the data for the remote shell command.
Definition shell_remote.h:39
struct shell_static_entry cmd
Command entry.
Definition shell_remote.h:41
char tmp_buf[128]
Temporary buffer for the command syntax and help text.
Definition shell_remote.h:47
const struct shell_static_entry * rem_cmd
Pointer to the parent remote command.
Definition shell_remote.h:44
Structure to store the data for the remote shell instance.
Definition shell_remote.h:51
struct shell_remote_cmd * current_cmd
Pointer to the current command.
Definition shell_remote.h:68
size_t msg_len
Length of the print message.
Definition shell_remote.h:74
struct ipc_ept ept
IPC endpoint.
Definition shell_remote.h:53
bool ready
Flag to indicate if the remote shell instance is ready (bounded).
Definition shell_remote.h:80
const struct shell * sh
Pointer to the shell instance.
Definition shell_remote.h:62
struct k_work work
Work queue to process the print messages.
Definition shell_remote.h:59
int result
Result of the last command.
Definition shell_remote.h:71
struct shell_remote_cmd cmds[2]
Space to store the two most recent commands (current and parent).
Definition shell_remote.h:65
void * msg
Pointer to the print message (heap allocated).
Definition shell_remote.h:77
struct k_sem sem
Semaphore to synchronize the access to the remote shell instance.
Definition shell_remote.h:56
Structure to store the configuration for the remote shell instance.
Definition shell_remote.h:84
struct ipc_ept_cfg ep_cfg
IPC endpoint configuration.
Definition shell_remote.h:92
const char * name
Name of the remote shell instance (command syntax).
Definition shell_remote.h:86
const struct device * ipc
IPC device.
Definition shell_remote.h:89
Shell instance internals.
Definition shell.h:1076