13#ifndef ZEPHYR_INCLUDE_DRIVERS_IPM_H_
14#define ZEPHYR_INCLUDE_DRIVERS_IPM_H_
60 const void *
data,
int size);
118#if defined(CONFIG_IPM_CALLBACK_ASYNC) || defined(__DOXYGEN__)
167 const void *data,
int size);
169static inline int z_impl_ipm_send(
const struct device *ipmdev,
int wait,
171 const void *data,
int size)
176 return api->send(ipmdev, wait,
id, data, size);
208static inline int z_impl_ipm_max_data_size_get(
const struct device *ipmdev)
213 return api->max_data_size_get(ipmdev);
229static inline uint32_t z_impl_ipm_max_id_val_get(
const struct device *ipmdev)
234 return api->max_id_val_get(ipmdev);
248static inline int z_impl_ipm_set_enabled(
const struct device *ipmdev,
254 return api->set_enabled(ipmdev, enable);
273static inline void z_impl_ipm_complete(
const struct device *ipmdev)
275#ifdef CONFIG_IPM_CALLBACK_ASYNC
279 if (api->complete !=
NULL) {
280 api->complete(ipmdev);
293#include <zephyr/syscalls/ipm.h>
void(* ipm_complete_t)(const struct device *ipmdev)
Callback API to signal asynchronous command completion.
Definition ipm.h:92
int(* ipm_max_data_size_get_t)(const struct device *ipmdev)
Callback API to get maximum data size.
Definition ipm.h:66
int(* ipm_send_t)(const struct device *ipmdev, int wait, uint32_t id, const void *data, int size)
Callback API to send IPM messages.
Definition ipm.h:59
void(* ipm_register_callback_t)(const struct device *port, ipm_callback_t cb, void *user_data)
Callback API to register a callback for incoming messages.
Definition ipm.h:78
uint32_t(* ipm_max_id_val_get_t)(const struct device *ipmdev)
Callback API to get the ID's maximum value.
Definition ipm.h:72
int(* ipm_set_enabled_t)(const struct device *ipmdev, int enable)
Callback API to enable or disable interrupts for inbound channels.
Definition ipm.h:86
int ipm_max_data_size_get(const struct device *ipmdev)
Return the maximum number of bytes possible in an outbound message.
uint32_t ipm_max_id_val_get(const struct device *ipmdev)
Return the maximum id value possible in an outbound message.
void(* ipm_callback_t)(const struct device *ipmdev, void *user_data, uint32_t id, volatile void *data)
Callback API for incoming IPM messages.
Definition ipm.h:47
void ipm_complete(const struct device *ipmdev)
Signal asynchronous command completion.
static void ipm_register_callback(const struct device *ipmdev, ipm_callback_t cb, void *user_data)
Register a callback function for incoming messages.
Definition ipm.h:187
int ipm_set_enabled(const struct device *ipmdev, int enable)
Enable interrupts and callbacks for inbound channels.
int ipm_send(const struct device *ipmdev, int wait, uint32_t id, const void *data, int size)
Try to send a message over the IPM device.
#define NULL
Definition iar_missing_defs.h:20
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
void * data
Address of the device instance private data.
Definition device.h:523
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:519
<span class="mlabel">Driver Operations</span> IPM driver operations
Definition ipm.h:97
ipm_register_callback_t register_callback
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ipm.h:105
ipm_max_data_size_get_t max_data_size_get
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ipm.h:109
ipm_max_id_val_get_t max_id_val_get
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ipm.h:113
ipm_complete_t complete
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition ipm.h:123
ipm_set_enabled_t set_enabled
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ipm.h:117
ipm_send_t send
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ipm.h:101