Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 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 | /** |
||
45 | * @brief Enables the TM subsystem. |
||
46 | */ |
||
47 | #if !defined(HAL_USE_TM) || defined(__DOXYGEN__) |
||
48 | #define HAL_USE_TM TRUE |
||
49 | #endif |
||
50 | |||
51 | /** |
||
52 | * @brief Enables the PAL subsystem. |
||
53 | */ |
||
54 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) |
||
55 | #define HAL_USE_PAL TRUE |
||
56 | #endif |
||
57 | |||
58 | /** |
||
59 | * @brief Enables the ADC subsystem. |
||
60 | */ |
||
61 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) |
||
62 | #define HAL_USE_ADC FALSE |
||
63 | #endif |
||
64 | |||
65 | /** |
||
66 | * @brief Enables the CAN subsystem. |
||
67 | */ |
||
68 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) |
||
69 | #define HAL_USE_CAN FALSE |
||
70 | #endif |
||
71 | |||
72 | /** |
||
73 | * @brief Enables the EXT subsystem. |
||
74 | */ |
||
75 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) |
||
76 | #define HAL_USE_EXT FALSE |
||
77 | #endif |
||
78 | |||
79 | /** |
||
80 | * @brief Enables the GPT subsystem. |
||
81 | */ |
||
82 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) |
||
83 | #define HAL_USE_GPT FALSE |
||
84 | #endif |
||
85 | |||
86 | /** |
||
87 | * @brief Enables the I2C subsystem. |
||
88 | */ |
||
89 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) |
||
90 | #define HAL_USE_I2C FALSE |
||
91 | #endif |
||
92 | |||
93 | /** |
||
94 | * @brief Enables the ICU subsystem. |
||
95 | */ |
||
96 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) |
||
97 | #define HAL_USE_ICU FALSE |
||
98 | #endif |
||
99 | |||
100 | /** |
||
101 | * @brief Enables the MAC subsystem. |
||
102 | */ |
||
103 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) |
||
104 | #define HAL_USE_MAC FALSE |
||
105 | #endif |
||
106 | |||
107 | /** |
||
108 | * @brief Enables the MMC_SPI subsystem. |
||
109 | */ |
||
110 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) |
||
111 | #define HAL_USE_MMC_SPI FALSE |
||
112 | #endif |
||
113 | |||
114 | /** |
||
115 | * @brief Enables the PWM subsystem. |
||
116 | */ |
||
117 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) |
||
118 | #define HAL_USE_PWM FALSE |
||
119 | #endif |
||
120 | |||
121 | /** |
||
122 | * @brief Enables the RTC subsystem. |
||
123 | */ |
||
124 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) |
||
125 | #define HAL_USE_RTC FALSE |
||
126 | #endif |
||
127 | |||
128 | /** |
||
129 | * @brief Enables the SDC subsystem. |
||
130 | */ |
||
131 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) |
||
132 | #define HAL_USE_SDC FALSE |
||
133 | #endif |
||
134 | |||
135 | /** |
||
136 | * @brief Enables the SERIAL subsystem. |
||
137 | */ |
||
138 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) |
||
139 | #define HAL_USE_SERIAL TRUE |
||
140 | #endif |
||
141 | |||
142 | /** |
||
143 | * @brief Enables the SERIAL over USB subsystem. |
||
144 | */ |
||
145 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) |
||
146 | #define HAL_USE_SERIAL_USB FALSE |
||
147 | #endif |
||
148 | |||
149 | /** |
||
150 | * @brief Enables the SPI subsystem. |
||
151 | */ |
||
152 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) |
||
153 | #define HAL_USE_SPI TRUE |
||
154 | #endif |
||
155 | |||
156 | /** |
||
157 | * @brief Enables the UART subsystem. |
||
158 | */ |
||
159 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) |
||
160 | #define HAL_USE_UART FALSE |
||
161 | #endif |
||
162 | |||
163 | /** |
||
164 | * @brief Enables the USB subsystem. |
||
165 | */ |
||
166 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) |
||
167 | #define HAL_USE_USB FALSE |
||
168 | #endif |
||
169 | |||
170 | /*===========================================================================*/ |
||
171 | /* ADC driver related settings. */ |
||
172 | /*===========================================================================*/ |
||
173 | |||
174 | /** |
||
175 | * @brief Enables synchronous APIs. |
||
176 | * @note Disabling this option saves both code and data space. |
||
177 | */ |
||
178 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) |
||
179 | #define ADC_USE_WAIT TRUE |
||
180 | #endif |
||
181 | |||
182 | /** |
||
183 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. |
||
184 | * @note Disabling this option saves both code and data space. |
||
185 | */ |
||
186 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
||
187 | #define ADC_USE_MUTUAL_EXCLUSION TRUE |
||
188 | #endif |
||
189 | |||
190 | /*===========================================================================*/ |
||
191 | /* CAN driver related settings. */ |
||
192 | /*===========================================================================*/ |
||
193 | |||
194 | /** |
||
195 | * @brief Sleep mode related APIs inclusion switch. |
||
196 | */ |
||
197 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) |
||
198 | #define CAN_USE_SLEEP_MODE TRUE |
||
199 | #endif |
||
200 | |||
201 | /*===========================================================================*/ |
||
202 | /* I2C driver related settings. */ |
||
203 | /*===========================================================================*/ |
||
204 | |||
205 | /** |
||
206 | * @brief Enables the mutual exclusion APIs on the I2C bus. |
||
207 | */ |
||
208 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
||
209 | #define I2C_USE_MUTUAL_EXCLUSION TRUE |
||
210 | #endif |
||
211 | |||
212 | /*===========================================================================*/ |
||
213 | /* MAC driver related settings. */ |
||
214 | /*===========================================================================*/ |
||
215 | |||
216 | /** |
||
217 | * @brief Enables an event sources for incoming packets. |
||
218 | */ |
||
219 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) |
||
220 | #define MAC_USE_EVENTS TRUE |
||
221 | #endif |
||
222 | |||
223 | /*===========================================================================*/ |
||
224 | /* MMC_SPI driver related settings. */ |
||
225 | /*===========================================================================*/ |
||
226 | |||
227 | /** |
||
228 | * @brief Block size for MMC transfers. |
||
229 | */ |
||
230 | #if !defined(MMC_SECTOR_SIZE) || defined(__DOXYGEN__) |
||
231 | #define MMC_SECTOR_SIZE 512 |
||
232 | #endif |
||
233 | |||
234 | /** |
||
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. |
||
241 | */ |
||
242 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) |
||
243 | #define MMC_NICE_WAITING TRUE |
||
244 | #endif |
||
245 | |||
246 | /** |
||
247 | * @brief Number of positive insertion queries before generating the |
||
248 | * insertion event. |
||
249 | */ |
||
250 | #if !defined(MMC_POLLING_INTERVAL) || defined(__DOXYGEN__) |
||
251 | #define MMC_POLLING_INTERVAL 10 |
||
252 | #endif |
||
253 | |||
254 | /** |
||
255 | * @brief Interval, in milliseconds, between insertion queries. |
||
256 | */ |
||
257 | #if !defined(MMC_POLLING_DELAY) || defined(__DOXYGEN__) |
||
258 | #define MMC_POLLING_DELAY 10 |
||
259 | #endif |
||
260 | |||
261 | /** |
||
262 | * @brief Uses the SPI polled API for small data transfers. |
||
263 | * @details Polled transfers usually improve performance because it |
||
264 | * saves two context switches and interrupt servicing. Note |
||
265 | * that this option has no effect on large transfers which |
||
266 | * are always performed using DMAs/IRQs. |
||
267 | */ |
||
268 | #if !defined(MMC_USE_SPI_POLLING) || defined(__DOXYGEN__) |
||
269 | #define MMC_USE_SPI_POLLING TRUE |
||
270 | #endif |
||
271 | |||
272 | /*===========================================================================*/ |
||
273 | /* SDC driver related settings. */ |
||
274 | /*===========================================================================*/ |
||
275 | |||
276 | /** |
||
277 | * @brief Number of initialization attempts before rejecting the card. |
||
278 | * @note Attempts are performed at 10mS intervals. |
||
279 | */ |
||
280 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) |
||
281 | #define SDC_INIT_RETRY 100 |
||
282 | #endif |
||
283 | |||
284 | /** |
||
285 | * @brief Include support for MMC cards. |
||
286 | * @note MMC support is not yet implemented so this option must be kept |
||
287 | * at @p FALSE. |
||
288 | */ |
||
289 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) |
||
290 | #define SDC_MMC_SUPPORT FALSE |
||
291 | #endif |
||
292 | |||
293 | /** |
||
294 | * @brief Delays insertions. |
||
295 | * @details If enabled this options inserts delays into the MMC waiting |
||
296 | * routines releasing some extra CPU time for the threads with |
||
297 | * lower priority, this may slow down the driver a bit however. |
||
298 | */ |
||
299 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) |
||
300 | #define SDC_NICE_WAITING TRUE |
||
301 | #endif |
||
302 | |||
303 | /*===========================================================================*/ |
||
304 | /* SERIAL driver related settings. */ |
||
305 | /*===========================================================================*/ |
||
306 | |||
307 | /** |
||
308 | * @brief Default bit rate. |
||
309 | * @details Configuration parameter, this is the baud rate selected for the |
||
310 | * default configuration. |
||
311 | */ |
||
312 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) |
||
313 | #define SERIAL_DEFAULT_BITRATE 38400 |
||
314 | #endif |
||
315 | |||
316 | /** |
||
317 | * @brief Serial buffers size. |
||
318 | * @details Configuration parameter, you can change the depth of the queue |
||
319 | * buffers depending on the requirements of your application. |
||
320 | * @note The default is 64 bytes for both the transmission and receive |
||
321 | * buffers. |
||
322 | */ |
||
323 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) |
||
324 | #define SERIAL_BUFFERS_SIZE 16 |
||
325 | #endif |
||
326 | |||
327 | /*===========================================================================*/ |
||
328 | /* SPI driver related settings. */ |
||
329 | /*===========================================================================*/ |
||
330 | |||
331 | /** |
||
332 | * @brief Enables synchronous APIs. |
||
333 | * @note Disabling this option saves both code and data space. |
||
334 | */ |
||
335 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) |
||
336 | #define SPI_USE_WAIT TRUE |
||
337 | #endif |
||
338 | |||
339 | /** |
||
340 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. |
||
341 | * @note Disabling this option saves both code and data space. |
||
342 | */ |
||
343 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
||
344 | #define SPI_USE_MUTUAL_EXCLUSION TRUE |
||
345 | #endif |
||
346 | |||
347 | #endif /* _HALCONF_H_ */ |
||
348 | |||
349 | /** @} */ |