Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
RPMsg service APIs

RPMsg service API. More...

Functions

int rpmsg_service_register_endpoint (const char *name, rpmsg_ept_cb cb)
 Register IPC endpoint.
 
int rpmsg_service_send (int endpoint_id, const void *data, size_t len)
 Send data using given IPC endpoint.
 
bool rpmsg_service_endpoint_is_bound (int endpoint_id)
 Check if endpoint is bound.
 

Detailed Description

RPMsg service API.

Function Documentation

◆ rpmsg_service_endpoint_is_bound()

bool rpmsg_service_endpoint_is_bound ( int  endpoint_id)

#include <include/zephyr/ipc/rpmsg_service.h>

Check if endpoint is bound.

Checks if remote endpoint has been created and the master has bound its endpoint to it.

Parameters
endpoint_idId of registered endpoint, obtained by rpmsg_service_register_endpoint
Return values
trueendpoint is bound
falseendpoint not bound

◆ rpmsg_service_register_endpoint()

int rpmsg_service_register_endpoint ( const char *  name,
rpmsg_ept_cb  cb 
)

#include <include/zephyr/ipc/rpmsg_service.h>

Register IPC endpoint.

Registers IPC endpoint to enable communication with a remote device. The endpoint is created when the slave device registers it.

The same function registers endpoints for both master and slave devices.

Parameters
nameString containing the name of the endpoint. Must be identical for master and slave
cbCallback executed when data are available on given endpoint
Return values
>=0id of registered endpoint on success;
-EINPROGRESSwhen requested to register an endpoint after endpoints creation procedure has started;
-ENOMEMwhen there is not enough slots to register the endpoint;
<0an other negative errno code, reported by rpmsg.

◆ rpmsg_service_send()

int rpmsg_service_send ( int  endpoint_id,
const void *  data,
size_t  len 
)

#include <include/zephyr/ipc/rpmsg_service.h>

Send data using given IPC endpoint.

Parameters
endpoint_idId of registered endpoint, obtained by rpmsg_service_register_endpoint
dataPointer to the buffer to send through RPMsg service
lenNumber of bytes to send.
Return values
>=0number of sent bytes;
<0an error code, reported by rpmsg.