amiro-os / os / modules / PowerManagement_1-1 / aosconf.h @ dd8738ea
History | View | Annotate | Download (4.183 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 | * @brief Shell maximum input line length.
|
||
133 | */
|
||
134 | #if !defined(OS_CFG_SHELL_LINEWIDTH)
|
||
135 | #define AMIROOS_CFG_SHELL_LINEWIDTH 64 |
||
136 | #else
|
||
137 | #define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
||
138 | #endif
|
||
139 | |||
140 | /**
|
||
141 | * @brief Shell maximum number of arguments.
|
||
142 | */
|
||
143 | #if !defined(OS_CFG_SHELL_MAXARGS)
|
||
144 | #define AMIROOS_CFG_SHELL_MAXARGS 4 |
||
145 | #else
|
||
146 | #define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
||
147 | #endif
|
||
148 | |||
149 | /** @} */
|
||
150 | |||
151 | #endif // _AOSCONF_H_ |