Zephyr API 3.6.99
Loading...
Searching...
No Matches
icmsg_me.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_IPC_ICMSG_ME_H_
8#define ZEPHYR_INCLUDE_IPC_ICMSG_ME_H_
9
10#include <stdint.h>
11#include <zephyr/kernel.h>
12#include <zephyr/ipc/icmsg.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
27/* If more bytes than 1 was used for endpoint id, endianness should be
28 * considered.
29 */
31
35
36 struct k_event event;
37
39 const struct ipc_ept_cfg *epts[CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_NUM_EP];
40
41 uint8_t send_buffer[CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_SEND_BUF_SIZE] __aligned(4);
42};
43
44
62int icmsg_me_init(const struct icmsg_config_t *conf,
63 struct icmsg_me_data_t *data);
64
90int icmsg_me_open(const struct icmsg_config_t *conf,
91 struct icmsg_me_data_t *data,
92 const struct ipc_service_cb *cb,
93 void *ctx);
94
111
124
142 const void *msg, size_t len);
143
170 const struct ipc_ept_cfg *ept_cfg,
172
192 const struct ipc_ept_cfg *ept_cfg);
193
213 const struct ipc_ept_cfg **ept_cfg);
214
228
246int icmsg_me_send(const struct icmsg_config_t *conf,
247 struct icmsg_me_data_t *data, icmsg_me_ept_id_t id,
248 const void *msg, size_t len);
249
254#ifdef __cplusplus
255}
256#endif
257
258#endif /* ZEPHYR_INCLUDE_IPC_ICMSG_ME_H_ */
void icmsg_me_wait_for_icmsg_bind(struct icmsg_me_data_t *data)
Wait until the underlying icmsg instance calls bound callback.
int icmsg_me_init(const struct icmsg_config_t *conf, struct icmsg_me_data_t *data)
Initialize an icmsg_me instance.
int icmsg_me_set_empty_ept_cfg_slot(struct icmsg_me_data_t *data, const struct ipc_ept_cfg *ept_cfg, icmsg_me_ept_id_t *id)
Set endpoint configuration in an empty endpoint slot.
void icmsg_me_icmsg_bound(struct icmsg_me_data_t *data)
Notify the icmsg_me instance that the underlying icmsg was bound.
int icmsg_me_send(const struct icmsg_config_t *conf, struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, const void *msg, size_t len)
Send a message to the remote icmsg_me endpoint.
int icmsg_me_get_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, const struct ipc_ept_cfg **ept_cfg)
Get endpoint configuration from a selected endpoint slot.
void icmsg_me_reset_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id)
Reset endpoint configuration in a selected endpoint slot.
int icmsg_me_open(const struct icmsg_config_t *conf, struct icmsg_me_data_t *data, const struct ipc_service_cb *cb, void *ctx)
Open an icmsg_me instance.
void icmsg_me_received_data(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, const void *msg, size_t len)
Notify the icmsg_me instance that data for an endpoint was received.
int icmsg_me_set_ept_cfg(struct icmsg_me_data_t *data, icmsg_me_ept_id_t id, const struct ipc_ept_cfg *ept_cfg)
Set endpoint configuration in a selected endpoint slot.
uint8_t icmsg_me_ept_id_t
Definition icmsg_me.h:30
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Definition icmsg.h:35
Definition icmsg.h:40
Definition icmsg_me.h:32
struct icmsg_data_t icmsg_data
Definition icmsg_me.h:33
uint8_t send_buffer[CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_SEND_BUF_SIZE]
Definition icmsg_me.h:41
struct k_event event
Definition icmsg_me.h:36
struct k_mutex send_mutex
Definition icmsg_me.h:38
const struct ipc_ept_cfg * epts[CONFIG_IPC_SERVICE_BACKEND_ICMSG_ME_NUM_EP]
Definition icmsg_me.h:39
struct ipc_ept_cfg ept_cfg
Definition icmsg_me.h:34
Endpoint configuration structure.
Definition ipc_service.h:191
struct ipc_service_cb cb
Event callback structure.
Definition ipc_service.h:200
Event callback structure.
Definition ipc_service.h:145
Event Structure.
Definition kernel.h:2301
Mutex Structure.
Definition kernel.h:2994