Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
halconf.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
3
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
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
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.
15
*/
16
28
#ifndef HALCONF_H
29
#define HALCONF_H
30
31
#define _CHIBIOS_HAL_CONF_
32
#define _CHIBIOS_HAL_CONF_VER_8_0_
33
34
#include "mcuconf.h"
35
39
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
40
#define HAL_USE_PAL TRUE
41
#endif
42
46
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
47
#if USE_ADC
48
#define HAL_USE_ADC TRUE
49
#else
50
#define HAL_USE_ADC FALSE
51
#endif
52
#endif
53
57
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
58
#if USE_CAN1 || USE_CAN2
59
#define HAL_USE_CAN TRUE
60
#else
61
#define HAL_USE_CAN FALSE
62
#endif
63
#endif
64
68
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
69
#define HAL_USE_CRY FALSE
70
#endif
71
75
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
76
#if USE_DAC1 || USE_DAC2
77
#define HAL_USE_DAC TRUE
78
#else
79
#define HAL_USE_DAC FALSE
80
#endif
81
#endif
82
86
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
87
#define HAL_USE_EFL FALSE
88
#endif
89
93
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
94
#if USE_GPT5 || USE_GPT7 || USE_GPT8 || USE_GPT12 || USE_GPT13
95
#define HAL_USE_GPT TRUE
96
#define GPT_DRIVER_EXT_FIELDS void *user_data;
97
#else
98
#define HAL_USE_GPT FALSE
99
#endif
100
#endif
101
105
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
106
#if USE_I2C1 || USE_I2C2 || USE_I2C3 || USE_I2C4
107
#define HAL_USE_I2C TRUE
108
#else
109
#define HAL_USE_I2C FALSE
110
#endif
111
#endif
112
116
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
117
#define HAL_USE_I2S FALSE
118
#endif
119
123
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
124
#if RADIO_CONTROL_TYPE_PPM || USE_PWM_INPUT || defined(USE_PWM_INPUT1) || defined(USE_PWM_INPUT2)
125
#define HAL_USE_ICU TRUE
126
#else
127
#define HAL_USE_ICU FALSE
128
#endif
129
#endif
130
134
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
135
#define HAL_USE_MAC FALSE
136
#endif
137
141
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
142
#define HAL_USE_MMC_SPI FALSE
143
#endif
144
148
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
149
#define HAL_USE_PWM TRUE
150
#endif
151
155
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
156
#define HAL_USE_RTC FALSE
157
#endif
158
162
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
163
#define HAL_USE_SDC FALSE
164
#endif
165
169
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
170
#if USE_UART1 || USE_UART2 || USE_UART3 || USE_UART4 || USE_UART5 || USE_UART6 || USE_UART7 || USE_UART8
171
#define HAL_USE_SERIAL TRUE
172
#else
173
#define HAL_USE_SERIAL FALSE
174
#endif
175
#endif
176
180
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
181
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
182
#define HAL_USE_SERIAL_USB TRUE
183
#else
184
#define HAL_USE_SERIAL_USB FALSE
185
#endif
186
#endif
187
191
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
192
#define HAL_USE_SIO FALSE
193
#endif
194
198
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
199
#if USE_SPI
200
#define HAL_USE_SPI TRUE
201
#else
202
#define HAL_USE_SPI FALSE
203
#endif
204
#endif
205
209
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
210
#define HAL_USE_TRNG FALSE
211
#endif
212
216
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
217
#define HAL_USE_UART FALSE
218
#endif
219
223
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
224
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
225
#define HAL_USE_USB TRUE
226
#else
227
#define HAL_USE_USB FALSE
228
#endif
229
#endif
230
234
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
235
#define HAL_USE_WDG FALSE
236
#endif
237
241
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
242
#define HAL_USE_WSPI FALSE
243
#endif
244
245
/*===========================================================================*/
246
/* PAL driver related settings. */
247
/*===========================================================================*/
248
253
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
254
#define PAL_USE_CALLBACKS FALSE
255
#endif
256
261
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
262
#define PAL_USE_WAIT TRUE
263
#endif
264
265
/*===========================================================================*/
266
/* ADC driver related settings. */
267
/*===========================================================================*/
268
273
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
274
#define ADC_USE_WAIT TRUE
275
#endif
276
281
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
282
#define ADC_USE_MUTUAL_EXCLUSION TRUE
283
#endif
284
285
/*===========================================================================*/
286
/* CAN driver related settings. */
287
/*===========================================================================*/
288
292
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
293
#define CAN_USE_SLEEP_MODE TRUE
294
#endif
295
299
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
300
#define CAN_ENFORCE_USE_CALLBACKS FALSE
301
#endif
302
303
/*===========================================================================*/
304
/* CRY driver related settings. */
305
/*===========================================================================*/
306
314
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
315
#define HAL_CRY_USE_FALLBACK FALSE
316
#endif
317
321
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
322
#define HAL_CRY_ENFORCE_FALLBACK FALSE
323
#endif
324
325
/*===========================================================================*/
326
/* DAC driver related settings. */
327
/*===========================================================================*/
328
333
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
334
#define DAC_USE_WAIT TRUE
335
#endif
336
341
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
342
#define DAC_USE_MUTUAL_EXCLUSION TRUE
343
#endif
344
345
/*===========================================================================*/
346
/* I2C driver related settings. */
347
/*===========================================================================*/
348
352
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
353
#define I2C_USE_MUTUAL_EXCLUSION TRUE
354
#endif
355
356
/*===========================================================================*/
357
/* MAC driver related settings. */
358
/*===========================================================================*/
359
363
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
364
#define MAC_USE_ZERO_COPY FALSE
365
#endif
366
370
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
371
#define MAC_USE_EVENTS TRUE
372
#endif
373
374
/*===========================================================================*/
375
/* MMC_SPI driver related settings. */
376
/*===========================================================================*/
377
386
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
387
#define MMC_NICE_WAITING TRUE
388
#endif
389
390
/*===========================================================================*/
391
/* SDC driver related settings. */
392
/*===========================================================================*/
393
398
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
399
#define SDC_INIT_RETRY 100
400
#endif
401
407
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
408
#define SDC_MMC_SUPPORT FALSE
409
#endif
410
417
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
418
#define SDC_NICE_WAITING TRUE
419
#endif
420
424
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
425
#define SDC_INIT_OCR_V20 0x50FF8000U
426
#endif
427
431
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
432
#define SDC_INIT_OCR 0x80100000U
433
#endif
434
435
/*===========================================================================*/
436
/* SERIAL driver related settings. */
437
/*===========================================================================*/
438
444
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
445
#define SERIAL_DEFAULT_BITRATE 57600
446
#endif
447
455
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
456
#define SERIAL_BUFFERS_SIZE 1024
457
#endif
458
459
/*===========================================================================*/
460
/* SIO driver related settings. */
461
/*===========================================================================*/
462
468
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
469
#define SIO_DEFAULT_BITRATE 38400
470
#endif
471
475
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
476
#define SIO_USE_SYNCHRONIZATION TRUE
477
#endif
478
479
/*===========================================================================*/
480
/* SERIAL_USB driver related setting. */
481
/*===========================================================================*/
482
490
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
491
#define SERIAL_USB_BUFFERS_SIZE 256
492
#endif
493
498
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
499
#define SERIAL_USB_BUFFERS_NUMBER 2
500
#endif
501
502
/*===========================================================================*/
503
/* SPI driver related settings. */
504
/*===========================================================================*/
505
510
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
511
#define SPI_USE_WAIT TRUE
512
#endif
513
517
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
518
#define SPI_USE_ASSERT_ON_ERROR TRUE
519
#endif
520
525
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
526
#define SPI_USE_MUTUAL_EXCLUSION TRUE
527
#endif
528
533
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
534
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
535
#endif
536
537
/*===========================================================================*/
538
/* UART driver related settings. */
539
/*===========================================================================*/
540
545
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
546
#define UART_USE_WAIT FALSE
547
#endif
548
553
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
554
#define UART_USE_MUTUAL_EXCLUSION FALSE
555
#endif
556
557
/*===========================================================================*/
558
/* USB driver related settings. */
559
/*===========================================================================*/
560
565
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
566
#define USB_USE_WAIT FALSE
567
#endif
568
569
/*===========================================================================*/
570
/* WSPI driver related settings. */
571
/*===========================================================================*/
572
577
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
578
#define WSPI_USE_WAIT TRUE
579
#endif
580
585
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
586
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
587
#endif
588
589
#endif
/* HALCONF_H */
590
sw
airborne
arch
chibios
halconf.h
Generated on Wed Apr 17 2024 15:10:33 for Paparazzi UAS by
1.9.1