Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
halconf.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006-2026 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_9_1_
33
34
#include "
mcuconf.h
"
35
39
#if !defined(HAL_USE_SAFETY) || defined(__DOXYGEN__)
40
#define HAL_USE_SAFETY FALSE
41
#endif
42
46
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
47
#define HAL_USE_PAL TRUE
48
#endif
49
53
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
54
#if USE_ADC
55
#define HAL_USE_ADC TRUE
56
#else
57
#define HAL_USE_ADC FALSE
58
#endif
59
#endif
60
64
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
65
#if USE_CAN1 || USE_CAN2
66
#define HAL_USE_CAN TRUE
67
#else
68
#define HAL_USE_CAN FALSE
69
#endif
70
#endif
71
75
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
76
#define HAL_USE_CRY FALSE
77
#endif
78
82
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
83
#define HAL_USE_DAC FALSE
84
#endif
85
89
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
90
#define HAL_USE_EFL FALSE
91
#endif
92
96
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
97
#if USE_GPT5 || USE_GPT7 || USE_GPT8 || USE_GPT12 || USE_GPT13
98
#define HAL_USE_GPT TRUE
99
#define GPT_DRIVER_EXT_FIELDS void *user_data;
100
#else
101
#define HAL_USE_GPT FALSE
102
#endif
103
#endif
104
108
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
109
#if USE_I2C1 || USE_I2C2 || USE_I2C3 || USE_I2C4
110
#define HAL_USE_I2C TRUE
111
#else
112
#define HAL_USE_I2C FALSE
113
#endif
114
#endif
115
119
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
120
#define HAL_USE_I2S FALSE
121
#endif
122
126
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
127
#if RADIO_CONTROL_TYPE_PPM || USE_PWM_INPUT || defined(USE_PWM_INPUT1) || defined(USE_PWM_INPUT2)
128
#define HAL_USE_ICU TRUE
129
#else
130
#define HAL_USE_ICU FALSE
131
#endif
132
#endif
133
137
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
138
#define HAL_USE_MAC FALSE
139
#endif
140
144
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
145
#define HAL_USE_MMC_SPI FALSE
146
#endif
147
151
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
152
#define HAL_USE_PWM TRUE
153
#endif
154
158
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
159
#define HAL_USE_RTC FALSE
160
#endif
161
165
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
166
#define HAL_USE_SDC FALSE
167
#endif
168
172
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
173
#if USE_UART1 || USE_UART2 || USE_UART3 || USE_UART4 || USE_UART5 || USE_UART6 || USE_UART7 || USE_UART8
174
#define HAL_USE_SERIAL TRUE
175
#else
176
#define HAL_USE_SERIAL FALSE
177
#endif
178
#endif
179
183
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
184
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
185
#define HAL_USE_SERIAL_USB TRUE
186
#else
187
#define HAL_USE_SERIAL_USB FALSE
188
#endif
189
#endif
190
194
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
195
#define HAL_USE_SIO FALSE
196
#endif
197
201
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
202
#if USE_SPI
203
#define HAL_USE_SPI TRUE
204
#else
205
#define HAL_USE_SPI FALSE
206
#endif
207
#endif
208
212
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
213
#define HAL_USE_TRNG FALSE
214
#endif
215
219
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
220
#define HAL_USE_UART FALSE
221
#endif
222
226
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
227
#if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
228
#define HAL_USE_USB TRUE
229
#else
230
#define HAL_USE_USB FALSE
231
#endif
232
#endif
233
237
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
238
#define HAL_USE_WDG FALSE
239
#endif
240
244
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
245
#define HAL_USE_WSPI FALSE
246
#endif
247
248
/*===========================================================================*/
249
/* PAL driver related settings. */
250
/*===========================================================================*/
251
256
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
257
#define PAL_USE_CALLBACKS FALSE
258
#endif
259
264
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
265
#define PAL_USE_WAIT TRUE
266
#endif
267
268
/*===========================================================================*/
269
/* ADC driver related settings. */
270
/*===========================================================================*/
271
276
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
277
#define ADC_USE_WAIT TRUE
278
#endif
279
284
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
285
#define ADC_USE_MUTUAL_EXCLUSION TRUE
286
#endif
287
288
/*===========================================================================*/
289
/* CAN driver related settings. */
290
/*===========================================================================*/
291
295
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
296
#define CAN_USE_SLEEP_MODE TRUE
297
#endif
298
302
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
303
#define CAN_ENFORCE_USE_CALLBACKS FALSE
304
#endif
305
306
/*===========================================================================*/
307
/* CRY driver related settings. */
308
/*===========================================================================*/
309
317
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
318
#define HAL_CRY_USE_FALLBACK FALSE
319
#endif
320
324
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
325
#define HAL_CRY_ENFORCE_FALLBACK FALSE
326
#endif
327
328
/*===========================================================================*/
329
/* DAC driver related settings. */
330
/*===========================================================================*/
331
336
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
337
#define DAC_USE_WAIT TRUE
338
#endif
339
344
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
345
#define DAC_USE_MUTUAL_EXCLUSION TRUE
346
#endif
347
348
/*===========================================================================*/
349
/* I2C driver related settings. */
350
/*===========================================================================*/
351
356
#if !defined(I2C_ENABLE_SLAVE_MODE)
357
#define I2C_ENABLE_SLAVE_MODE FALSE
358
#endif
359
363
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
364
#define I2C_USE_MUTUAL_EXCLUSION TRUE
365
#endif
366
367
/*===========================================================================*/
368
/* MAC driver related settings. */
369
/*===========================================================================*/
370
374
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
375
#define MAC_USE_ZERO_COPY FALSE
376
#endif
377
381
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
382
#define MAC_USE_EVENTS TRUE
383
#endif
384
385
/*===========================================================================*/
386
/* MMC_SPI driver related settings. */
387
/*===========================================================================*/
388
393
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
394
#define MMC_IDLE_TIMEOUT_MS 1000
395
#endif
396
400
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
401
#define MMC_USE_MUTUAL_EXCLUSION TRUE
402
#endif
403
404
/*===========================================================================*/
405
/* SDC driver related settings. */
406
/*===========================================================================*/
407
412
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
413
#define SDC_INIT_RETRY 100
414
#endif
415
421
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
422
#define SDC_MMC_SUPPORT FALSE
423
#endif
424
431
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
432
#define SDC_NICE_WAITING TRUE
433
#endif
434
438
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
439
#define SDC_INIT_OCR_V20 0x50FF8000U
440
#endif
441
445
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
446
#define SDC_INIT_OCR 0x80100000U
447
#endif
448
449
/*===========================================================================*/
450
/* SERIAL driver related settings. */
451
/*===========================================================================*/
452
458
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
459
#define SERIAL_DEFAULT_BITRATE 57600
460
#endif
461
469
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
470
#define SERIAL_BUFFERS_SIZE 1024
471
#endif
472
473
/*===========================================================================*/
474
/* SIO driver related settings. */
475
/*===========================================================================*/
476
482
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
483
#define SIO_DEFAULT_BITRATE 38400
484
#endif
485
489
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
490
#define SIO_USE_SYNCHRONIZATION TRUE
491
#endif
492
493
/*===========================================================================*/
494
/* SERIAL_USB driver related setting. */
495
/*===========================================================================*/
496
504
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
505
#define SERIAL_USB_BUFFERS_SIZE 256
506
#endif
507
512
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
513
#define SERIAL_USB_BUFFERS_NUMBER 2
514
#endif
515
516
/*===========================================================================*/
517
/* SPI driver related settings. */
518
/*===========================================================================*/
519
524
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
525
#define SPI_USE_WAIT TRUE
526
#endif
527
531
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
532
#define SPI_USE_ASSERT_ON_ERROR TRUE
533
#endif
534
539
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
540
#define SPI_USE_MUTUAL_EXCLUSION TRUE
541
#endif
542
547
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
548
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
549
#endif
550
551
/*===========================================================================*/
552
/* UART driver related settings. */
553
/*===========================================================================*/
554
559
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
560
#define UART_USE_WAIT FALSE
561
#endif
562
567
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
568
#define UART_USE_MUTUAL_EXCLUSION FALSE
569
#endif
570
571
/*===========================================================================*/
572
/* USB driver related settings. */
573
/*===========================================================================*/
574
579
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
580
#define USB_USE_WAIT FALSE
581
#endif
582
583
/*===========================================================================*/
584
/* WSPI driver related settings. */
585
/*===========================================================================*/
586
591
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
592
#define WSPI_USE_WAIT TRUE
593
#endif
594
599
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
600
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
601
#endif
602
603
#endif
/* HALCONF_H */
604
mcuconf.h
sw
airborne
arch
chibios
halconf.h
Generated on Mon Apr 27 2026 19:48:15 for Paparazzi UAS by
1.9.8