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
34 * @brief Enables the PAL subsystem.
36 #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
37 #define HAL_USE_PAL TRUE
41 * @brief Enables the ADC subsystem.
43 #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
44 #define HAL_USE_ADC FALSE
48 * @brief Enables the CAN subsystem.
50 #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
51 #define HAL_USE_CAN FALSE
55 * @brief Enables the DAC subsystem.
57 #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
58 #define HAL_USE_DAC FALSE
62 * @brief Enables the EXT subsystem.
64 #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
65 #define HAL_USE_EXT FALSE
69 * @brief Enables the GPT subsystem.
71 #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
72 #define HAL_USE_GPT FALSE
76 * @brief Enables the I2C subsystem.
78 #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
79 #define HAL_USE_I2C FALSE
83 * @brief Enables the I2S subsystem.
85 #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
86 #define HAL_USE_I2S FALSE
90 * @brief Enables the ICU subsystem.
92 #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
93 #define HAL_USE_ICU FALSE
97 * @brief Enables the MAC subsystem.
99 #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
100 #define HAL_USE_MAC FALSE
104 * @brief Enables the MMC_SPI subsystem.
106 #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
107 #define HAL_USE_MMC_SPI FALSE
111 * @brief Enables the PWM subsystem.
113 #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
114 #define HAL_USE_PWM FALSE
118 * @brief Enables the RTC subsystem.
120 #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
121 #define HAL_USE_RTC FALSE
125 * @brief Enables the SDC subsystem.
127 #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
128 #define HAL_USE_SDC FALSE
132 * @brief Enables the SERIAL subsystem.
134 #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
135 #define HAL_USE_SERIAL FALSE
139 * @brief Enables the SERIAL over USB subsystem.
141 #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142 #define HAL_USE_SERIAL_USB FALSE
146 * @brief Enables the SPI subsystem.
148 #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
149 #define HAL_USE_SPI FALSE
153 * @brief Enables the UART subsystem.
155 #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
156 #define HAL_USE_UART FALSE
160 * @brief Enables the USB subsystem.
162 #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
163 #define HAL_USE_USB TRUE
166 /*===========================================================================*/
167 /* ADC driver related settings. */
168 /*===========================================================================*/
171 * @brief Enables synchronous APIs.
172 * @note Disabling this option saves both code and data space.
174 #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
175 #define ADC_USE_WAIT TRUE
179 * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
180 * @note Disabling this option saves both code and data space.
182 #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
183 #define ADC_USE_MUTUAL_EXCLUSION TRUE
186 /*===========================================================================*/
187 /* CAN driver related settings. */
188 /*===========================================================================*/
191 * @brief Sleep mode related APIs inclusion switch.
193 #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
194 #define CAN_USE_SLEEP_MODE TRUE
197 /*===========================================================================*/
198 /* I2C driver related settings. */
199 /*===========================================================================*/
202 * @brief Enables the mutual exclusion APIs on the I2C bus.
204 #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
205 #define I2C_USE_MUTUAL_EXCLUSION TRUE
208 /*===========================================================================*/
209 /* MAC driver related settings. */
210 /*===========================================================================*/
213 * @brief Enables an event sources for incoming packets.
215 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
216 #define MAC_USE_ZERO_COPY FALSE
220 * @brief Enables an event sources for incoming packets.
222 #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
223 #define MAC_USE_EVENTS TRUE
226 /*===========================================================================*/
227 /* MMC_SPI driver related settings. */
228 /*===========================================================================*/
231 * @brief Delays insertions.
232 * @details If enabled this options inserts delays into the MMC waiting
233 * routines releasing some extra CPU time for the threads with
234 * lower priority, this may slow down the driver a bit however.
235 * This option is recommended also if the SPI driver does not
236 * use a DMA channel and heavily loads the CPU.
238 #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
239 #define MMC_NICE_WAITING TRUE
242 /*===========================================================================*/
243 /* SDC driver related settings. */
244 /*===========================================================================*/
247 * @brief Number of initialization attempts before rejecting the card.
248 * @note Attempts are performed at 10mS intervals.
250 #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
251 #define SDC_INIT_RETRY 100
255 * @brief Include support for MMC cards.
256 * @note MMC support is not yet implemented so this option must be kept
259 #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
260 #define SDC_MMC_SUPPORT FALSE
264 * @brief Delays insertions.
265 * @details If enabled this options inserts delays into the MMC waiting
266 * routines releasing some extra CPU time for the threads with
267 * lower priority, this may slow down the driver a bit however.
269 #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
270 #define SDC_NICE_WAITING TRUE
273 /*===========================================================================*/
274 /* SERIAL driver related settings. */
275 /*===========================================================================*/
278 * @brief Default bit rate.
279 * @details Configuration parameter, this is the baud rate selected for the
280 * default configuration.
282 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
283 #define SERIAL_DEFAULT_BITRATE 38400
287 * @brief Serial buffers size.
288 * @details Configuration parameter, you can change the depth of the queue
289 * buffers depending on the requirements of your application.
290 * @note The default is 64 bytes for both the transmission and receive
293 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
294 #define SERIAL_BUFFERS_SIZE 16
297 /*===========================================================================*/
298 /* SERIAL_USB driver related setting. */
299 /*===========================================================================*/
302 * @brief Serial over USB buffers size.
303 * @details Configuration parameter, the buffer size must be a multiple of
304 * the USB data endpoint maximum packet size.
305 * @note The default is 64 bytes for both the transmission and receive
308 #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
309 #define SERIAL_USB_BUFFERS_SIZE 256
312 /*===========================================================================*/
313 /* SPI driver related settings. */
314 /*===========================================================================*/
317 * @brief Enables synchronous APIs.
318 * @note Disabling this option saves both code and data space.
320 #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
321 #define SPI_USE_WAIT TRUE
325 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
326 * @note Disabling this option saves both code and data space.
328 #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
329 #define SPI_USE_MUTUAL_EXCLUSION TRUE
332 #endif /* _HALCONF_H_ */