Zephyr Project API  3.1.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
56 int (*send)(const struct device *instance, void *token,
57 const void *data, size_t len);
58
72 int (*register_endpoint)(const struct device *instance,
73 void **token,
74 const struct ipc_ept_cfg *cfg);
75
88 int (*get_tx_buffer_size)(const struct device *instance, void *token);
89
109 int (*get_tx_buffer)(const struct device *instance, void *token,
110 void **data, uint32_t *len, k_timeout_t wait);
111
126 int (*drop_tx_buffer)(const struct device *instance, void *token,
127 const void *data);
128
147 int (*send_nocopy)(const struct device *instance, void *token,
148 const void *data, size_t len);
149
164 int (*hold_rx_buffer)(const struct device *instance, void *token,
165 void *data);
166
181 int (*release_rx_buffer)(const struct device *instance, void *token,
182 void *data);
183};
184
189#ifdef __cplusplus
190}
191#endif
192
193#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:456
Endpoint configuration structure.
Definition: ipc_service.h:168
IPC Service backend.
Definition: ipc_service_backend.h:27
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:56
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:164
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:147
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:109
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:181
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:88
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:126
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:72
Kernel timeout type.
Definition: sys_clock.h:65
static fdata_t data[2]
Definition: test_fifo_contexts.c:15