amiro-os / os / modules / LightRing_1-0 / halconf.h @ bdf72fa0
History | View | Annotate | Download (11.608 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 | 3f899f5d | Thomas Schöpping | /**
|
| 20 | e545e620 | Thomas Schöpping | * @file os/modules/LightRing/halconf.h
|
| 21 | * @brief HAL configuration header for the LightRing module.
|
||
| 22 | 3f899f5d | Thomas Schöpping | * @details HAL configuration file, this file allows to enable or disable the
|
| 23 | * various device drivers from your application. You may also use
|
||
| 24 | * this file in order to override the device drivers default settings.
|
||
| 25 | *
|
||
| 26 | * @addtogroup HAL_CONF
|
||
| 27 | * @{
|
||
| 28 | */
|
||
| 29 | |||
| 30 | 58fe0e0b | Thomas Schöpping | #ifndef _HALCONF_H_
|
| 31 | #define _HALCONF_H_
|
||
| 32 | |||
| 33 | /**
|
||
| 34 | * @brief Enables the PAL subsystem.
|
||
| 35 | */
|
||
| 36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||
| 37 | #define HAL_USE_PAL TRUE
|
||
| 38 | #endif
|
||
| 39 | |||
| 40 | /**
|
||
| 41 | * @brief Enables the ADC subsystem.
|
||
| 42 | */
|
||
| 43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||
| 44 | #define HAL_USE_ADC FALSE
|
||
| 45 | #endif
|
||
| 46 | |||
| 47 | /**
|
||
| 48 | * @brief Enables the CAN subsystem.
|
||
| 49 | */
|
||
| 50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||
| 51 | #define HAL_USE_CAN TRUE
|
||
| 52 | #endif
|
||
| 53 | |||
| 54 | /**
|
||
| 55 | e545e620 | Thomas Schöpping | * @brief Enables the DAC subsystem.
|
| 56 | */
|
||
| 57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||
| 58 | #define HAL_USE_DAC FALSE
|
||
| 59 | #endif
|
||
| 60 | |||
| 61 | /**
|
||
| 62 | 58fe0e0b | Thomas Schöpping | * @brief Enables the EXT subsystem.
|
| 63 | */
|
||
| 64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||
| 65 | #define HAL_USE_EXT TRUE
|
||
| 66 | #endif
|
||
| 67 | |||
| 68 | /**
|
||
| 69 | * @brief Enables the GPT subsystem.
|
||
| 70 | */
|
||
| 71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||
| 72 | #define HAL_USE_GPT FALSE
|
||
| 73 | #endif
|
||
| 74 | |||
| 75 | /**
|
||
| 76 | * @brief Enables the I2C subsystem.
|
||
| 77 | */
|
||
| 78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||
| 79 | #define HAL_USE_I2C TRUE
|
||
| 80 | #endif
|
||
| 81 | |||
| 82 | /**
|
||
| 83 | e545e620 | Thomas Schöpping | * @brief Enables the I2S subsystem.
|
| 84 | */
|
||
| 85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||
| 86 | #define HAL_USE_I2S FALSE
|
||
| 87 | #endif
|
||
| 88 | |||
| 89 | /**
|
||
| 90 | 58fe0e0b | Thomas Schöpping | * @brief Enables the ICU subsystem.
|
| 91 | */
|
||
| 92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||
| 93 | #define HAL_USE_ICU FALSE
|
||
| 94 | #endif
|
||
| 95 | |||
| 96 | /**
|
||
| 97 | * @brief Enables the MAC subsystem.
|
||
| 98 | */
|
||
| 99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||
| 100 | #define HAL_USE_MAC FALSE
|
||
| 101 | #endif
|
||
| 102 | |||
| 103 | /**
|
||
| 104 | * @brief Enables the MMC_SPI subsystem.
|
||
| 105 | */
|
||
| 106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||
| 107 | #define HAL_USE_MMC_SPI FALSE
|
||
| 108 | #endif
|
||
| 109 | |||
| 110 | /**
|
||
| 111 | * @brief Enables the PWM subsystem.
|
||
| 112 | */
|
||
| 113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||
| 114 | e545e620 | Thomas Schöpping | #define HAL_USE_PWM FALSE
|
| 115 | 58fe0e0b | Thomas Schöpping | #endif
|
| 116 | |||
| 117 | /**
|
||
| 118 | * @brief Enables the RTC subsystem.
|
||
| 119 | */
|
||
| 120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||
| 121 | e545e620 | Thomas Schöpping | #define HAL_USE_RTC TRUE
|
| 122 | 58fe0e0b | Thomas Schöpping | #endif
|
| 123 | |||
| 124 | /**
|
||
| 125 | * @brief Enables the SDC subsystem.
|
||
| 126 | */
|
||
| 127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||
| 128 | #define HAL_USE_SDC FALSE
|
||
| 129 | #endif
|
||
| 130 | |||
| 131 | /**
|
||
| 132 | * @brief Enables the SERIAL subsystem.
|
||
| 133 | */
|
||
| 134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||
| 135 | #define HAL_USE_SERIAL TRUE
|
||
| 136 | #endif
|
||
| 137 | |||
| 138 | /**
|
||
| 139 | * @brief Enables the SERIAL over USB subsystem.
|
||
| 140 | */
|
||
| 141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||
| 142 | #define HAL_USE_SERIAL_USB FALSE
|
||
| 143 | #endif
|
||
| 144 | |||
| 145 | /**
|
||
| 146 | * @brief Enables the SPI subsystem.
|
||
| 147 | */
|
||
| 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||
| 149 | #define HAL_USE_SPI TRUE
|
||
| 150 | #endif
|
||
| 151 | |||
| 152 | /**
|
||
| 153 | * @brief Enables the UART subsystem.
|
||
| 154 | */
|
||
| 155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||
| 156 | #define HAL_USE_UART FALSE
|
||
| 157 | #endif
|
||
| 158 | |||
| 159 | /**
|
||
| 160 | * @brief Enables the USB subsystem.
|
||
| 161 | */
|
||
| 162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||
| 163 | #define HAL_USE_USB FALSE
|
||
| 164 | #endif
|
||
| 165 | |||
| 166 | /**
|
||
| 167 | e545e620 | Thomas Schöpping | * @brief Enables the WDG subsystem.
|
| 168 | */
|
||
| 169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||
| 170 | #define HAL_USE_WDG FALSE
|
||
| 171 | #endif
|
||
| 172 | |||
| 173 | /**
|
||
| 174 | 58fe0e0b | Thomas Schöpping | * @brief Enables the QEI subsystem.
|
| 175 | */
|
||
| 176 | #if !defined(HAL_USE_QEI) || defined(__DOXYGEN__)
|
||
| 177 | e545e620 | Thomas Schöpping | #define HAL_USE_QEI FALSE
|
| 178 | 58fe0e0b | Thomas Schöpping | #endif
|
| 179 | |||
| 180 | /*===========================================================================*/
|
||
| 181 | /* ADC driver related settings. */
|
||
| 182 | /*===========================================================================*/
|
||
| 183 | |||
| 184 | /**
|
||
| 185 | * @brief Enables synchronous APIs.
|
||
| 186 | * @note Disabling this option saves both code and data space.
|
||
| 187 | */
|
||
| 188 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||
| 189 | e545e620 | Thomas Schöpping | #define ADC_USE_WAIT FALSE
|
| 190 | 58fe0e0b | Thomas Schöpping | #endif
|
| 191 | |||
| 192 | /**
|
||
| 193 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||
| 194 | * @note Disabling this option saves both code and data space.
|
||
| 195 | */
|
||
| 196 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||
| 197 | e545e620 | Thomas Schöpping | #define ADC_USE_MUTUAL_EXCLUSION FALSE
|
| 198 | 58fe0e0b | Thomas Schöpping | #endif
|
| 199 | |||
| 200 | /*===========================================================================*/
|
||
| 201 | /* CAN driver related settings. */
|
||
| 202 | /*===========================================================================*/
|
||
| 203 | |||
| 204 | /**
|
||
| 205 | * @brief Sleep mode related APIs inclusion switch.
|
||
| 206 | */
|
||
| 207 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||
| 208 | e545e620 | Thomas Schöpping | #define CAN_USE_SLEEP_MODE FALSE
|
| 209 | 58fe0e0b | Thomas Schöpping | #endif
|
| 210 | |||
| 211 | /*===========================================================================*/
|
||
| 212 | /* I2C driver related settings. */
|
||
| 213 | /*===========================================================================*/
|
||
| 214 | |||
| 215 | /**
|
||
| 216 | * @brief Enables the mutual exclusion APIs on the I2C bus.
|
||
| 217 | */
|
||
| 218 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||
| 219 | #define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||
| 220 | #endif
|
||
| 221 | |||
| 222 | /*===========================================================================*/
|
||
| 223 | /* MAC driver related settings. */
|
||
| 224 | /*===========================================================================*/
|
||
| 225 | |||
| 226 | /**
|
||
| 227 | * @brief Enables an event sources for incoming packets.
|
||
| 228 | */
|
||
| 229 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||
| 230 | #define MAC_USE_ZERO_COPY FALSE
|
||
| 231 | #endif
|
||
| 232 | |||
| 233 | /**
|
||
| 234 | * @brief Enables an event sources for incoming packets.
|
||
| 235 | */
|
||
| 236 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||
| 237 | e545e620 | Thomas Schöpping | #define MAC_USE_EVENTS FALSE
|
| 238 | 58fe0e0b | Thomas Schöpping | #endif
|
| 239 | |||
| 240 | /*===========================================================================*/
|
||
| 241 | /* MMC_SPI driver related settings. */
|
||
| 242 | /*===========================================================================*/
|
||
| 243 | |||
| 244 | /**
|
||
| 245 | * @brief Delays insertions.
|
||
| 246 | * @details If enabled this options inserts delays into the MMC waiting
|
||
| 247 | * routines releasing some extra CPU time for the threads with
|
||
| 248 | * lower priority, this may slow down the driver a bit however.
|
||
| 249 | * This option is recommended also if the SPI driver does not
|
||
| 250 | * use a DMA channel and heavily loads the CPU.
|
||
| 251 | */
|
||
| 252 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||
| 253 | e545e620 | Thomas Schöpping | #define MMC_NICE_WAITING FALSE
|
| 254 | 58fe0e0b | Thomas Schöpping | #endif
|
| 255 | |||
| 256 | /*===========================================================================*/
|
||
| 257 | /* SDC driver related settings. */
|
||
| 258 | /*===========================================================================*/
|
||
| 259 | |||
| 260 | /**
|
||
| 261 | * @brief Number of initialization attempts before rejecting the card.
|
||
| 262 | * @note Attempts are performed at 10mS intervals.
|
||
| 263 | */
|
||
| 264 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||
| 265 | #define SDC_INIT_RETRY 100 |
||
| 266 | #endif
|
||
| 267 | |||
| 268 | /**
|
||
| 269 | * @brief Include support for MMC cards.
|
||
| 270 | * @note MMC support is not yet implemented so this option must be kept
|
||
| 271 | * at @p FALSE.
|
||
| 272 | */
|
||
| 273 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||
| 274 | #define SDC_MMC_SUPPORT FALSE
|
||
| 275 | #endif
|
||
| 276 | |||
| 277 | /**
|
||
| 278 | * @brief Delays insertions.
|
||
| 279 | * @details If enabled this options inserts delays into the MMC waiting
|
||
| 280 | * routines releasing some extra CPU time for the threads with
|
||
| 281 | * lower priority, this may slow down the driver a bit however.
|
||
| 282 | */
|
||
| 283 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||
| 284 | e545e620 | Thomas Schöpping | #define SDC_NICE_WAITING FALSE
|
| 285 | 58fe0e0b | Thomas Schöpping | #endif
|
| 286 | |||
| 287 | /*===========================================================================*/
|
||
| 288 | /* SERIAL driver related settings. */
|
||
| 289 | /*===========================================================================*/
|
||
| 290 | |||
| 291 | /**
|
||
| 292 | * @brief Default bit rate.
|
||
| 293 | * @details Configuration parameter, this is the baud rate selected for the
|
||
| 294 | * default configuration.
|
||
| 295 | */
|
||
| 296 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||
| 297 | e545e620 | Thomas Schöpping | #define SERIAL_DEFAULT_BITRATE 115200 |
| 298 | 58fe0e0b | Thomas Schöpping | #endif
|
| 299 | |||
| 300 | /**
|
||
| 301 | * @brief Serial buffers size.
|
||
| 302 | * @details Configuration parameter, you can change the depth of the queue
|
||
| 303 | * buffers depending on the requirements of your application.
|
||
| 304 | e545e620 | Thomas Schöpping | * @note The default is 16 bytes for both the transmission and receive
|
| 305 | 58fe0e0b | Thomas Schöpping | * buffers.
|
| 306 | */
|
||
| 307 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||
| 308 | #define SERIAL_BUFFERS_SIZE 16 |
||
| 309 | #endif
|
||
| 310 | |||
| 311 | /*===========================================================================*/
|
||
| 312 | e545e620 | Thomas Schöpping | /* SERIAL_USB driver related setting. */
|
| 313 | /*===========================================================================*/
|
||
| 314 | |||
| 315 | /**
|
||
| 316 | * @brief Serial over USB buffers size.
|
||
| 317 | * @details Configuration parameter, the buffer size must be a multiple of
|
||
| 318 | * the USB data endpoint maximum packet size.
|
||
| 319 | * @note The default is 256 bytes for both the transmission and receive
|
||
| 320 | * buffers.
|
||
| 321 | */
|
||
| 322 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||
| 323 | #define SERIAL_USB_BUFFERS_SIZE 256 |
||
| 324 | #endif
|
||
| 325 | |||
| 326 | /**
|
||
| 327 | * @brief Serial over USB number of buffers.
|
||
| 328 | * @note The default is 2 buffers.
|
||
| 329 | */
|
||
| 330 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||
| 331 | #define SERIAL_USB_BUFFERS_NUMBER 2 |
||
| 332 | #endif
|
||
| 333 | |||
| 334 | /*===========================================================================*/
|
||
| 335 | 58fe0e0b | Thomas Schöpping | /* SPI driver related settings. */
|
| 336 | /*===========================================================================*/
|
||
| 337 | |||
| 338 | /**
|
||
| 339 | * @brief Enables synchronous APIs.
|
||
| 340 | * @note Disabling this option saves both code and data space.
|
||
| 341 | */
|
||
| 342 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||
| 343 | #define SPI_USE_WAIT TRUE
|
||
| 344 | #endif
|
||
| 345 | |||
| 346 | /**
|
||
| 347 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||
| 348 | * @note Disabling this option saves both code and data space.
|
||
| 349 | */
|
||
| 350 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||
| 351 | #define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||
| 352 | #endif
|
||
| 353 | |||
| 354 | e545e620 | Thomas Schöpping | /*===========================================================================*/
|
| 355 | /* UART driver related settings. */
|
||
| 356 | /*===========================================================================*/
|
||
| 357 | |||
| 358 | /**
|
||
| 359 | * @brief Enables synchronous APIs.
|
||
| 360 | * @note Disabling this option saves both code and data space.
|
||
| 361 | */
|
||
| 362 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||
| 363 | #define UART_USE_WAIT FALSE
|
||
| 364 | #endif
|
||
| 365 | |||
| 366 | /**
|
||
| 367 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||
| 368 | * @note Disabling this option saves both code and data space.
|
||
| 369 | */
|
||
| 370 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||
| 371 | #define UART_USE_MUTUAL_EXCLUSION FALSE
|
||
| 372 | #endif
|
||
| 373 | |||
| 374 | /*===========================================================================*/
|
||
| 375 | /* USB driver related settings. */
|
||
| 376 | /*===========================================================================*/
|
||
| 377 | |||
| 378 | /**
|
||
| 379 | * @brief Enables synchronous APIs.
|
||
| 380 | * @note Disabling this option saves both code and data space.
|
||
| 381 | */
|
||
| 382 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||
| 383 | #define USB_USE_WAIT FALSE
|
||
| 384 | #endif
|
||
| 385 | |||
| 386 | 58fe0e0b | Thomas Schöpping | #endif /* _HALCONF_H_ */ |
| 387 | 3f899f5d | Thomas Schöpping | |
| 388 | /** @} */ |