|
Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
RPMsg multiple instance API. More...
Data Structures | |
| struct | rpmsg_mi_cb |
| Event callback structure. More... | |
| struct | rpmsg_mi_ept |
| Endpoint instance. More... | |
| struct | rpmsg_mi_ept_cfg |
| Endpoint configuration. More... | |
| struct | rpmsg_mi_ctx |
| Struct describing the context of the RPMsg instance. More... | |
| struct | rpmsg_mi_ctx_shm_cfg |
| struct | rpmsg_mi_ctx_cfg |
| Configuration of the RPMsg instance. More... | |
Macros | |
| #define | VDEV_START_ADDR CONFIG_RPMSG_MULTI_INSTANCE_SHM_BASE_ADDRESS |
| #define | VDEV_SIZE CONFIG_RPMSG_MULTI_INSTANCE_SHM_SIZE |
| #define | SHM_START_ADDR VDEV_START_ADDR |
| #define | SHM_SIZE VDEV_SIZE |
| #define | VRING_ALIGNMENT (4) |
| #define | VDEV_STATUS_SIZE (0x4) |
Functions | |
| int | rpmsg_mi_ctx_init (struct rpmsg_mi_ctx *ctx, const struct rpmsg_mi_ctx_cfg *cfg) |
| Initialization of RPMsg instance. More... | |
| int | rpmsg_mi_ept_register (struct rpmsg_mi_ctx *ctx, struct rpmsg_mi_ept *ept, struct rpmsg_mi_ept_cfg *cfg) |
| Register IPC endpoint. More... | |
| int | rpmsg_mi_send (struct rpmsg_mi_ept *ept, const void *data, size_t len) |
| Send data using given IPC endpoint. More... | |
RPMsg multiple instance API.
| #define SHM_SIZE VDEV_SIZE |
#include <include/ipc/rpmsg_multi_instance.h>
| #define SHM_START_ADDR VDEV_START_ADDR |
#include <include/ipc/rpmsg_multi_instance.h>
| #define VDEV_SIZE CONFIG_RPMSG_MULTI_INSTANCE_SHM_SIZE |
#include <include/ipc/rpmsg_multi_instance.h>
| #define VDEV_START_ADDR CONFIG_RPMSG_MULTI_INSTANCE_SHM_BASE_ADDRESS |
#include <include/ipc/rpmsg_multi_instance.h>
| #define VDEV_STATUS_SIZE (0x4) |
#include <include/ipc/rpmsg_multi_instance.h>
Size of status region.
| #define VRING_ALIGNMENT (4) |
#include <include/ipc/rpmsg_multi_instance.h>
Alignment of vring buffer.
| int rpmsg_mi_ctx_init | ( | struct rpmsg_mi_ctx * | ctx, |
| const struct rpmsg_mi_ctx_cfg * | cfg | ||
| ) |
#include <include/ipc/rpmsg_multi_instance.h>
Initialization of RPMsg instance.
Each instance has an automatically allocated area of shared memory.
| ctx | Pointer to the RPMsg instance. |
| cfg | Pointer to the configuration structure. |
| 0 | if the operation was successful. -EINVAL when the incorrect parameters have been passed. -EIO when the configuration is not correct. -ENODEV failed to get TX or RX IPM handle. -ENOMEM when there is not enough memory to register virqueue. < 0 on other negative errno code, reported by rpmsg. |
| int rpmsg_mi_ept_register | ( | struct rpmsg_mi_ctx * | ctx, |
| struct rpmsg_mi_ept * | ept, | ||
| struct rpmsg_mi_ept_cfg * | cfg | ||
| ) |
#include <include/ipc/rpmsg_multi_instance.h>
Register IPC endpoint.
Registers IPC endpoint to enable communication with a remote device.
| ctx | Pointer to the RPMsg instance. |
| ept | Pointer to endpoint object. |
| cfg | Pointer to the endpoint configuration. |
| -EINVAL | One of the parameters is incorrect. |
| other | errno code reported by rpmsg. |
| int rpmsg_mi_send | ( | struct rpmsg_mi_ept * | ept, |
| const void * | data, | ||
| size_t | len | ||
| ) |
#include <include/ipc/rpmsg_multi_instance.h>
Send data using given IPC endpoint.
Note: It is not possible to send a message of zero length.
| ept | Endpoint object. |
| data | Pointer to the buffer to send through RPMsg. |
| len | Number of bytes to send. |
| Number | of bytes it has sent or negative error value on failure. |