1 /*
2  * Copyright (c) 2014, Mentor Graphics Corporation
3  * All rights reserved.
4  * Copyright (c) 2015 Xilinx, Inc. All rights reserved.
5  * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  *    this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright notice,
13  *    this list of conditions and the following disclaimer in the documentation
14  *    and/or other materials provided with the distribution.
15  * 3. Neither the name of Mentor Graphics Corporation nor the names of its
16  *    contributors may be used to endorse or promote products derived from this
17  *    software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef _RPMSG_CONFIG_H
33 #define _RPMSG_CONFIG_H
34 
35 #include <stdbool.h>
36 #if defined(SDK_OS_FREE_RTOS)
37 #include <FreeRTOSConfig.h>
38 #endif
39 /* RPMsg config values */
40 /* START { */
41 #define RL_MS_PER_INTERVAL (1)
42 
43 #define RL_BUFFER_PAYLOAD_SIZE (496)
44 
45 #define RL_BUFFER_COUNT (4U)
46 
47 #define RL_API_HAS_ZEROCOPY (1)
48 
49 #if defined(SDK_OS_FREE_RTOS) && !(defined(configSUPPORT_STATIC_ALLOCATION) && configSUPPORT_STATIC_ALLOCATION)
50 #define RL_USE_STATIC_API (0)
51 #else
52 #define RL_USE_STATIC_API (1)
53 #endif
54 
55 #define RL_USE_MCMGR_IPC_ISR_HANDLER (1)
56 
57 #define RL_ASSERT(x)     \
58     do                   \
59     {                    \
60         if (!(x))        \
61             while (true) \
62                 ;        \
63     } while (false);
64 /* } END */
65 
66 #endif /* _RPMSG_CONFIG_H */
67