7#ifndef ZEPHYR_INCLUDE_IPC_SERVICE_IPC_RPMSG_H_
8#define ZEPHYR_INCLUDE_IPC_SERVICE_IPC_RPMSG_H_
11#include <openamp/open_amp.h>
12#include <metal/device.h>
26#define NUM_ENDPOINTS CONFIG_IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE
47 struct rpmsg_endpoint
ep;
50 char name[RPMSG_NAME_SIZE];
74 struct rpmsg_virtio_device
rvdev;
110 unsigned int buffer_size,
111 struct metal_io_region *shm_io,
112 struct virtio_device *vdev,
113 void *shb,
size_t size,
114 rpmsg_ns_bind_cb ns_bind_cb);
int ipc_rpmsg_init(struct ipc_rpmsg_instance *instance, unsigned int role, unsigned int buffer_size, struct metal_io_region *shm_io, struct virtio_device *vdev, void *shb, size_t size, rpmsg_ns_bind_cb ns_bind_cb)
Init an RPMsg instance.
int ipc_rpmsg_register_ept(struct ipc_rpmsg_instance *instance, unsigned int role, struct ipc_rpmsg_ept *ept)
Register an endpoint.
void(* rpmsg_ept_bound_cb)(struct ipc_rpmsg_ept *ept)
Define the bound callback.
Definition ipc_rpmsg.h:39
#define NUM_ENDPOINTS
Number of endpoints.
Definition ipc_rpmsg.h:26
int ipc_rpmsg_deinit(struct ipc_rpmsg_instance *instance, unsigned int role)
Deinit an RPMsg instance.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Endpoint structure.
Definition ipc_rpmsg.h:45
char name[RPMSG_NAME_SIZE]
Name of the endpoint.
Definition ipc_rpmsg.h:50
struct rpmsg_endpoint ep
RPMsg endpoint.
Definition ipc_rpmsg.h:47
const struct ipc_service_cb * cb
Callbacks.
Definition ipc_rpmsg.h:59
volatile bool bound
Bound flag.
Definition ipc_rpmsg.h:56
void * priv
Private data to be passed to the endpoint callbacks.
Definition ipc_rpmsg.h:62
uint32_t dest
Destination endpoint.
Definition ipc_rpmsg.h:53
RPMsg instance structure.
Definition ipc_rpmsg.h:69
struct rpmsg_virtio_shm_pool shm_pool
SHM pool.
Definition ipc_rpmsg.h:77
rpmsg_ept_cb cb
EPT (instance) callback.
Definition ipc_rpmsg.h:83
rpmsg_ept_bound_cb bound_cb
EPT (instance) bound callback.
Definition ipc_rpmsg.h:80
struct rpmsg_virtio_device rvdev
RPMsg virtIO device.
Definition ipc_rpmsg.h:74
struct k_mutex mtx
Mutex for the instance.
Definition ipc_rpmsg.h:86
struct ipc_rpmsg_ept endpoint[CONFIG_IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE]
Endpoints in the instance.
Definition ipc_rpmsg.h:71
Event callback structure.
Definition ipc_service.h:145
Mutex Structure.
Definition kernel.h:3004