Subversion Repositories chibiosIgnition

Rev

Rev 6 | Rev 18 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*
  2.     ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
  3.                  2011,2012 Giovanni Di Sirio.
  4.  
  5.     This file is part of ChibiOS/RT.
  6.  
  7.     ChibiOS/RT is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 3 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     ChibiOS/RT is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19.  
  20.                                       ---
  21.  
  22.     A special exception to the GPL can be applied should you wish to distribute
  23.     a combined work that includes ChibiOS/RT, without being obliged to provide
  24.     the source code for any proprietary components. See the file exception.txt
  25.     for full details of how and when the exception can be applied.
  26. */
  27.  
  28. /**
  29.  * @file    templates/halconf.h
  30.  * @brief   HAL configuration header.
  31.  * @details HAL configuration file, this file allows to enable or disable the
  32.  *          various device drivers from your application. You may also use
  33.  *          this file in order to override the device drivers default settings.
  34.  *
  35.  * @addtogroup HAL_CONF
  36.  * @{
  37.  */
  38.  
  39. #ifndef _HALCONF_H_
  40. #define _HALCONF_H_
  41.  
  42. #include "mcuconf.h"
  43.  
  44. /* Need to do this somewhere */
  45.  
  46. /**
  47.  * @brief   Enables the TM subsystem.
  48.  */
  49. #if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
  50. #define HAL_USE_TM                  TRUE
  51. #endif
  52.  
  53. /**
  54.  * @brief   Enables the PAL subsystem.
  55.  */
  56. #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
  57. #define HAL_USE_PAL                 TRUE
  58. #endif
  59.  
  60. /**
  61.  * @brief   Enables the ADC subsystem.
  62.  */
  63. #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
  64. #define HAL_USE_ADC                 TRUE
  65. #endif
  66.  
  67. /**
  68.  * @brief   Enables the CAN subsystem.
  69.  */
  70. #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
  71. #define HAL_USE_CAN                 FALSE
  72. #endif
  73.  
  74. /**
  75.  * @brief   Enables the EXT subsystem.
  76.  */
  77. #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
  78. #define HAL_USE_EXT                 FALSE
  79. #endif
  80.  
  81. /**
  82.  * @brief   Enables the GPT subsystem.
  83.  */
  84. #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
  85. #define HAL_USE_GPT                 FALSE
  86. #endif
  87.  
  88. /**
  89.  * @brief   Enables the I2C subsystem.
  90.  */
  91. #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
  92. #define HAL_USE_I2C                 FALSE
  93. #endif
  94.  
  95. /**
  96.  * @brief   Enables the ICU subsystem.
  97.  */
  98. #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
  99. #define HAL_USE_ICU                 FALSE
  100. #endif
  101.  
  102. /**
  103.  * @brief   Enables the MAC subsystem.
  104.  */
  105. #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
  106. #define HAL_USE_MAC                 FALSE
  107. #endif
  108.  
  109. /**
  110.  * @brief   Enables the MMC_SPI subsystem.
  111.  */
  112. #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
  113. #define HAL_USE_MMC_SPI            FALSE
  114. #endif
  115.  
  116. /**
  117.  * @brief   Enables the PWM subsystem.
  118.  */
  119. #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
  120. #define HAL_USE_PWM                 FALSE
  121. #endif
  122.  
  123. /**
  124.  * @brief   Enables the RTC subsystem.
  125.  */
  126. #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
  127. #define HAL_USE_RTC                 FALSE
  128. #endif
  129.  
  130. /**
  131.  * @brief   Enables the SDC subsystem.
  132.  */
  133. #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
  134. #define HAL_USE_SDC                 FALSE
  135. #endif
  136.  
  137. /**
  138.  * @brief   Enables the SERIAL subsystem.
  139.  */
  140. #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
  141. #define HAL_USE_SERIAL              TRUE
  142. #endif
  143.  
  144. /**
  145.  * @brief   Enables the SERIAL over USB subsystem.
  146.  */
  147. #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
  148. #define HAL_USE_SERIAL_USB          TRUE
  149. #endif
  150.  
  151. #define HAL_USE_BULK_USB TRUE
  152.  
  153. /**
  154.  * @brief   Enables the SPI subsystem.
  155.  */
  156. #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
  157. #define HAL_USE_SPI                 TRUE
  158. #endif
  159.  
  160. /**
  161.  * @brief   Enables the UART subsystem.
  162.  */
  163. #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
  164. #define HAL_USE_UART                FALSE
  165. #endif
  166.  
  167. /**
  168.  * @brief   Enables the USB subsystem.
  169.  */
  170. #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
  171. #define HAL_USE_USB                 TRUE
  172. #endif
  173.  
  174. /*===========================================================================*/
  175. /* ADC driver related settings.                                              */
  176. /*===========================================================================*/
  177.  
  178. /**
  179.  * @brief   Enables synchronous APIs.
  180.  * @note    Disabling this option saves both code and data space.
  181.  */
  182. #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
  183. #define ADC_USE_WAIT                TRUE
  184. #endif
  185.  
  186. /**
  187.  * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
  188.  * @note    Disabling this option saves both code and data space.
  189.  */
  190. #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
  191. #define ADC_USE_MUTUAL_EXCLUSION    TRUE
  192. #endif
  193.  
  194. /*===========================================================================*/
  195. /* CAN driver related settings.                                              */
  196. /*===========================================================================*/
  197.  
  198. /**
  199.  * @brief   Sleep mode related APIs inclusion switch.
  200.  */
  201. #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
  202. #define CAN_USE_SLEEP_MODE          TRUE
  203. #endif
  204.  
  205. /*===========================================================================*/
  206. /* I2C driver related settings.                                              */
  207. /*===========================================================================*/
  208.  
  209. /**
  210.  * @brief   Enables the mutual exclusion APIs on the I2C bus.
  211.  */
  212. #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
  213. #define I2C_USE_MUTUAL_EXCLUSION    TRUE
  214. #endif
  215.  
  216. /*===========================================================================*/
  217. /* MAC driver related settings.                                              */
  218. /*===========================================================================*/
  219.  
  220. /**
  221.  * @brief   Enables an event sources for incoming packets.
  222.  */
  223. #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
  224. #define MAC_USE_EVENTS              TRUE
  225. #endif
  226.  
  227. /*===========================================================================*/
  228. /* MMC_SPI driver related settings.                                          */
  229. /*===========================================================================*/
  230.  
  231. /**
  232.  * @brief   Block size for MMC transfers.
  233.  */
  234. #if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__)
  235. #define MMC_SECTOR_SIZE             512
  236. #endif
  237.  
  238. /**
  239.  * @brief   Delays insertions.
  240.  * @details If enabled this options inserts delays into the MMC waiting
  241.  *          routines releasing some extra CPU time for the threads with
  242.  *          lower priority, this may slow down the driver a bit however.
  243.  *          This option is recommended also if the SPI driver does not
  244.  *          use a DMA channel and heavily loads the CPU.
  245.  */
  246. #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
  247. #define MMC_NICE_WAITING            TRUE
  248. #endif
  249.  
  250. /**
  251.  * @brief   Number of positive insertion queries before generating the
  252.  *          insertion event.
  253.  */
  254. #if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__)
  255. #define MMC_POLLING_INTERVAL        10
  256. #endif
  257.  
  258. /**
  259.  * @brief   Interval, in milliseconds, between insertion queries.
  260.  */
  261. #if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__)
  262. #define MMC_POLLING_DELAY           10
  263. #endif
  264.  
  265. /**
  266.  * @brief   Uses the SPI polled API for small data transfers.
  267.  * @details Polled transfers usually improve performance because it
  268.  *          saves two context switches and interrupt servicing. Note
  269.  *          that this option has no effect on large transfers which
  270.  *          are always performed using DMAs/IRQs.
  271.  */
  272. #if !defined(MMC_USE_SPI_POLLING) || defined(__DOXYGEN__)
  273. #define MMC_USE_SPI_POLLING         TRUE
  274. #endif
  275.  
  276. /*===========================================================================*/
  277. /* SDC driver related settings.                                              */
  278. /*===========================================================================*/
  279.  
  280. /**
  281.  * @brief   Number of initialization attempts before rejecting the card.
  282.  * @note    Attempts are performed at 10mS intervals.
  283.  */
  284. #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
  285. #define SDC_INIT_RETRY              100
  286. #endif
  287.  
  288. /**
  289.  * @brief   Include support for MMC cards.
  290.  * @note    MMC support is not yet implemented so this option must be kept
  291.  *          at @p FALSE.
  292.  */
  293. #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
  294. #define SDC_MMC_SUPPORT             FALSE
  295. #endif
  296.  
  297. /**
  298.  * @brief   Delays insertions.
  299.  * @details If enabled this options inserts delays into the MMC waiting
  300.  *          routines releasing some extra CPU time for the threads with
  301.  *          lower priority, this may slow down the driver a bit however.
  302.  */
  303. #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
  304. #define SDC_NICE_WAITING            TRUE
  305. #endif
  306.  
  307. /*===========================================================================*/
  308. /* SERIAL driver related settings.                                           */
  309. /*===========================================================================*/
  310.  
  311. /**
  312.  * @brief   Default bit rate.
  313.  * @details Configuration parameter, this is the baud rate selected for the
  314.  *          default configuration.
  315.  */
  316. #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
  317. #define SERIAL_DEFAULT_BITRATE      38400
  318. #endif
  319.  
  320. /**
  321.  * @brief   Serial buffers size.
  322.  * @details Configuration parameter, you can change the depth of the queue
  323.  *          buffers depending on the requirements of your application.
  324.  * @note    The default is 64 bytes for both the transmission and receive
  325.  *          buffers.
  326.  */
  327. #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
  328. #define SERIAL_BUFFERS_SIZE         16
  329. #endif
  330.  
  331. /*===========================================================================*/
  332. /* SPI driver related settings.                                              */
  333. /*===========================================================================*/
  334.  
  335. /**
  336.  * @brief   Enables synchronous APIs.
  337.  * @note    Disabling this option saves both code and data space.
  338.  */
  339. #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
  340. #define SPI_USE_WAIT                TRUE
  341. #endif
  342.  
  343. /**
  344.  * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
  345.  * @note    Disabling this option saves both code and data space.
  346.  */
  347. #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
  348. #define SPI_USE_MUTUAL_EXCLUSION    TRUE
  349. #endif
  350.  
  351. #endif /* _HALCONF_H_ */
  352.  
  353. /** @} */
  354.