|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Icmsg IPC library API. More...
Data Structures | |
| struct | icmsg_config_t |
| struct | icmsg_data_t |
Enumerations | |
| enum | icmsg_state { ICMSG_STATE_OFF , ICMSG_STATE_INITIALIZING_SID_DISABLED , ICMSG_STATE_INITIALIZING_SID_ENABLED , ICMSG_STATE_INITIALIZING_SID_DETECT , ICMSG_STATE_DISCONNECTED , ICMSG_STATE_CONNECTED_SID_DISABLED , ICMSG_STATE_CONNECTED_SID_ENABLED } |
| enum | icmsg_unbound_mode { ICMSG_UNBOUND_MODE_DISABLE = ICMSG_STATE_INITIALIZING_SID_DISABLED , ICMSG_UNBOUND_MODE_ENABLE = ICMSG_STATE_INITIALIZING_SID_ENABLED , ICMSG_UNBOUND_MODE_DETECT = ICMSG_STATE_INITIALIZING_SID_DETECT } |
Functions | |
| int | icmsg_open (const struct icmsg_config_t *conf, struct icmsg_data_t *dev_data, const struct ipc_service_cb *cb, void *ctx) |
| Open an icmsg instance. | |
| int | icmsg_close (const struct icmsg_config_t *conf, struct icmsg_data_t *dev_data) |
| Close an icmsg instance. | |
| int | icmsg_send (const struct icmsg_config_t *conf, struct icmsg_data_t *dev_data, const void *msg, size_t len) |
| Send a message to the remote icmsg instance. | |
Icmsg IPC library API.
| enum icmsg_state |
#include <zephyr/ipc/icmsg.h>
| enum icmsg_unbound_mode |
#include <zephyr/ipc/icmsg.h>
| Enumerator | |
|---|---|
| ICMSG_UNBOUND_MODE_DISABLE | |
| ICMSG_UNBOUND_MODE_ENABLE | |
| ICMSG_UNBOUND_MODE_DETECT | |
| int icmsg_close | ( | const struct icmsg_config_t * | conf, |
| struct icmsg_data_t * | dev_data ) |
#include <zephyr/ipc/icmsg.h>
Close an icmsg instance.
Closing an icmsg instance results in releasing all resources used by given instance including the shared memory regions and mbox devices.
| [in] | conf | Structure containing configuration parameters for the icmsg instance being closed. Its content must be the same as used for creating this instance with icmsg_open. |
| [in,out] | dev_data | Structure containing run-time data used by the icmsg instance. |
| 0 | on success. |
| other | errno codes from dependent modules. |
| int icmsg_open | ( | const struct icmsg_config_t * | conf, |
| struct icmsg_data_t * | dev_data, | ||
| const struct ipc_service_cb * | cb, | ||
| void * | ctx ) |
#include <zephyr/ipc/icmsg.h>
Open an icmsg instance.
Open an icmsg instance to be able to send and receive messages to a remote instance. This function is blocking until the handshake with the remote instance is completed. This function is intended to be called late in the initialization process, possibly from a thread which can be safely blocked while handshake with the remote instance is being performed.
| [in] | conf | Structure containing configuration parameters for the icmsg instance. |
| [in,out] | dev_data | Structure containing run-time data used by the icmsg instance. |
| [in] | cb | Structure containing callback functions to be called on events generated by this icmsg instance. The pointed memory must be preserved while the icmsg instance is active. |
| [in] | ctx | Pointer to context passed as an argument to callbacks. |
| 0 | on success. |
| -EALREADY | when the instance is already opened. |
| other | errno codes from dependent modules. |
| int icmsg_send | ( | const struct icmsg_config_t * | conf, |
| struct icmsg_data_t * | dev_data, | ||
| const void * | msg, | ||
| size_t | len ) |
#include <zephyr/ipc/icmsg.h>
Send a message to the remote icmsg instance.
| [in] | conf | Structure containing configuration parameters for the icmsg instance. |
| [in,out] | dev_data | Structure containing run-time data used by the icmsg instance. |
| [in] | msg | Pointer to a buffer containing data to send. |
| [in] | len | Size of data in the msg buffer. |
| Number | of sent bytes. |
| -EBUSY | when the instance has not finished handshake with the remote instance. |
| -ENODATA | when the requested data to send is empty. |
| -EBADMSG | when the requested data to send is too big. |
| -ENOBUFS | when there are no TX buffers available. |
| other | errno codes from dependent modules. |