2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
18 * @file templates/halconf.h
19 * @brief HAL configuration header.
20 * @details HAL configuration file, this file allows to enable or disable the
21 * various device drivers from your application. You may also use
22 * this file in order to override the device drivers default settings.
24 * @addtogroup HAL_CONF
33 * @brief Enables the PAL subsystem.
35 #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
36 #define HAL_USE_PAL TRUE
40 * @brief Enables the ADC subsystem.
42 #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
43 #define HAL_USE_ADC FALSE
47 * @brief Enables the CAN subsystem.
49 #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
50 #define HAL_USE_CAN FALSE
54 * @brief Enables the DAC subsystem.
56 #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
57 #define HAL_USE_DAC FALSE
61 * @brief Enables the EXT subsystem.
63 #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
64 #define HAL_USE_EXT FALSE
68 * @brief Enables the GPT subsystem.
70 #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
71 #define HAL_USE_GPT FALSE
75 * @brief Enables the I2C subsystem.
77 #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
78 #define HAL_USE_I2C TRUE
82 * @brief Enables the I2S subsystem.
84 #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
85 #define HAL_USE_I2S FALSE
89 * @brief Enables the ICU subsystem.
91 #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
92 #define HAL_USE_ICU FALSE
96 * @brief Enables the MAC subsystem.
98 #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
99 #define HAL_USE_MAC FALSE
103 * @brief Enables the MMC_SPI subsystem.
105 #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
106 #define HAL_USE_MMC_SPI FALSE
110 * @brief Enables the PWM subsystem.
112 #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
113 #define HAL_USE_PWM TRUE
117 * @brief Enables the RTC subsystem.
119 #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
120 #define HAL_USE_RTC FALSE
124 * @brief Enables the SDC subsystem.
126 #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
127 #define HAL_USE_SDC FALSE
131 * @brief Enables the SERIAL subsystem.
133 #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
134 #define HAL_USE_SERIAL FALSE
138 * @brief Enables the SERIAL over USB subsystem.
140 #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
141 #define HAL_USE_SERIAL_USB FALSE
145 * @brief Enables the SPI subsystem.
147 #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
148 #define HAL_USE_SPI TRUE
152 * @brief Enables the UART subsystem.
154 #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
155 #define HAL_USE_UART FALSE
159 * @brief Enables the USB subsystem.
161 #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
162 #define HAL_USE_USB TRUE
166 * @brief Enables the WDG subsystem.
168 #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
169 #define HAL_USE_WDG FALSE
172 /*===========================================================================*/
173 /* ADC driver related settings. */
174 /*===========================================================================*/
177 * @brief Enables synchronous APIs.
178 * @note Disabling this option saves both code and data space.
180 #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
181 #define ADC_USE_WAIT TRUE
185 * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
186 * @note Disabling this option saves both code and data space.
188 #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
189 #define ADC_USE_MUTUAL_EXCLUSION TRUE
192 /*===========================================================================*/
193 /* CAN driver related settings. */
194 /*===========================================================================*/
197 * @brief Sleep mode related APIs inclusion switch.
199 #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
200 #define CAN_USE_SLEEP_MODE TRUE
203 /*===========================================================================*/
204 /* I2C driver related settings. */
205 /*===========================================================================*/
208 * @brief Enables the mutual exclusion APIs on the I2C bus.
210 #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
211 #define I2C_USE_MUTUAL_EXCLUSION TRUE
214 /*===========================================================================*/
215 /* MAC driver related settings. */
216 /*===========================================================================*/
219 * @brief Enables an event sources for incoming packets.
221 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
222 #define MAC_USE_ZERO_COPY FALSE
226 * @brief Enables an event sources for incoming packets.
228 #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
229 #define MAC_USE_EVENTS TRUE
232 /*===========================================================================*/
233 /* MMC_SPI driver related settings. */
234 /*===========================================================================*/
237 * @brief Delays insertions.
238 * @details If enabled this options inserts delays into the MMC waiting
239 * routines releasing some extra CPU time for the threads with
240 * lower priority, this may slow down the driver a bit however.
241 * This option is recommended also if the SPI driver does not
242 * use a DMA channel and heavily loads the CPU.
244 #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
245 #define MMC_NICE_WAITING TRUE
248 /*===========================================================================*/
249 /* SDC driver related settings. */
250 /*===========================================================================*/
253 * @brief Number of initialization attempts before rejecting the card.
254 * @note Attempts are performed at 10mS intervals.
256 #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
257 #define SDC_INIT_RETRY 100
261 * @brief Include support for MMC cards.
262 * @note MMC support is not yet implemented so this option must be kept
265 #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
266 #define SDC_MMC_SUPPORT FALSE
270 * @brief Delays insertions.
271 * @details If enabled this options inserts delays into the MMC waiting
272 * routines releasing some extra CPU time for the threads with
273 * lower priority, this may slow down the driver a bit however.
275 #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
276 #define SDC_NICE_WAITING TRUE
279 /*===========================================================================*/
280 /* SERIAL driver related settings. */
281 /*===========================================================================*/
284 * @brief Default bit rate.
285 * @details Configuration parameter, this is the baud rate selected for the
286 * default configuration.
288 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
289 #define SERIAL_DEFAULT_BITRATE 38400
293 * @brief Serial buffers size.
294 * @details Configuration parameter, you can change the depth of the queue
295 * buffers depending on the requirements of your application.
296 * @note The default is 64 bytes for both the transmission and receive
299 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
300 #define SERIAL_BUFFERS_SIZE 16
303 /*===========================================================================*/
304 /* SERIAL_USB driver related setting. */
305 /*===========================================================================*/
308 * @brief Serial over USB buffers size.
309 * @details Configuration parameter, the buffer size must be a multiple of
310 * the USB data endpoint maximum packet size.
311 * @note The default is 64 bytes for both the transmission and receive
314 #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
315 #define SERIAL_USB_BUFFERS_SIZE 1
318 /*===========================================================================*/
319 /* SPI driver related settings. */
320 /*===========================================================================*/
323 * @brief Enables synchronous APIs.
324 * @note Disabling this option saves both code and data space.
326 #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
327 #define SPI_USE_WAIT TRUE
331 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
332 * @note Disabling this option saves both code and data space.
334 #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
335 #define SPI_USE_MUTUAL_EXCLUSION TRUE
339 /*===========================================================================*/
340 /* USB driver related settings. */
341 /*===========================================================================*/
344 * @brief Enables synchronous APIs.
345 * @note Disabling this option saves both code and data space.
347 #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
348 #define USB_USE_WAIT TRUE