Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
halconf.h
Go to the documentation of this file.
1 /*
2  ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3 
4  modified by: AggieAir, A Remote Sensing Unmanned Aerial System for Scientific Applications
5  Utah State University, http://aggieair.usu.edu/
6 
7  Michal Podhradsky (michal.podhradsky@aggiemail.usu.edu)
8  Calvin Coopmans (c.r.coopmans@ieee.org)
9 
10  modified by Gautier Hattenberger for STM32F7 support
11 
12  Licensed under the Apache License, Version 2.0 (the "License");
13  you may not use this file except in compliance with the License.
14  You may obtain a copy of the License at
15 
16  http://www.apache.org/licenses/LICENSE-2.0
17 
18  Unless required by applicable law or agreed to in writing, software
19  distributed under the License is distributed on an "AS IS" BASIS,
20  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  See the License for the specific language governing permissions and
22  limitations under the License.
23 */
24 
36 #ifndef _HALCONF_H_
37 #define _HALCONF_H_
38 
39 /* include board specific conf */
40 #include "mcuconf.h"
41 
45 #if !defined(HAL_USE_TM) || defined(__DOXYGEN__)
46 #define HAL_USE_TM FALSE
47 #endif
48 
52 #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
53 #define HAL_USE_PAL TRUE
54 #endif
55 
59 #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
60 #if USE_ADC
61 #define HAL_USE_ADC TRUE
62 #else
63 #define HAL_USE_ADC FALSE
64 #endif
65 #endif
66 
70 #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
71 #if USE_CAN1 || USE_CAN2
72 #define HAL_USE_CAN TRUE
73 #else
74 #define HAL_USE_CAN FALSE
75 #endif
76 #endif
77 
78 
82 #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
83 #if USE_DAC1 || USE_DAC2
84 #define HAL_USE_DAC TRUE
85 #else
86 #define HAL_USE_DAC FALSE
87 #endif
88 #endif
89 
93 #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
94 #define HAL_USE_EXT FALSE
95 #endif
96 
100 #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
101 #define HAL_USE_GPT FALSE
102 #endif
103 
107 #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
108 #if USE_I2C1 || USE_I2C2 || USE_I2C3
109 #define HAL_USE_I2C TRUE
110 #else
111 #define HAL_USE_I2C FALSE
112 #endif
113 #endif
114 
118 #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
119 #define HAL_USE_I2S FALSE
120 #endif
121 
129 #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
130 #if RADIO_CONTROL_TYPE_PPM || USE_PWM_INPUT || defined USE_PWM_INPUT1 || defined USE_PWM_INPUT2
131 #define HAL_USE_ICU TRUE
132 #else
133 #define HAL_USE_ICU FALSE
134 #endif
135 #endif
136 
140 #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
141 #define HAL_USE_MAC FALSE
142 #endif
143 
147 #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
148 #define HAL_USE_MMC_SPI FALSE
149 #endif
150 
154 #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
155 #define HAL_USE_PWM TRUE
156 #endif
157 
161 #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
162 #define HAL_USE_RTC FALSE
163 #endif
164 
168 #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
169 #define HAL_USE_SDC FALSE
170 #endif
171 
175 #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
176 #if USE_UART1 || USE_UART2 || USE_UART3 || USE_UART4 || USE_UART5 || USE_UART6
177 #define HAL_USE_SERIAL TRUE
178 #else
179 #define HAL_USE_SERIAL FALSE
180 #endif
181 #endif
182 
186 #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
187 #if USE_USB_SERIAL
188 #define HAL_USE_SERIAL_USB TRUE
189 #else
190 #define HAL_USE_SERIAL_USB FALSE
191 #endif
192 #endif
193 
197 #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
198 #if USE_SPI
199 #define HAL_USE_SPI TRUE
200 #else
201 #define HAL_USE_SPI FALSE
202 #endif
203 #endif
204 
208 #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
209 #define HAL_USE_UART FALSE
210 #endif
211 
215 #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
216 #if USE_USB_SERIAL
217 #define HAL_USE_USB TRUE
218 #else
219 #define HAL_USE_USB FALSE
220 #endif
221 #endif
222 
226 #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
227 #define HAL_USE_WDG FALSE
228 #endif
229 
230 /*===========================================================================*/
231 /* ADC driver related settings. */
232 /*===========================================================================*/
233 
238 #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
239 #define ADC_USE_WAIT TRUE
240 #endif
241 
246 #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
247 #define ADC_USE_MUTUAL_EXCLUSION TRUE
248 #endif
249 
250 /*===========================================================================*/
251 /* CAN driver related settings. */
252 /*===========================================================================*/
253 
257 #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
258 #define CAN_USE_SLEEP_MODE TRUE
259 #endif
260 
261 /*===========================================================================*/
262 /* I2C driver related settings. */
263 /*===========================================================================*/
264 
268 #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
269 #define I2C_USE_MUTUAL_EXCLUSION TRUE
270 #endif
271 
272 /*===========================================================================*/
273 /* MAC driver related settings. */
274 /*===========================================================================*/
275 
279 #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
280 #define MAC_USE_ZERO_COPY FALSE
281 #endif
282 
286 #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
287 #define MAC_USE_EVENTS TRUE
288 #endif
289 
290 /*===========================================================================*/
291 /* MMC_SPI driver related settings. */
292 /*===========================================================================*/
293 
302 #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
303 #define MMC_NICE_WAITING TRUE
304 #endif
305 
306 /*===========================================================================*/
307 /* SDC driver related settings. */
308 /*===========================================================================*/
309 
314 #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
315 #define SDC_INIT_RETRY 100
316 #endif
317 
323 #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
324 #define SDC_MMC_SUPPORT FALSE
325 #endif
326 
333 #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
334 #define SDC_NICE_WAITING TRUE
335 #endif
336 
337 /*===========================================================================*/
338 /* SERIAL driver related settings. */
339 /*===========================================================================*/
340 
346 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
347 #define SERIAL_DEFAULT_BITRATE 57600
348 #endif
349 
357 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
358 #define SERIAL_BUFFERS_SIZE 1024
359 #endif
360 
361 /*===========================================================================*/
362 /* SERIAL_USB driver related setting. */
363 /*===========================================================================*/
364 
372 #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
373 #define SERIAL_USB_BUFFERS_SIZE 256
374 #endif
375 
380 #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
381 #define SERIAL_USB_BUFFERS_NUMBER 2
382 #endif
383 
384 /*===========================================================================*/
385 /* SPI driver related settings. */
386 /*===========================================================================*/
387 
392 #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
393 #define SPI_USE_WAIT TRUE
394 #endif
395 
400 #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
401 #define SPI_USE_MUTUAL_EXCLUSION TRUE
402 #endif
403 
404 /*===========================================================================*/
405 /* UART driver related settings. */
406 /*===========================================================================*/
407 
412 #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
413 #define UART_USE_WAIT FALSE
414 #endif
415 
420 #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
421 #define UART_USE_MUTUAL_EXCLUSION FALSE
422 #endif
423 
424 /*===========================================================================*/
425 /* USB driver related settings. */
426 /*===========================================================================*/
427 
432 #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
433 #define USB_USE_WAIT FALSE
434 #endif
435 
436 #endif /* _HALCONF_H_ */
437