EtcPal  HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
View other versions:
opts.h
1 /******************************************************************************
2  * Copyright 2022 ETC Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *******************************************************************************
16  * This file is a part of EtcPal. For more information, go to:
17  * https://github.com/ETCLabs/EtcPal
18  ******************************************************************************/
19 
20 #ifndef ETCPAL_PRIVATE_OPTS_H_
21 #define ETCPAL_PRIVATE_OPTS_H_
22 
23 #include "stdbool.h"
24 
25 #if ETCPAL_HAVE_CONFIG_H
26 #include "etcpal_config.h"
27 #endif
28 
52 #ifndef ETCPAL_INCLUDE_PACK_64
53 #define ETCPAL_INCLUDE_PACK_64 1
54 #endif
55 
61 #ifndef ETCPAL_EMBOS_USE_MALLOC
62 #define ETCPAL_EMBOS_USE_MALLOC 0
63 #endif
64 
70 #ifndef ETCPAL_EMBOS_MAX_NETINTS
71 #define ETCPAL_EMBOS_MAX_NETINTS 5
72 #endif
73 
84 #ifndef ETCPAL_LOGGING_ENABLED
85 #define ETCPAL_LOGGING_ENABLED 1
86 #endif
87 
91 #ifndef ETCPAL_LOG_MSG_PREFIX
92 #define ETCPAL_LOG_MSG_PREFIX "EtcPal: "
93 #endif
94 
95 /* Assertion failure handler */
96 bool etcpal_assert_verify_fail(const char* exp, const char* file, const char* func, int line);
97 
104 #ifndef ETCPAL_ASSERT_VERIFY
105 #define ETCPAL_ASSERT_VERIFY(exp) \
106  ((exp) ? true : (etcpal_assert_verify_fail(#exp, __FILE__, __func__, __LINE__) && false))
107 #endif
108 
118 #ifndef ETCPAL_ASSERT
119 #include <assert.h>
120 #define ETCPAL_ASSERT(expr) assert(expr)
121 #endif
122 
132 #ifndef ETCPAL_TARGETING_FREERTOS
133 #define ETCPAL_TARGETING_FREERTOS 0
134 #endif
135 
140 #endif /* ETCPAL_PRIVATE_OPTS_H_ */