amiro-os / modules / LightRing_1-0 / aosconf.h @ f1f56ad4
History | View | Annotate | Download (6.99 KB)
1 | e545e620 | Thomas Schöpping | /*
|
---|---|---|---|
2 | AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
||
3 | 84f0ce9e | Thomas Schöpping | Copyright (C) 2016..2019 Thomas Schöpping et al.
|
4 | e545e620 | Thomas Schöpping | |
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 | 53710ca3 | Marc Rothmann | /**
|
20 | * @file
|
||
21 | * @brief AMiRo-OS Configuration file for the LightRing v1.0 module.
|
||
22 | * @details Contains the application specific AMiRo-OS settings.
|
||
23 | *
|
||
24 | * @addtogroup lightring_aos_config
|
||
25 | * @{
|
||
26 | */
|
||
27 | |||
28 | e545e620 | Thomas Schöpping | #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 | 6b53f6bf | Thomas Schöpping | /*===========================================================================*/
|
48 | e545e620 | Thomas Schöpping | /**
|
49 | 6b53f6bf | Thomas Schöpping | * @name Kernel parameters and options
|
50 | * @{
|
||
51 | e545e620 | Thomas Schöpping | */
|
52 | 6b53f6bf | Thomas Schöpping | /*===========================================================================*/
|
53 | e545e620 | Thomas Schöpping | |
54 | /**
|
||
55 | 3e1a9c79 | Thomas Schöpping | * @brief Flag to enable/disable debug API and logic.
|
56 | e545e620 | Thomas Schöpping | */
|
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 | 3e1a9c79 | Thomas Schöpping | * @brief Flag to enable/disable profiling API and logic.
|
74 | e545e620 | Thomas Schöpping | */
|
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 | 2920c6b7 | Thomas Schöpping | * @brief Mask for the control thread to listen to certain IO events.
|
83 | * @note Any mandatory events (e.g. for SSSP) are enabled implicitely despite this configuration.
|
||
84 | */
|
||
85 | #if !defined(OS_CFG_MAIN_LOOP_IOEVENT_MASK)
|
||
86 | #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK 0 |
||
87 | #else
|
||
88 | #define AMIROOS_CFG_MAIN_LOOP_IOEVENT_MASK OS_CFG_MAIN_LOOP_IOEVENT_MASK
|
||
89 | #endif
|
||
90 | |||
91 | /**
|
||
92 | e545e620 | Thomas Schöpping | * @brief Timeout value when waiting for events in the main loop in microseconds.
|
93 | * @details A value of 0 deactivates the timeout.
|
||
94 | */
|
||
95 | #if !defined(OS_CFG_MAIN_LOOP_TIMEOUT)
|
||
96 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT 0 |
||
97 | #else
|
||
98 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT OS_CFG_MAIN_LOOP_TIMEOUT
|
||
99 | #endif
|
||
100 | |||
101 | /** @} */
|
||
102 | |||
103 | /*===========================================================================*/
|
||
104 | 6b53f6bf | Thomas Schöpping | /**
|
105 | * @name SSSP (Startup Shutdown Synchronization Protocol) configuration.
|
||
106 | * @{
|
||
107 | */
|
||
108 | /*===========================================================================*/
|
||
109 | |||
110 | /**
|
||
111 | 9ebb11a9 | Thomas Schöpping | * @brief Flag to enable SSSP.
|
112 | */
|
||
113 | #if !defined(OS_CFG_SSSP_ENABLE)
|
||
114 | #define AMIROOS_CFG_SSSP_ENABLE true |
||
115 | #else
|
||
116 | #define AMIROOS_CFG_SSSP_ENABLE OS_CFG_SSSP_ENABLE
|
||
117 | #endif
|
||
118 | |||
119 | /**
|
||
120 | 6b53f6bf | Thomas Schöpping | * @brief Flag to set the module as SSSP master.
|
121 | * @details There must be only one module with this flag set to true in a system.
|
||
122 | */
|
||
123 | #if !defined(OS_CFG_SSSP_MASTER)
|
||
124 | #define AMIROOS_CFG_SSSP_MASTER false |
||
125 | #else
|
||
126 | #define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER
|
||
127 | #endif
|
||
128 | |||
129 | /**
|
||
130 | 933df08e | Thomas Schöpping | * @brief Flag to set the module to be the first in the stack.
|
131 | * @details There must be only one module with this flag set to true in a system.
|
||
132 | */
|
||
133 | #if !defined(OS_CFG_SSSP_STACK_START)
|
||
134 | #define AMIROOS_CFG_SSSP_STACK_START false |
||
135 | #else
|
||
136 | #define AMIROOS_CFG_SSSP_STACK_START OS_CFG_SSSP_STACK_START
|
||
137 | #endif
|
||
138 | |||
139 | /**
|
||
140 | * @brief Flag to set the module to be the last in the stack.
|
||
141 | * @details There must be only one module with this flag set to true in a system.
|
||
142 | */
|
||
143 | #if !defined(OS_CFG_SSSP_STACK_END)
|
||
144 | #define AMIROOS_CFG_SSSP_STACK_END true |
||
145 | #else
|
||
146 | #define AMIROOS_CFG_SSSP_STACK_END OS_CFG_SSSP_STACK_END
|
||
147 | #endif
|
||
148 | |||
149 | /**
|
||
150 | * @brief Delay time (in microseconds) how long a SSSP signal must be active.
|
||
151 | */
|
||
152 | #if !defined(OS_CFG_SSSP_SIGNALDELAY)
|
||
153 | #define AMIROOS_CFG_SSSP_SIGNALDELAY 1000 |
||
154 | #else
|
||
155 | #define AMIROOS_CFG_SSSP_SIGNALDELAY OS_CFG_SSSP_SIGNALDELAY
|
||
156 | #endif
|
||
157 | |||
158 | /**
|
||
159 | 6b53f6bf | Thomas Schöpping | * @brief Time boundary for robot wide clock synchronization in microseconds.
|
160 | * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
|
||
161 | * All modules need to align their local uptime to the nearest multiple of this value.
|
||
162 | */
|
||
163 | #if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
|
||
164 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD 1000000 |
||
165 | #else
|
||
166 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD
|
||
167 | #endif
|
||
168 | |||
169 | /** @} */
|
||
170 | |||
171 | /*===========================================================================*/
|
||
172 | e545e620 | Thomas Schöpping | /**
|
173 | * @name System shell options
|
||
174 | * @{
|
||
175 | */
|
||
176 | /*===========================================================================*/
|
||
177 | |||
178 | /**
|
||
179 | * @brief Shell enable flag.
|
||
180 | */
|
||
181 | 3e1a9c79 | Thomas Schöpping | #if !defined(OS_CFG_SHELL_ENABLE) && (AMIROOS_CFG_TESTS_ENABLE != true) |
182 | e545e620 | Thomas Schöpping | #define AMIROOS_CFG_SHELL_ENABLE true |
183 | #elif (AMIROOS_CFG_TESTS_ENABLE == true) |
||
184 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
185 | #else
|
||
186 | #define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE
|
||
187 | #endif
|
||
188 | |||
189 | /**
|
||
190 | * @brief Shell thread stack size.
|
||
191 | */
|
||
192 | #if !defined(OS_CFG_SHELL_STACKSIZE)
|
||
193 | #define AMIROOS_CFG_SHELL_STACKSIZE 1024 |
||
194 | #else
|
||
195 | #define AMIROOS_CFG_SHELL_STACKSIZE OS_CFG_SHELL_STACKSIZE
|
||
196 | #endif
|
||
197 | |||
198 | /**
|
||
199 | 20205a98 | Thomas Schöpping | * @brief Shell thread priority.
|
200 | 512abac1 | Thomas Schöpping | * @details Thread priorities are specified as an integer value.
|
201 | * Predefined ranges are:
|
||
202 | * lowest ┌ THD_LOWPRIO_MIN
|
||
203 | * │ ...
|
||
204 | * └ THD_LOWPRIO_MAX
|
||
205 | * ┌ THD_NORMALPRIO_MIN
|
||
206 | * │ ...
|
||
207 | * └ THD_NORMALPRIO_MAX
|
||
208 | * ┌ THD_HIGHPRIO_MIN
|
||
209 | * │ ...
|
||
210 | * └ THD_HIGHPRIO_MAX
|
||
211 | * ┌ THD_RTPRIO_MIN
|
||
212 | * │ ...
|
||
213 | * highest └ THD_RTPRIO_MAX
|
||
214 | 20205a98 | Thomas Schöpping | */
|
215 | #if !defined(OS_CFG_SHELL_THREADPRIO)
|
||
216 | 512abac1 | Thomas Schöpping | #define AMIROOS_CFG_SHELL_THREADPRIO AOS_THD_NORMALPRIO_MIN
|
217 | 20205a98 | Thomas Schöpping | #else
|
218 | #define AMIROOS_CFG_SHELL_THREADPRIO OS_CFG_SHELL_THREADPRIO
|
||
219 | #endif
|
||
220 | |||
221 | /**
|
||
222 | e545e620 | Thomas Schöpping | * @brief Shell maximum input line length.
|
223 | */
|
||
224 | #if !defined(OS_CFG_SHELL_LINEWIDTH)
|
||
225 | #define AMIROOS_CFG_SHELL_LINEWIDTH 64 |
||
226 | #else
|
||
227 | #define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
||
228 | #endif
|
||
229 | |||
230 | /**
|
||
231 | * @brief Shell maximum number of arguments.
|
||
232 | */
|
||
233 | #if !defined(OS_CFG_SHELL_MAXARGS)
|
||
234 | #define AMIROOS_CFG_SHELL_MAXARGS 4 |
||
235 | #else
|
||
236 | #define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
||
237 | #endif
|
||
238 | |||
239 | /** @} */
|
||
240 | |||
241 | cb835a3e | Thomas Schöpping | #endif /* _AOSCONF_H_ */ |
242 | e545e620 | Thomas Schöpping | |
243 | 53710ca3 | Marc Rothmann | /** @} */ |