|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | mbox_driver_api |
| Driver Operations MBOX driver operations More... | |
Typedefs | |
| typedef void(* | mbox_callback_t) (const struct device *dev, mbox_channel_id_t channel_id, void *user_data, struct mbox_msg *data) |
| Callback API for incoming MBOX messages. | |
| typedef int(* | mbox_send_t) (const struct device *dev, mbox_channel_id_t channel_id, const struct mbox_msg *msg) |
| Callback API to send MBOX messages. | |
| typedef int(* | mbox_mtu_get_t) (const struct device *dev) |
| Callback API to get maximum data size. | |
| typedef int(* | mbox_register_callback_t) (const struct device *dev, mbox_channel_id_t channel_id, mbox_callback_t cb, void *user_data) |
| Callback API upon registration. | |
| typedef int(* | mbox_set_enabled_t) (const struct device *dev, mbox_channel_id_t channel_id, bool enabled) |
| Callback API upon enablement of interrupts. | |
| typedef uint32_t(* | mbox_max_channels_get_t) (const struct device *dev) |
| Callback API to get maximum number of channels. | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a MBOX driver.
| typedef void(* mbox_callback_t) (const struct device *dev, mbox_channel_id_t channel_id, void *user_data, struct mbox_msg *data) |
#include <zephyr/drivers/mbox.h>
Callback API for incoming MBOX messages.
These callbacks execute in interrupt context. Therefore, use only interrupt-safe APIs. Registration of callbacks is done via mbox_register_callback()
The data parameter must be NULL in signalling mode.
| dev | MBOX device instance |
| channel_id | Channel ID |
| user_data | Pointer to some private data provided at registration time |
| data | Message struct |
#include <zephyr/drivers/mbox.h>
Callback API to get maximum number of channels.
| dev | MBOX device instance |
| typedef int(* mbox_mtu_get_t) (const struct device *dev) |
#include <zephyr/drivers/mbox.h>
Callback API to get maximum data size.
| dev | MBOX device instance |
| typedef int(* mbox_register_callback_t) (const struct device *dev, mbox_channel_id_t channel_id, mbox_callback_t cb, void *user_data) |
#include <zephyr/drivers/mbox.h>
Callback API upon registration.
| dev | MBOX device instance |
| channel_id | Channel ID |
| cb | Callback function to execute on incoming message interrupts. |
| user_data | Application-specific data pointer which will be passed to the callback function when executed. |
| typedef int(* mbox_send_t) (const struct device *dev, mbox_channel_id_t channel_id, const struct mbox_msg *msg) |
#include <zephyr/drivers/mbox.h>
Callback API to send MBOX messages.
| dev | MBOX device instance |
| channel_id | Channel ID |
| msg | Message struct |
| typedef int(* mbox_set_enabled_t) (const struct device *dev, mbox_channel_id_t channel_id, bool enabled) |
#include <zephyr/drivers/mbox.h>
Callback API upon enablement of interrupts.
| dev | MBOX device instance |
| channel_id | Channel ID |
| enabled | Set to 0 to disable and to nonzero to enable. |