nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
nrf_rpc_ipc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NRF_RPC_IPC_H_
8#define NRF_RPC_IPC_H_
9
10#include <zephyr/device.h>
11#include <zephyr/ipc/ipc_service.h>
12
13#include <nrf_rpc.h>
14#include <nrf_rpc_tr.h>
15
16#include <stdbool.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
29/* nRF IPC Service transport API strucure. It contains all
30 * necessary functions required by the nRF RPC library.
31 */
32extern const struct nrf_rpc_tr_api nrf_rpc_ipc_service_api;
33
37 struct ipc_ept_cfg ept_cfg;
38
40 struct ipc_ept ept;
41
43 struct k_event ept_bond;
44
46 k_timeout_t timeout;
47};
48
51 const struct device *ipc;
52
55
57 nrf_rpc_tr_receive_handler_t receive_cb;
58
60 void *context;
61
63 uint8_t state;
64};
65
74#define NRF_RPC_IPC_TRANSPORT_DECLARE(_name) \
75 extern const struct nrf_rpc_tr _name
76
116#define NRF_RPC_IPC_TRANSPORT(_name, _ipc, _ept_name) \
117 static struct nrf_rpc_ipc _name##_instance = { \
118 .ipc = _ipc, \
119 .endpoint.ept_cfg.name = _ept_name, \
120 }; \
121 \
122 const struct nrf_rpc_tr _name = { \
123 .api = &nrf_rpc_ipc_service_api, \
124 .ctx = &_name##_instance \
125 }
126
131#ifdef __cplusplus
132}
133#endif
134
135#endif /* NRF_RPC_IPC_H_ */
const struct nrf_rpc_tr_api nrf_rpc_ipc_service_api
k_timeout_t timeout
Definition nrf_rpc_ipc.h:46
struct ipc_ept ept
Definition nrf_rpc_ipc.h:40
struct ipc_ept_cfg ept_cfg
Definition nrf_rpc_ipc.h:37
struct k_event ept_bond
Definition nrf_rpc_ipc.h:43
nRF RPC IPC transport endpoint configuration.
Definition nrf_rpc_ipc.h:35
void * context
Definition nrf_rpc_ipc.h:60
nrf_rpc_tr_receive_handler_t receive_cb
Definition nrf_rpc_ipc.h:57
const struct device * ipc
Definition nrf_rpc_ipc.h:51
struct nrf_rpc_ipc_endpoint endpoint
Definition nrf_rpc_ipc.h:54
uint8_t state
Definition nrf_rpc_ipc.h:63
nRF RPC IPC Service transport instance.
Definition nrf_rpc_ipc.h:50