nrfxlib API 2.8.99
Loading...
Searching...
No Matches
nrf_modem_os_rpc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
15#ifndef NRF_MODEM_OS_RPC_H__
16#define NRF_MODEM_OS_RPC_H__
17
18#include <stdbool.h>
19#include <stddef.h>
20#include <stdint.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26typedef void (*nrf_modem_os_rpc_signal_cb_t)(uint32_t ch, void *priv);
27
34 struct {
36 uintptr_t sigdev;
38 uint32_t ch;
40 uintptr_t addr;
42 size_t size;
43 } tx;
44 struct {
46 uintptr_t sigdev;
48 uint32_t ch;
50 uintptr_t addr;
52 size_t size;
53 } rx;
54 struct {
56 void *priv;
65 void (*bound)(void *priv);
75 void (*received)(const void *data, size_t len, void *priv);
76 } cb;
77};
78
96
102struct nrf_modem_os_rpc;
103
109struct nrf_modem_os_rpc_signal;
110
114extern struct nrf_modem_os_rpc inst_ctrl;
115extern struct nrf_modem_os_rpc inst_data;
116
120extern struct nrf_modem_os_rpc_signal inst_app_fault;
121extern struct nrf_modem_os_rpc_signal inst_modem_fault;
122extern struct nrf_modem_os_rpc_signal inst_modem_sysoff;
123
130
137
146int nrf_modem_os_rpc_open(struct nrf_modem_os_rpc *instance,
147 const struct nrf_modem_os_rpc_config *conf);
148
161int nrf_modem_os_rpc_send(struct nrf_modem_os_rpc *instance, const void *msg, size_t len);
162
170int nrf_modem_os_rpc_close(struct nrf_modem_os_rpc *instance);
171
179int nrf_modem_os_rpc_rx_suspend(struct nrf_modem_os_rpc *instance);
180
188int nrf_modem_os_rpc_rx_resume(struct nrf_modem_os_rpc *instance);
189
198int nrf_modem_os_rpc_signal_init(struct nrf_modem_os_rpc_signal *instance,
199 struct nrf_modem_os_rpc_signal_config *conf);
200
208int nrf_modem_os_rpc_signal_send(struct nrf_modem_os_rpc_signal *instance);
209
217int nrf_modem_os_rpc_signal_deinit(struct nrf_modem_os_rpc_signal *instance);
218
227int nrf_modem_os_rpc_cache_data_flush(void *addr, size_t size);
228
237int nrf_modem_os_rpc_cache_data_invalidate(void *addr, size_t size);
238
239
240
241#ifdef __cplusplus
242}
243#endif
244
245#endif /* NRF_MODEM_OS_RPC_H__ */
void(* nrf_modem_os_rpc_signal_cb_t)(uint32_t ch, void *priv)
Definition nrf_modem_os_rpc.h:26
int nrf_modem_os_rpc_send(struct nrf_modem_os_rpc *instance, const void *msg, size_t len)
Send a message with the RPC instance.
struct nrf_modem_os_rpc inst_ctrl
RPC instances used by nrf_modem and defined externally.
uintptr_t nrf_modem_os_rpc_sigdev_app_get(void)
Get address of the application signal device.
int nrf_modem_os_rpc_signal_init(struct nrf_modem_os_rpc_signal *instance, struct nrf_modem_os_rpc_signal_config *conf)
Configure and enable the signaling instance.
int nrf_modem_os_rpc_rx_suspend(struct nrf_modem_os_rpc *instance)
Suspend processing of incoming messages on the RPC instance.
struct nrf_modem_os_rpc inst_data
struct nrf_modem_os_rpc_signal inst_modem_fault
int nrf_modem_os_rpc_rx_resume(struct nrf_modem_os_rpc *instance)
Resume processing of incoming messages on the RPC instance.
struct nrf_modem_os_rpc_signal inst_modem_sysoff
int nrf_modem_os_rpc_signal_send(struct nrf_modem_os_rpc_signal *instance)
Signal with the signaling instance.
int nrf_modem_os_rpc_signal_deinit(struct nrf_modem_os_rpc_signal *instance)
Disable the signaling instance.
struct nrf_modem_os_rpc_signal inst_app_fault
Signaling instances used by nrf_modem and defined externally.
uintptr_t nrf_modem_os_rpc_sigdev_modem_get(void)
Get address of the modem signal device.
int nrf_modem_os_rpc_cache_data_invalidate(void *addr, size_t size)
Invalidate address range in cache.
int nrf_modem_os_rpc_cache_data_flush(void *addr, size_t size)
Flush address range in cache.
int nrf_modem_os_rpc_open(struct nrf_modem_os_rpc *instance, const struct nrf_modem_os_rpc_config *conf)
Open an RPC instance.
int nrf_modem_os_rpc_close(struct nrf_modem_os_rpc *instance)
Close an RPC instance.
void(* bound)(void *priv)
Bind was successful.
Definition nrf_modem_os_rpc.h:65
struct nrf_modem_os_rpc_config::@35 tx
struct nrf_modem_os_rpc_config::@37 cb
void(* received)(const void *data, size_t len, void *priv)
New message has arrived.
Definition nrf_modem_os_rpc.h:75
uintptr_t addr
Definition nrf_modem_os_rpc.h:40
void * priv
Definition nrf_modem_os_rpc.h:56
uint32_t ch
Definition nrf_modem_os_rpc.h:38
struct nrf_modem_os_rpc_config::@36 rx
size_t size
Definition nrf_modem_os_rpc.h:42
uintptr_t sigdev
Definition nrf_modem_os_rpc.h:36
Parameters for configuring an nrf_modem rpc instance.
Definition nrf_modem_os_rpc.h:33
uint32_t ch
Definition nrf_modem_os_rpc.h:88
uintptr_t sigdev
Definition nrf_modem_os_rpc.h:86
void * priv
Definition nrf_modem_os_rpc.h:90
nrf_modem_os_rpc_signal_cb_t recv
Definition nrf_modem_os_rpc.h:94
Parameters for configuring an nrf_modem signaling instance.
Definition nrf_modem_os_rpc.h:84