amiro-os / modules / DiWheelDrive_1-1 / aosconf.h @ 933df08e
History | View | Annotate | Download (6.203 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 false |
| 97 |
#else
|
| 98 |
#define AMIROOS_CFG_SSSP_MASTER OS_CFG_SSSP_MASTER
|
| 99 |
#endif
|
| 100 |
|
| 101 |
/**
|
| 102 |
* @brief Flag to set the module to be the first in the stack.
|
| 103 |
* @details There must be only one module with this flag set to true in a system.
|
| 104 |
*/
|
| 105 |
#if !defined(OS_CFG_SSSP_STACK_START)
|
| 106 |
#define AMIROOS_CFG_SSSP_STACK_START true |
| 107 |
#else
|
| 108 |
#define AMIROOS_CFG_SSSP_STACK_START OS_CFG_SSSP_STACK_START
|
| 109 |
#endif
|
| 110 |
|
| 111 |
/**
|
| 112 |
* @brief Flag to set the module to be the last in the stack.
|
| 113 |
* @details There must be only one module with this flag set to true in a system.
|
| 114 |
*/
|
| 115 |
#if !defined(OS_CFG_SSSP_STACK_END)
|
| 116 |
#define AMIROOS_CFG_SSSP_STACK_END false |
| 117 |
#else
|
| 118 |
#define AMIROOS_CFG_SSSP_STACK_END OS_CFG_SSSP_STACK_END
|
| 119 |
#endif
|
| 120 |
|
| 121 |
/**
|
| 122 |
* @brief Delay time (in microseconds) how long a SSSP signal must be active.
|
| 123 |
*/
|
| 124 |
#if !defined(OS_CFG_SSSP_SIGNALDELAY)
|
| 125 |
#define AMIROOS_CFG_SSSP_SIGNALDELAY 1000 |
| 126 |
#else
|
| 127 |
#define AMIROOS_CFG_SSSP_SIGNALDELAY OS_CFG_SSSP_SIGNALDELAY
|
| 128 |
#endif
|
| 129 |
|
| 130 |
/**
|
| 131 |
* @brief Time boundary for robot wide clock synchronization in microseconds.
|
| 132 |
* @details Whenever the SSSP S (snychronization) signal gets logically deactivated,
|
| 133 |
* All modules need to align their local uptime to the nearest multiple of this value.
|
| 134 |
*/
|
| 135 |
#if !defined(OS_CFG_SSSP_SYSSYNCPERIOD)
|
| 136 |
#define AMIROOS_CFG_SSSP_SYSSYNCPERIOD 1000000 |
| 137 |
#else
|
| 138 |
#define AMIROOS_CFG_SSSP_SYSSYNCPERIOD OS_CFG_SSSP_SYSSYNCPERIOD
|
| 139 |
#endif
|
| 140 |
|
| 141 |
/** @} */
|
| 142 |
|
| 143 |
/*===========================================================================*/
|
| 144 |
/**
|
| 145 |
* @name System shell options
|
| 146 |
* @{
|
| 147 |
*/
|
| 148 |
/*===========================================================================*/
|
| 149 |
|
| 150 |
/**
|
| 151 |
* @brief Shell enable flag.
|
| 152 |
*/
|
| 153 |
#if (AMIROOS_CFG_TESTS_ENABLE != true) && !defined(OS_CFG_SHELL_ENABLE) |
| 154 |
#define AMIROOS_CFG_SHELL_ENABLE true |
| 155 |
#elif (AMIROOS_CFG_TESTS_ENABLE == true) |
| 156 |
#define AMIROOS_CFG_SHELL_ENABLE true |
| 157 |
#else
|
| 158 |
#define AMIROOS_CFG_SHELL_ENABLE OS_CFG_SHELL_ENABLE
|
| 159 |
#endif
|
| 160 |
|
| 161 |
/**
|
| 162 |
* @brief Shell thread stack size.
|
| 163 |
*/
|
| 164 |
#if !defined(OS_CFG_SHELL_STACKSIZE)
|
| 165 |
#define AMIROOS_CFG_SHELL_STACKSIZE 1024 |
| 166 |
#else
|
| 167 |
#define AMIROOS_CFG_SHELL_STACKSIZE OS_CFG_SHELL_STACKSIZE
|
| 168 |
#endif
|
| 169 |
|
| 170 |
/**
|
| 171 |
* @brief Shell thread priority.
|
| 172 |
* @details Thread priorities are specified as an integer value.
|
| 173 |
* Predefined ranges are:
|
| 174 |
* lowest ┌ THD_LOWPRIO_MIN
|
| 175 |
* │ ...
|
| 176 |
* └ THD_LOWPRIO_MAX
|
| 177 |
* ┌ THD_NORMALPRIO_MIN
|
| 178 |
* │ ...
|
| 179 |
* └ THD_NORMALPRIO_MAX
|
| 180 |
* ┌ THD_HIGHPRIO_MIN
|
| 181 |
* │ ...
|
| 182 |
* └ THD_HIGHPRIO_MAX
|
| 183 |
* ┌ THD_RTPRIO_MIN
|
| 184 |
* │ ...
|
| 185 |
* highest └ THD_RTPRIO_MAX
|
| 186 |
*/
|
| 187 |
#if !defined(OS_CFG_SHELL_THREADPRIO)
|
| 188 |
#define AMIROOS_CFG_SHELL_THREADPRIO AOS_THD_NORMALPRIO_MIN
|
| 189 |
#else
|
| 190 |
#define AMIROOS_CFG_SHELL_THREADPRIO OS_CFG_SHELL_THREADPRIO
|
| 191 |
#endif
|
| 192 |
|
| 193 |
/**
|
| 194 |
* @brief Shell maximum input line length.
|
| 195 |
*/
|
| 196 |
#if !defined(OS_CFG_SHELL_LINEWIDTH)
|
| 197 |
#define AMIROOS_CFG_SHELL_LINEWIDTH 64 |
| 198 |
#else
|
| 199 |
#define AMIROOS_CFG_SHELL_LINEWIDTH OS_CFG_SHELL_LINEWIDTH
|
| 200 |
#endif
|
| 201 |
|
| 202 |
/**
|
| 203 |
* @brief Shell maximum number of arguments.
|
| 204 |
*/
|
| 205 |
#if !defined(OS_CFG_SHELL_MAXARGS)
|
| 206 |
#define AMIROOS_CFG_SHELL_MAXARGS 4 |
| 207 |
#else
|
| 208 |
#define AMIROOS_CFG_SHELL_MAXARGS OS_CFG_SHELL_MAXARGS
|
| 209 |
#endif
|
| 210 |
|
| 211 |
/** @} */
|
| 212 |
|
| 213 |
#endif /* _AOSCONF_H_ */ |
| 214 |
|