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