13#ifndef ZEPHYR_INCLUDE_SHELL_RPMSG_H_
14#define ZEPHYR_INCLUDE_SHELL_RPMSG_H_
18#include <openamp/rpmsg.h>
49 struct rpmsg_endpoint
ept;
64#define SHELL_RPMSG_DEFINE(_name) \
65 static struct shell_rpmsg _name##_shell_rpmsg; \
66 struct shell_transport _name = { \
67 .api = &shell_rpmsg_transport_api, \
68 .ctx = (struct shell_rpmsg *)&_name##_shell_rpmsg, \
void(* shell_transport_handler_t)(enum shell_transport_evt evt, void *context)
Definition shell.h:795
const struct shell * shell_backend_rpmsg_get_ptr(void)
This function provides pointer to shell RPMsg backend instance.
const struct shell_transport_api shell_rpmsg_transport_api
int shell_backend_rpmsg_init_transport(struct rpmsg_device *rpmsg_dev)
Initialize the Shell backend using the provided rpmsg_dev device.
Message Queue Structure.
Definition kernel.h:5169
RPMsg received message placeholder.
Definition shell_rpmsg.h:27
size_t len
The length of the data.
Definition shell_rpmsg.h:31
void * data
Pointer to the data held by RPMsg endpoint.
Definition shell_rpmsg.h:29
RPMsg-based shell transport.
Definition shell_rpmsg.h:35
struct shell_rpmsg_rx rx_cur
The current rx message.
Definition shell_rpmsg.h:58
size_t rx_consumed
The number of bytes consumed from rx_cur.
Definition shell_rpmsg.h:61
shell_transport_handler_t shell_handler
Handler function registered by shell.
Definition shell_rpmsg.h:37
struct shell_rpmsg_rx rx_buf[CONFIG_SHELL_RPMSG_MAX_RX]
Buffer for received messages.
Definition shell_rpmsg.h:55
struct k_msgq rx_q
Queue for received data.
Definition shell_rpmsg.h:52
bool blocking
Setting for blocking mode.
Definition shell_rpmsg.h:46
bool ready
Indicator if we are ready to read/write.
Definition shell_rpmsg.h:43
void * shell_context
Context registered by shell.
Definition shell_rpmsg.h:40
struct rpmsg_endpoint ept
RPMsg endpoint.
Definition shell_rpmsg.h:49
Unified shell transport interface.
Definition shell.h:818
Shell instance internals.
Definition shell.h:1063