13#ifndef ZEPHYR_INCLUDE_DRIVERS_IPM_H_
14#define ZEPHYR_INCLUDE_DRIVERS_IPM_H_
57 const void *
data,
int size);
106#ifdef CONFIG_IPM_CALLBACK_ASYNC
147 const void *data,
int size);
149static inline int z_impl_ipm_send(
const struct device *ipmdev,
int wait,
151 const void *data,
int size)
156 return api->
send(ipmdev, wait,
id, data, size);
188static inline int z_impl_ipm_max_data_size_get(
const struct device *ipmdev)
209static inline uint32_t z_impl_ipm_max_id_val_get(
const struct device *ipmdev)
228static inline int z_impl_ipm_set_enabled(
const struct device *ipmdev,
253static inline void z_impl_ipm_complete(
const struct device *ipmdev)
255#ifdef CONFIG_IPM_CALLBACK_ASYNC
259 if (api->complete != NULL) {
260 api->complete(ipmdev);
273#include <syscalls/ipm.h>
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_register_callback_t)(const struct device *port, ipm_callback_t cb, void *user_data)
Callback API upon registration.
Definition: ipm.h:80
int(* ipm_set_enabled_t)(const struct device *ipmdev, int enable)
Callback API upon enablement of interrupts.
Definition: ipm.h:90
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:167
int ipm_set_enabled(const struct device *ipmdev, int enable)
Enable interrupts and callbacks for inbound channels.
int(* ipm_max_data_size_get_t)(const struct device *ipmdev)
Callback API to get maximum data size.
Definition: ipm.h:64
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:56
void(* ipm_complete_t)(const struct device *ipmdev)
Callback API upon command completion.
Definition: ipm.h:98
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.
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
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
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition: device.h:399
void * data
Address of the device instance private data.
Definition: device.h:409
const void * api
Address of the API structure exposed by the device instance.
Definition: device.h:405
ipm_register_callback_t register_callback
Definition: ipm.h:102
ipm_max_data_size_get_t max_data_size_get
Definition: ipm.h:103
ipm_max_id_val_get_t max_id_val_get
Definition: ipm.h:104
ipm_set_enabled_t set_enabled
Definition: ipm.h:105
ipm_send_t send
Definition: ipm.h:101