1 /*
2  * Copyright 2021-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**************************************************************************
8  * FILE NAME
9  *
10  *       rpmsg_env_specific.h
11  *
12  * DESCRIPTION
13  *
14  *       This file contains Zephyr specific constructions.
15  *
16  **************************************************************************/
17 #ifndef RPMSG_ENV_SPECIFIC_H_
18 #define RPMSG_ENV_SPECIFIC_H_
19 
20 #include "rpmsg_default_config.h"
21 
22 typedef struct
23 {
24     uint32_t src;
25     void *data;
26     uint32_t len;
27 } rpmsg_queue_rx_cb_data_t;
28 
29 #if defined(RL_USE_STATIC_API) && (RL_USE_STATIC_API == 1)
30 #include <zephyr/kernel.h>
31 
32 typedef struct k_sem LOCK_STATIC_CONTEXT;
33 typedef struct k_msgq rpmsg_static_queue_ctxt;
34 /* Queue object static storage size in bytes, should be defined as (2*RL_BUFFER_COUNT*sizeof(rpmsg_queue_rx_cb_data_t))
35    This macro helps the application to statically allocate the queue object static storage memory. Note, the
36    RL_BUFFER_COUNT is not applied for all instances when RL_ALLOW_CUSTOM_SHMEM_CONFIG is set to 1 ! */
37 #define RL_ENV_QUEUE_STATIC_STORAGE_SIZE (2 * RL_BUFFER_COUNT * sizeof(rpmsg_queue_rx_cb_data_t))
38 #endif
39 
40 #endif /* RPMSG_ENV_SPECIFIC_H_ */
41