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..2023 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_4_
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
382
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
383
#define MMC_IDLE_TIMEOUT_MS 1000
384
#endif
385
389
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
390
#define MMC_USE_MUTUAL_EXCLUSION TRUE
391
#endif
392
393
/*===========================================================================*/
394
/* SDC driver related settings. */
395
/*===========================================================================*/
396
401
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
402
#define SDC_INIT_RETRY 100
403
#endif
404
410
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
411
#define SDC_MMC_SUPPORT FALSE
412
#endif
413
420
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
421
#define SDC_NICE_WAITING TRUE
422
#endif
423
427
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
428
#define SDC_INIT_OCR_V20 0x50FF8000U
429
#endif
430
434
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
435
#define SDC_INIT_OCR 0x80100000U
436
#endif
437
438
/*===========================================================================*/
439
/* SERIAL driver related settings. */
440
/*===========================================================================*/
441
447
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
448
#define SERIAL_DEFAULT_BITRATE 57600
449
#endif
450
458
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
459
#define SERIAL_BUFFERS_SIZE 1024
460
#endif
461
462
/*===========================================================================*/
463
/* SIO driver related settings. */
464
/*===========================================================================*/
465
471
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
472
#define SIO_DEFAULT_BITRATE 38400
473
#endif
474
478
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
479
#define SIO_USE_SYNCHRONIZATION TRUE
480
#endif
481
482
/*===========================================================================*/
483
/* SERIAL_USB driver related setting. */
484
/*===========================================================================*/
485
493
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
494
#define SERIAL_USB_BUFFERS_SIZE 256
495
#endif
496
501
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
502
#define SERIAL_USB_BUFFERS_NUMBER 2
503
#endif
504
505
/*===========================================================================*/
506
/* SPI driver related settings. */
507
/*===========================================================================*/
508
513
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
514
#define SPI_USE_WAIT TRUE
515
#endif
516
520
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
521
#define SPI_USE_ASSERT_ON_ERROR TRUE
522
#endif
523
528
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
529
#define SPI_USE_MUTUAL_EXCLUSION TRUE
530
#endif
531
536
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
537
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
538
#endif
539
540
/*===========================================================================*/
541
/* UART driver related settings. */
542
/*===========================================================================*/
543
548
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
549
#define UART_USE_WAIT FALSE
550
#endif
551
556
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
557
#define UART_USE_MUTUAL_EXCLUSION FALSE
558
#endif
559
560
/*===========================================================================*/
561
/* USB driver related settings. */
562
/*===========================================================================*/
563
568
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
569
#define USB_USE_WAIT FALSE
570
#endif
571
572
/*===========================================================================*/
573
/* WSPI driver related settings. */
574
/*===========================================================================*/
575
580
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
581
#define WSPI_USE_WAIT TRUE
582
#endif
583
588
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
589
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
590
#endif
591
592
#endif
/* HALCONF_H */
593
mcuconf.h
sw
airborne
arch
chibios
halconf.h
Generated on Thu Dec 5 2024 13:05:29 for Paparazzi UAS by
1.9.1