Zephyr Project API  3.2.0
A Scalable Open Source RTOS
ipc_service_backend.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_IPC_SERVICE_IPC_SERVICE_BACKEND_H_
8#define ZEPHYR_INCLUDE_IPC_SERVICE_IPC_SERVICE_BACKEND_H_
9
11#include <stdio.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
38 int (*open_instance)(const struct device *instance);
39
57 int (*send)(const struct device *instance, void *token,
58 const void *data, size_t len);
59
73 int (*register_endpoint)(const struct device *instance,
74 void **token,
75 const struct ipc_ept_cfg *cfg);
76
90 int (*deregister_endpoint)(const struct device *instance, void *token);
91
105 int (*get_tx_buffer_size)(const struct device *instance, void *token);
106
127 int (*get_tx_buffer)(const struct device *instance, void *token,
128 void **data, uint32_t *len, k_timeout_t wait);
129
145 int (*drop_tx_buffer)(const struct device *instance, void *token,
146 const void *data);
147
167 int (*send_nocopy)(const struct device *instance, void *token,
168 const void *data, size_t len);
169
185 int (*hold_rx_buffer)(const struct device *instance, void *token,
186 void *data);
187
203 int (*release_rx_buffer)(const struct device *instance, void *token,
204 void *data);
205};
206
211#ifdef __cplusplus
212}
213#endif
214
215#endif /* ZEPHYR_INCLUDE_IPC_SERVICE_IPC_SERVICE_BACKEND_H_ */
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition: device.h:435
Endpoint configuration structure.
Definition: ipc_service.h:175
IPC Service backend.
Definition: ipc_service_backend.h:27
int(* deregister_endpoint)(const struct device *instance, void *token)
Pointer to the function that will be used to deregister endpoints.
Definition: ipc_service_backend.h:90
int(* send)(const struct device *instance, void *token, const void *data, size_t len)
Pointer to the function that will be used to send data to the endpoint.
Definition: ipc_service_backend.h:57
int(* hold_rx_buffer)(const struct device *instance, void *token, void *data)
Pointer to the function that will hold the RX buffer.
Definition: ipc_service_backend.h:185
int(* send_nocopy)(const struct device *instance, void *token, const void *data, size_t len)
Pointer to the function that will be used to send data to the endpoint when the TX buffer has been ob...
Definition: ipc_service_backend.h:167
int(* get_tx_buffer)(const struct device *instance, void *token, void **data, uint32_t *len, k_timeout_t wait)
Pointer to the function that will return an empty TX buffer.
Definition: ipc_service_backend.h:127
int(* release_rx_buffer)(const struct device *instance, void *token, void *data)
Pointer to the function that will release the RX buffer.
Definition: ipc_service_backend.h:203
int(* get_tx_buffer_size)(const struct device *instance, void *token)
Pointer to the function that will return the TX buffer size.
Definition: ipc_service_backend.h:105
int(* open_instance)(const struct device *instance)
Pointer to the function that will be used to open an instance.
Definition: ipc_service_backend.h:38
int(* drop_tx_buffer)(const struct device *instance, void *token, const void *data)
Pointer to the function that will drop a TX buffer.
Definition: ipc_service_backend.h:145
int(* register_endpoint)(const struct device *instance, void **token, const struct ipc_ept_cfg *cfg)
Pointer to the function that will be used to register endpoints.
Definition: ipc_service_backend.h:73
Kernel timeout type.
Definition: sys_clock.h:65
static fdata_t data[2]
Definition: test_fifo_contexts.c:15