amiro-os / modules / RT-STM32L476RG-NUCLEO64 / aosconf.h @ f3b3fe09
History | View | Annotate | Download (6.688 KB)
1 | 27d0378b | Simon Welzel | /*
|
---|---|---|---|
2 | AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
||
3 | Copyright (C) 2016..2018 Thomas Schöpping et al.
|
||
4 | |||
5 | This program is free software: you can redistribute it and/or modify
|
||
6 | it under the terms of the GNU General Public License as published by
|
||
7 | the Free Software Foundation, either version 3 of the License, or
|
||
8 | (at your option) any later version.
|
||
9 | |||
10 | This program is distributed in the hope that it will be useful,
|
||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
13 | GNU General Public License for more details.
|
||
14 | |||
15 | You should have received a copy of the GNU General Public License
|
||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
17 | */
|
||
18 | |||
19 | /**
|
||
20 | * @file
|
||
21 | * @brief AMiRo-OS Configuration file for the PowerManagement v1.1 module.
|
||
22 | * @details Contains the application specific AMiRo-OS settings.
|
||
23 | *
|
||
24 | * @addtogroup powermanagement_aos_config
|
||
25 | * @{
|
||
26 | */
|
||
27 | |||
28 | #ifndef _AOSCONF_H_
|
||
29 | #define _AOSCONF_H_
|
||
30 | |||
31 | /*
|
||
32 | * compatibility guards
|
||
33 | */
|
||
34 | #define _AMIRO_OS_CFG_
|
||
35 | #define _AMIRO_OS_CFG_VERSION_MAJOR_ 2 |
||
36 | #define _AMIRO_OS_CFG_VERSION_MINOR_ 0 |
||
37 | |||
38 | #include <stdbool.h> |
||
39 | |||
40 | /*
|
||
41 | * Include an external configuration file to override the following default settings only if required.
|
||
42 | */
|
||
43 | #if defined(AMIRO_APPS) && (AMIRO_APPS == true) |
||
44 | #include <osconf.h> |
||
45 | #endif
|
||
46 | |||
47 | /*===========================================================================*/
|
||
48 | /**
|
||
49 | * @name Kernel parameters and options
|
||
50 | * @{
|
||
51 | */
|
||
52 | /*===========================================================================*/
|
||
53 | |||
54 | /**
|
||
55 | * @brief Flag to enable/disable debug API and logic.
|
||
56 | */
|
||
57 | #if !defined(OS_CFG_DBG)
|
||
58 | #define AMIROOS_CFG_DBG true |
||
59 | #else
|
||
60 | #define AMIROOS_CFG_DBG OS_CFG_DBG
|
||
61 | #endif
|
||
62 | |||
63 | /**
|
||
64 | * @brief Flag to enable/disable unit tests.
|
||
65 | */
|
||
66 | #if !defined(OS_CFG_TESTS_ENABLE)
|
||
67 | #define AMIROOS_CFG_TESTS_ENABLE true |
||
68 | #else
|
||
69 | #define AMIROOS_CFG_TESTS_ENABLE OS_CFG_TESTS_ENABLE
|
||
70 | #endif
|
||
71 | |||
72 | /**
|
||
73 | * @brief Flag to enable/disable profiling API and logic.
|
||
74 | */
|
||
75 | #if !defined(OS_CFG_PROFILE)
|
||
76 | #define AMIROOS_CFG_PROFILE true |
||
77 | #else
|
||
78 | #define AMIROOS_CFG_PROFILE OS_CFG_PROFILE
|
||
79 | #endif
|
||
80 | |||
81 | /**
|
||
82 | * @brief Timeout value when waiting for events in the main loop in microseconds.
|
||
83 | * @details A value of 0 deactivates the timeout.
|
||
84 | */
|
||
85 | #if !defined(OS_CFG_MAIN_LOOP_TIMEOUT)
|
||
86 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT 0 |
||
87 | #else
|
||
88 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT OS_CFG_MAIN_LOOP_TIMEOUT
|
||
89 | #endif
|
||
90 | |||
91 | /** @} */
|
||
92 | |||
93 | /*===========================================================================*/
|
||
94 | /**
|
||
95 | * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
|
||
96 | * @{
|
||
97 | */
|
||
98 | /*===========================================================================*/
|
||
99 | |||
100 | /**
|
||
101 | * @brief Flag to enable SSSP.
|
||
102 | */
|
||
103 | #if !defined(OS_CFG_SSSP_ENABLE)
|
||
104 | 960338cc | Simon Welzel | #define AMIROOS_CFG_SSSP_ENABLE false |
105 | 27d0378b | Simon Welzel | #else
|
106 | #define AMIROOS_CFG_SSSP_ENABLE OS_CFG_SSSP_ENABLE
|
||
107 | #endif
|
||
108 | |||
109 | 1ef74af5 | Simon Welzel | #if (AMIROOS_CFG_SSSP_ENABLE == true) |
110 | 27d0378b | Simon Welzel | /**
|
111 | * @brief Flag to set the module as SSSP master.
|
||
112 | * @details There must be only one module with this flag set to true in a system.
|
||
113 | */
|
||
114 | #if !defined(OS_CFG_SSSP_MASTER)
|
||
115 | #define AMIROOS_CFG_SSSP_MASTER true |
||
116 | #else
|
||
117 | #define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER
|
||
118 | #endif
|
||
119 | |||
120 | /**
|
||
121 | * @brief Flag to set the module to be the first in the stack.
|
||
122 | * @details There must be only one module with this flag set to true in a system.
|
||
123 | */
|
||
124 | #if !defined(OS_CFG_SSSP_STACK_START)
|
||
125 | #define AMIROOS_CFG_SSSP_STACK_START true |
||
126 | #else
|
||
127 | #define AMIROOS_CFG_SSSP_STACK_START OS_CFG_SSSP_STACK_START
|
||
128 | #endif
|
||
129 | |||
130 | /**
|
||
131 | * @brief Flag to set the module to be the last in the stack.
|
||
132 | * @details There must be only one module with this flag set to true in a system.
|
||
133 | */
|
||
134 | #if !defined(OS_CFG_SSSP_STACK_END)
|
||
135 | #define AMIROOS_CFG_SSSP_STACK_END true |
||
136 | #else
|
||
137 | #define AMIROOS_CFG_SSSP_STACK_END OS_CFG_SSSP_STACK_END
|
||
138 | #endif
|
||
139 | |||
140 | /**
|
||
141 | * @brief Delay time (in microseconds) how long a SSSP signal must be active.
|
||
142 | */
|
||
143 | #if !defined(OS_CFG_SSSP_SIGNALDELAY)
|
||
144 | #define AMIROOS_CFG_SSSP_SIGNALDELAY 1000 |
||
145 | #else
|
||
146 | #define AMIROOS_CFG_SSSP_SIGNALDELAY OS_CFG_SSSP_SIGNALDELAY
|
||
147 | #endif
|
||
148 | |||
149 | /**
|
||
150 | * @brief Time boundary for robot wide clock synchronization in microseconds.
|
||
151 | * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
|
||
152 | * All modules need to align their local uptime to the nearest multiple of this value.
|
||
153 | */
|
||
154 | #if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
|
||
155 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD 1000000 |
||
156 | #else
|
||
157 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD
|
||
158 | #endif
|
||
159 | |||
160 | 1ef74af5 | Simon Welzel | #endif
|
161 | 27d0378b | Simon Welzel | /** @} */
|
162 | |||
163 | /*===========================================================================*/
|
||
164 | /**
|
||
165 | * @name System shell options
|
||
166 | * @{
|
||
167 | */
|
||
168 | /*===========================================================================*/
|
||
169 | |||
170 | /**
|
||
171 | * @brief Shell enable flag.
|
||
172 | */
|
||
173 | #if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true) |
||
174 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
175 | #elif (AMIROOS_CFG_TESTS_ENABLE == true) |
||
176 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
177 | #else
|
||
178 | #define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE
|
||
179 | #endif
|
||
180 | |||
181 | /**
|
||
182 | * @brief Shell thread stack size.
|
||
183 | */
|
||
184 | #if !defined(OS_CFG_SHELL_STACKSIZE)
|
||
185 | #define AMIROOS_CFG_SHELL_STACKSIZE 1024 |
||
186 | #else
|
||
187 | #define AMIROOS_CFG_SHELL_STACKSIZE OS_CFG_SHELL_STACKSIZE
|
||
188 | #endif
|
||
189 | |||
190 | /**
|
||
191 | * @brief Shell thread priority.
|
||
192 | * @details Thread priorities are specified as an integer value.
|
||
193 | * Predefined ranges are:
|
||
194 | * lowest ┌ THD_LOWPRIO_MIN
|
||
195 | * │ ...
|
||
196 | * └ THD_LOWPRIO_MAX
|
||
197 | * ┌ THD_NORMALPRIO_MIN
|
||
198 | * │ ...
|
||
199 | * └ THD_NORMALPRIO_MAX
|
||
200 | * ┌ THD_HIGHPRIO_MIN
|
||
201 | * │ ...
|
||
202 | * └ THD_HIGHPRIO_MAX
|
||
203 | * ┌ THD_RTPRIO_MIN
|
||
204 | * │ ...
|
||
205 | * highest └ THD_RTPRIO_MAX
|
||
206 | */
|
||
207 | #if !defined(OS_CFG_SHELL_THREADPRIO)
|
||
208 | #define AMIROOS_CFG_SHELL_THREADPRIO AOS_THD_NORMALPRIO_MIN
|
||
209 | #else
|
||
210 | #define AMIROOS_CFG_SHELL_THREADPRIO OS_CFG_SHELL_THREADPRIO
|
||
211 | #endif
|
||
212 | |||
213 | /**
|
||
214 | * @brief Shell maximum input line length.
|
||
215 | */
|
||
216 | #if !defined(OS_CFG_SHELL_LINEWIDTH)
|
||
217 | #define AMIROOS_CFG_SHELL_LINEWIDTH 64 |
||
218 | #else
|
||
219 | #define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
||
220 | #endif
|
||
221 | |||
222 | /**
|
||
223 | * @brief Shell maximum number of arguments.
|
||
224 | */
|
||
225 | #if !defined(OS_CFG_SHELL_MAXARGS)
|
||
226 | #define AMIROOS_CFG_SHELL_MAXARGS 4 |
||
227 | #else
|
||
228 | #define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
||
229 | #endif
|
||
230 | |||
231 | /** @} */
|
||
232 | |||
233 | #endif /* _AOSCONF_H_ */ |
||
234 | |||
235 | /** @} */ |