Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
IPC service RPMsg API

IPC service RPMsg API . More...

Data Structures

struct  ipc_rpmsg_ept
 Endpoint structure. More...
 
struct  ipc_rpmsg_instance
 RPMsg instance structure. More...
 

Macros

#define NUM_ENDPOINTS   CONFIG_IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE
 Number of endpoints.
 

Typedefs

typedef void(* rpmsg_ept_bound_cb) (struct ipc_rpmsg_ept *ept)
 Define the bound callback.
 

Functions

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_deinit (struct ipc_rpmsg_instance *instance, unsigned int role)
 Deinit an RPMsg instance.
 
int ipc_rpmsg_register_ept (struct ipc_rpmsg_instance *instance, unsigned int role, struct ipc_rpmsg_ept *ept)
 Register an endpoint.
 

Detailed Description

IPC service RPMsg API .

Macro Definition Documentation

◆ NUM_ENDPOINTS

#define NUM_ENDPOINTS   CONFIG_IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE

#include <zephyr/ipc/ipc_rpmsg.h>

Number of endpoints.

Typedef Documentation

◆ rpmsg_ept_bound_cb

typedef void(* rpmsg_ept_bound_cb) (struct ipc_rpmsg_ept *ept)

#include <zephyr/ipc/ipc_rpmsg.h>

Define the bound callback.

This callback is defined at instance level and it is called when an endpoint of the instance is bound.

Parameters
eptEndpoint of the instance just bound.

Function Documentation

◆ ipc_rpmsg_deinit()

int ipc_rpmsg_deinit ( struct ipc_rpmsg_instance * instance,
unsigned int role )

#include <zephyr/ipc/ipc_rpmsg.h>

Deinit an RPMsg instance.

Parameters
instancePointer to the RPMsg instance struct.
roleHost / Remote role.
Return values
-EINVALWhen some parameter is missing
0If successful

◆ ipc_rpmsg_init()

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 )

#include <zephyr/ipc/ipc_rpmsg.h>

Init an RPMsg instance.

Init an RPMsg instance.

Parameters
instancePointer to the RPMsg instance struct.
roleHost / Remote role.
buffer_sizeSize of the buffer used to send data between host and remote.
shm_ioSHM IO region pointer.
vdevVirtIO device pointer.
shbShared memory region pointer.
sizeSize of the shared memory region.
ns_bind_cbcallback handler for name service announcement without local endpoints waiting to bind. If NULL the implementation falls back to the internal implementation.
Return values
-EINVALWhen some parameter is missing.
0If successful.
Othererrno codes depending on the OpenAMP implementation.

◆ ipc_rpmsg_register_ept()

int ipc_rpmsg_register_ept ( struct ipc_rpmsg_instance * instance,
unsigned int role,
struct ipc_rpmsg_ept * ept )

#include <zephyr/ipc/ipc_rpmsg.h>

Register an endpoint.

Register an endpoint to a provided RPMsg instance.

Parameters
instancePointer to the RPMsg instance struct.
roleHost / Remote role.
eptEndpoint to register.
Return values
-EINVALWhen some parameter is missing.
0If successful.
Othererrno codes depending on the OpenAMP implementation.