2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software
8 distributed under the License is distributed on an "AS IS" BASIS,
9 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 See the License for the specific language governing permissions and
11 limitations under the License.
15 * @file templates/halconf.h
16 * @brief HAL configuration header.
17 * @details HAL configuration file, this file allows to enable or disable the
18 * various device drivers from your application. You may also use
19 * this file in order to override the device drivers default settings.
21 * @addtogroup HAL_CONF
31 * @brief Enables the PAL subsystem.
33 #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
34 #define HAL_USE_PAL TRUE
38 * @brief Enables the ADC subsystem.
40 #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
41 #define HAL_USE_ADC FALSE
45 * @brief Enables the CAN subsystem.
47 #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
48 #define HAL_USE_CAN FALSE
52 * @brief Enables the DAC subsystem.
54 #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
55 #define HAL_USE_DAC FALSE
59 * @brief Enables the EXT subsystem.
61 #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
62 #define HAL_USE_EXT FALSE
66 * @brief Enables the GPT subsystem.
68 #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
69 #define HAL_USE_GPT FALSE
73 * @brief Enables the I2C subsystem.
75 #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
76 #define HAL_USE_I2C FALSE
80 * @brief Enables the I2S subsystem.
82 #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
83 #define HAL_USE_I2S FALSE
87 * @brief Enables the ICU subsystem.
89 #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
90 #define HAL_USE_ICU FALSE
94 * @brief Enables the MAC subsystem.
96 #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
97 #define HAL_USE_MAC FALSE
101 * @brief Enables the MMC_SPI subsystem.
103 #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
104 #define HAL_USE_MMC_SPI FALSE
108 * @brief Enables the PWM subsystem.
110 #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
111 #define HAL_USE_PWM FALSE
115 * @brief Enables the RTC subsystem.
117 #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
118 #define HAL_USE_RTC FALSE
122 * @brief Enables the SDC subsystem.
124 #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
125 #define HAL_USE_SDC FALSE
129 * @brief Enables the SERIAL subsystem.
131 #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
132 #define HAL_USE_SERIAL FALSE
136 * @brief Enables the SERIAL over USB subsystem.
138 #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
139 #define HAL_USE_SERIAL_USB TRUE
143 * @brief Enables the SPI subsystem.
145 #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
146 #define HAL_USE_SPI FALSE
150 * @brief Enables the UART subsystem.
152 #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
153 #define HAL_USE_UART FALSE
157 * @brief Enables the USB subsystem.
159 #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
160 #define HAL_USE_USB TRUE
164 * @brief Enables the WDG subsystem.
166 #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
167 #define HAL_USE_WDG FALSE
170 /*===========================================================================*/
171 /* ADC driver related settings. */
172 /*===========================================================================*/
175 * @brief Enables synchronous APIs.
176 * @note Disabling this option saves both code and data space.
178 #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
179 #define ADC_USE_WAIT FALSE
183 * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
184 * @note Disabling this option saves both code and data space.
186 #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
187 #define ADC_USE_MUTUAL_EXCLUSION FALSE
190 /*===========================================================================*/
191 /* CAN driver related settings. */
192 /*===========================================================================*/
195 * @brief Sleep mode related APIs inclusion switch.
197 #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
198 #define CAN_USE_SLEEP_MODE TRUE
201 /*===========================================================================*/
202 /* I2C driver related settings. */
203 /*===========================================================================*/
206 * @brief Enables the mutual exclusion APIs on the I2C bus.
208 #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
209 #define I2C_USE_MUTUAL_EXCLUSION TRUE
212 /*===========================================================================*/
213 /* MAC driver related settings. */
214 /*===========================================================================*/
217 * @brief Enables an event sources for incoming packets.
219 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
220 #define MAC_USE_ZERO_COPY FALSE
224 * @brief Enables an event sources for incoming packets.
226 #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
227 #define MAC_USE_EVENTS TRUE
230 /*===========================================================================*/
231 /* MMC_SPI driver related settings. */
232 /*===========================================================================*/
235 * @brief Delays insertions.
236 * @details If enabled this options inserts delays into the MMC waiting
237 * routines releasing some extra CPU time for the threads with
238 * lower priority, this may slow down the driver a bit however.
239 * This option is recommended also if the SPI driver does not
240 * use a DMA channel and heavily loads the CPU.
242 #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
243 #define MMC_NICE_WAITING TRUE
246 /*===========================================================================*/
247 /* SDC driver related settings. */
248 /*===========================================================================*/
251 * @brief Number of initialization attempts before rejecting the card.
252 * @note Attempts are performed at 10mS intervals.
254 #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
255 #define SDC_INIT_RETRY 100
259 * @brief Include support for MMC cards.
260 * @note MMC support is not yet implemented so this option must be kept
263 #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
264 #define SDC_MMC_SUPPORT FALSE
268 * @brief Delays insertions.
269 * @details If enabled this options inserts delays into the MMC waiting
270 * routines releasing some extra CPU time for the threads with
271 * lower priority, this may slow down the driver a bit however.
273 #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
274 #define SDC_NICE_WAITING TRUE
277 /*===========================================================================*/
278 /* SERIAL driver related settings. */
279 /*===========================================================================*/
282 * @brief Default bit rate.
283 * @details Configuration parameter, this is the baud rate selected for the
284 * default configuration.
286 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
287 #define SERIAL_DEFAULT_BITRATE 38400
291 * @brief Serial buffers size.
292 * @details Configuration parameter, you can change the depth of the queue
293 * buffers depending on the requirements of your application.
294 * @note The default is 64 bytes for both the transmission and receive
297 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
298 #define SERIAL_BUFFERS_SIZE 16
301 /*===========================================================================*/
302 /* SERIAL_USB driver related setting. */
303 /*===========================================================================*/
306 * @brief Serial over USB buffers size.
307 * @details Configuration parameter, the buffer size must be a multiple of
308 * the USB data endpoint maximum packet size.
309 * @note The default is 64 bytes for both the transmission and receive
312 #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
313 #define SERIAL_USB_BUFFERS_SIZE 256
316 /*===========================================================================*/
317 /* SPI driver related settings. */
318 /*===========================================================================*/
321 * @brief Enables synchronous APIs.
322 * @note Disabling this option saves both code and data space.
324 #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
325 #define SPI_USE_WAIT FALSE
329 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
330 * @note Disabling this option saves both code and data space.
332 #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
333 #define SPI_USE_MUTUAL_EXCLUSION FALSE
336 /*===========================================================================*/
337 /* USB driver related settings. */
338 /*===========================================================================*/
341 * @brief Enables synchronous APIs.
342 * @note Disabling this option saves both code and data space.
344 #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
345 #define USB_USE_WAIT TRUE
348 #endif /* _HALCONF_H_ */