Lines Matching +full:int +full:- +full:a

4  * @brief Generic low-level inter-processor mailbox communication API.
10 * SPDX-License-Identifier: Apache-2.0
37 * interrupt-safe APIS. Registration of callbacks is done via
38 * @a ipm_register_callback
54 * See @a ipm_send() for argument definitions.
56 typedef int (*ipm_send_t)(const struct device *ipmdev, int wait, uint32_t id,
57 const void *data, int size);
62 * See @a ipm_max_data_size_get() for argument definitions.
64 typedef int (*ipm_max_data_size_get_t)(const struct device *ipmdev);
70 * See @a ipm_max_id_val_get() for argument definitions.
78 * See @a ipm_register_callback() for argument definitions.
88 * See @a ipm_set_enabled() for argument definitions.
90 typedef int (*ipm_set_enabled_t)(const struct device *ipmdev, int enable);
96 * See @a ipm_complete() for argument definitions.
112 * @brief Try to send a message over the IPM device.
114 * A message is considered consumed once the remote interrupt handler
117 * event/semaphore, a high-level driver can implement that.
120 * of id. Use the @a ipm_max_data_size_get and @a ipm_max_id_val_get routines
123 * The @a size parameter is used only on the sending side to determine
125 * to the receiving side. The upper-level protocol dictates the amount of
129 * @param wait If nonzero, busy-wait for remote to consume the message. The
133 * event/semaphore, you can implement that in a high-level driver
135 * @a ipm_max_data_size_get since many boards only allow for a
136 * subset of bits in a 32-bit register to store the ID.
140 * @retval -EBUSY If the remote hasn't yet read the last data sent.
141 * @retval -EMSGSIZE If the supplied data size is unsupported by the driver.
142 * @retval -EINVAL If there was a bad parameter, such as: too-large id value.
146 __syscall int ipm_send(const struct device *ipmdev, int wait, uint32_t id,
147 const void *data, int size);
149 static inline int z_impl_ipm_send(const struct device *ipmdev, int wait, in z_impl_ipm_send()
151 const void *data, int size) in z_impl_ipm_send()
154 (const struct ipm_driver_api *)ipmdev->api; in z_impl_ipm_send()
156 return api->send(ipmdev, wait, id, data, size); in z_impl_ipm_send()
160 * @brief Register a callback function for incoming messages.
164 * @param user_data Application-specific data pointer which will be passed
171 (const struct ipm_driver_api *)ipmdev->api; in ipm_register_callback()
173 api->register_callback(ipmdev, cb, user_data); in ipm_register_callback()
179 * IPM implementations vary on the amount of data that can be sent in a
184 * @return Maximum possible size of a message in bytes.
186 __syscall int ipm_max_data_size_get(const struct device *ipmdev);
188 static inline int z_impl_ipm_max_data_size_get(const struct device *ipmdev) in z_impl_ipm_max_data_size_get()
191 (const struct ipm_driver_api *)ipmdev->api; in z_impl_ipm_max_data_size_get()
193 return api->max_data_size_get(ipmdev); in z_impl_ipm_max_data_size_get()
200 * Many IPM implementations store the message's ID in a register with
205 * @return Maximum possible value of a message ID.
212 (const struct ipm_driver_api *)ipmdev->api; in z_impl_ipm_max_id_val_get()
214 return api->max_id_val_get(ipmdev); in z_impl_ipm_max_id_val_get()
224 * @retval -EINVAL If it isn't an inbound channel.
226 __syscall int ipm_set_enabled(const struct device *ipmdev, int enable);
228 static inline int z_impl_ipm_set_enabled(const struct device *ipmdev, in z_impl_ipm_set_enabled()
229 int enable) in z_impl_ipm_set_enabled()
232 (const struct ipm_driver_api *)ipmdev->api; in z_impl_ipm_set_enabled()
234 return api->set_enabled(ipmdev, enable); in z_impl_ipm_set_enabled()
240 * Some IPM backends have an ability to deliver a command
246 * This function is, obviously, a noop on drivers without async
257 (const struct ipm_driver_api *)ipmdev->api; in z_impl_ipm_complete()
259 if (api->complete != NULL) { in z_impl_ipm_complete()
260 api->complete(ipmdev); in z_impl_ipm_complete()