amiro-os / modules / PowerManagement_1-1 / aosconf.h @ 4f3a1f5e
History | View | Annotate | Download (4.967 KB)
1 | e545e620 | Thomas Schöpping | /*
|
---|---|---|---|
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 | #ifndef _AOSCONF_H_
|
||
20 | #define _AOSCONF_H_
|
||
21 | |||
22 | /*
|
||
23 | * compatibility guards
|
||
24 | */
|
||
25 | #define _AMIRO_OS_CFG_
|
||
26 | #define _AMIRO_OS_CFG_VERSION_MAJOR_ 2 |
||
27 | #define _AMIRO_OS_CFG_VERSION_MINOR_ 0 |
||
28 | |||
29 | #include <stdbool.h> |
||
30 | |||
31 | /*===========================================================================*/
|
||
32 | /**
|
||
33 | * @name Kernel parameters and options
|
||
34 | * @{
|
||
35 | */
|
||
36 | /*===========================================================================*/
|
||
37 | |||
38 | /*
|
||
39 | * Include an external configuration file to override the following default settings only if required.
|
||
40 | */
|
||
41 | #if defined(AMIRO_APPS) && (AMIRO_APPS == true) |
||
42 | #include <osconf.h> |
||
43 | #endif
|
||
44 | |||
45 | /**
|
||
46 | * @brief Flag to set the module as SSSP master.
|
||
47 | */
|
||
48 | #if !defined(OS_CFG_SSSP_MASTER)
|
||
49 | #define AMIROOS_CFG_SSSP_MASTER true |
||
50 | #else
|
||
51 | #define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER
|
||
52 | #endif
|
||
53 | |||
54 | /**
|
||
55 | * @brief Time boundary for robot wide clock synchronization in microseconds.
|
||
56 | * @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
|
||
57 | * All modules need to align their local uptime to the nearest multiple of this value.
|
||
58 | */
|
||
59 | #if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
|
||
60 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD 1000000 |
||
61 | #else
|
||
62 | #define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD
|
||
63 | #endif
|
||
64 | |||
65 | /**
|
||
66 | * @brief Flag to enable/disable debug API.
|
||
67 | */
|
||
68 | #if !defined(OS_CFG_DBG)
|
||
69 | #define AMIROOS_CFG_DBG true |
||
70 | #else
|
||
71 | #define AMIROOS_CFG_DBG OS_CFG_DBG
|
||
72 | #endif
|
||
73 | |||
74 | /**
|
||
75 | * @brief Flag to enable/disable unit tests.
|
||
76 | */
|
||
77 | #if !defined(OS_CFG_TESTS_ENABLE)
|
||
78 | #define AMIROOS_CFG_TESTS_ENABLE true |
||
79 | #else
|
||
80 | #define AMIROOS_CFG_TESTS_ENABLE OS_CFG_TESTS_ENABLE
|
||
81 | #endif
|
||
82 | |||
83 | /**
|
||
84 | * @brief Flag to enable/disable profiling API.
|
||
85 | */
|
||
86 | #if !defined(OS_CFG_PROFILE)
|
||
87 | #define AMIROOS_CFG_PROFILE true |
||
88 | #else
|
||
89 | #define AMIROOS_CFG_PROFILE OS_CFG_PROFILE
|
||
90 | #endif
|
||
91 | |||
92 | /**
|
||
93 | * @brief Timeout value when waiting for events in the main loop in microseconds.
|
||
94 | * @details A value of 0 deactivates the timeout.
|
||
95 | */
|
||
96 | #if !defined(OS_CFG_MAIN_LOOP_TIMEOUT)
|
||
97 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT 0 |
||
98 | #else
|
||
99 | #define AMIROOS_CFG_MAIN_LOOP_TIMEOUT OS_CFG_MAIN_LOOP_TIMEOUT
|
||
100 | #endif
|
||
101 | |||
102 | /** @} */
|
||
103 | |||
104 | /*===========================================================================*/
|
||
105 | /**
|
||
106 | * @name System shell options
|
||
107 | * @{
|
||
108 | */
|
||
109 | /*===========================================================================*/
|
||
110 | |||
111 | /**
|
||
112 | * @brief Shell enable flag.
|
||
113 | */
|
||
114 | #if (AMIROOS_CFG_TESTS_ENABLE == false) && !defined(OS_CFG_SHELL_ENABLE) |
||
115 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
116 | #elif (AMIROOS_CFG_TESTS_ENABLE == true) |
||
117 | #define AMIROOS_CFG_SHELL_ENABLE true |
||
118 | #else
|
||
119 | #define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE
|
||
120 | #endif
|
||
121 | |||
122 | /**
|
||
123 | * @brief Shell thread stack size.
|
||
124 | */
|
||
125 | #if !defined(OS_CFG_SHELL_STACKSIZE)
|
||
126 | #define AMIROOS_CFG_SHELL_STACKSIZE 1024 |
||
127 | #else
|
||
128 | #define AMIROOS_CFG_SHELL_STACKSIZE OS_CFG_SHELL_STACKSIZE
|
||
129 | #endif
|
||
130 | |||
131 | /**
|
||
132 | 20205a98 | Thomas Schöpping | * @brief Shell thread priority.
|
133 | 512abac1 | Thomas Schöpping | * @details Thread priorities are specified as an integer value.
|
134 | * Predefined ranges are:
|
||
135 | * lowest ┌ THD_LOWPRIO_MIN
|
||
136 | * │ ...
|
||
137 | * └ THD_LOWPRIO_MAX
|
||
138 | * ┌ THD_NORMALPRIO_MIN
|
||
139 | * │ ...
|
||
140 | * └ THD_NORMALPRIO_MAX
|
||
141 | * ┌ THD_HIGHPRIO_MIN
|
||
142 | * │ ...
|
||
143 | * └ THD_HIGHPRIO_MAX
|
||
144 | * ┌ THD_RTPRIO_MIN
|
||
145 | * │ ...
|
||
146 | * highest └ THD_RTPRIO_MAX
|
||
147 | 20205a98 | Thomas Schöpping | */
|
148 | #if !defined(OS_CFG_SHELL_THREADPRIO)
|
||
149 | 512abac1 | Thomas Schöpping | #define AMIROOS_CFG_SHELL_THREADPRIO AOS_THD_NORMALPRIO_MIN
|
150 | 20205a98 | Thomas Schöpping | #else
|
151 | #define AMIROOS_CFG_SHELL_THREADPRIO OS_CFG_SHELL_THREADPRIO
|
||
152 | #endif
|
||
153 | |||
154 | /**
|
||
155 | e545e620 | Thomas Schöpping | * @brief Shell maximum input line length.
|
156 | */
|
||
157 | #if !defined(OS_CFG_SHELL_LINEWIDTH)
|
||
158 | #define AMIROOS_CFG_SHELL_LINEWIDTH 64 |
||
159 | #else
|
||
160 | #define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
||
161 | #endif
|
||
162 | |||
163 | /**
|
||
164 | * @brief Shell maximum number of arguments.
|
||
165 | */
|
||
166 | #if !defined(OS_CFG_SHELL_MAXARGS)
|
||
167 | #define AMIROOS_CFG_SHELL_MAXARGS 4 |
||
168 | #else
|
||
169 | #define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
||
170 | #endif
|
||
171 | |||
172 | /** @} */
|
||
173 | |||
174 | cb835a3e | Thomas Schöpping | #endif /* _AOSCONF_H_ */ |