|
Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
RPMsg service API. More...
Functions | |
| int | rpmsg_service_register_endpoint (const char *name, rpmsg_ept_cb cb) |
| Register IPC endpoint. More... | |
| int | rpmsg_service_send (int endpoint_id, const void *data, size_t len) |
| Send data using given IPC endpoint. More... | |
| bool | rpmsg_service_endpoint_is_bound (int endpoint_id) |
| Check if endpoint is bound. More... | |
RPMsg service API.
| bool rpmsg_service_endpoint_is_bound | ( | int | endpoint_id | ) |
#include <include/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.
| endpoint_id | Id of registered endpoint, obtained by rpmsg_service_register_endpoint |
| true | endpoint is bound |
| false | endpoint not bound |
| int rpmsg_service_register_endpoint | ( | const char * | name, |
| rpmsg_ept_cb | cb | ||
| ) |
#include <include/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.
| name | String containing the name of the endpoint. Must be identical for master and slave |
| cb | Callback executed when data are available on given endpoint |
| >=0 | id of registered endpoint on success; |
| -EINPROGRESS | when requested to register an endpoint after endpoints creation procedure has started; |
| -ENOMEM | when there is not enough slots to register the endpoint; |
| <0 | an other negative errno code, reported by rpmsg. |
| int rpmsg_service_send | ( | int | endpoint_id, |
| const void * | data, | ||
| size_t | len | ||
| ) |
#include <include/ipc/rpmsg_service.h>
Send data using given IPC endpoint.
| endpoint_id | Id of registered endpoint, obtained by rpmsg_service_register_endpoint |
| data | Pointer to the buffer to send through RPMsg service |
| len | Number of bytes to send. |
| >=0 | number of sent bytes; |
| <0 | an error code, reported by rpmsg. |