Subversion Repositories ChibiGauge

Rev

Rev 8 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 mjames 1
/*
2
    ChibiOS - Copyright (C) 2006..2025 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
 
17
/**
18
 * @file    templates/halconf.h
19
 * @brief   HAL configuration header.
20
 * @details HAL configuration file, this file allows to enable or disable the
21
 *          various device drivers from your application. You may also use
22
 *          this file in order to override the device drivers default settings.
23
 *
24
 * @addtogroup HAL_CONF
25
 * @{
26
 */
27
 
28
#ifndef HALCONF_H
29
#define HALCONF_H
30
 
31
#define _CHIBIOS_HAL_CONF_
9 mjames 32
#define _CHIBIOS_HAL_CONF_VER_8_4_
8 mjames 33
 
34
#include "mcuconf.h"
35
 
36
/**
37
 * @brief   Enables the PAL subsystem.
38
 */
39
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
40
#define HAL_USE_PAL                         TRUE
41
#endif
42
 
43
/**
44
 * @brief   Enables the ADC subsystem.
45
 */
46
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
47
#define HAL_USE_ADC                         FALSE
48
#endif
49
 
50
/**
51
 * @brief   Enables the CAN subsystem.
52
 */
53
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
54
#define HAL_USE_CAN                         TRUE
55
#endif
56
/**
57
 * @brief   Enables the cryptographic subsystem.
58
 */
59
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
60
#define HAL_USE_CRY                         FALSE
61
#endif
62
 
63
/**
64
 * @brief   Enables the DAC subsystem.
65
 */
66
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
67
#define HAL_USE_DAC                         FALSE
68
#endif
69
 
70
/**
71
 * @brief   Enables the EFlash subsystem.
72
 */
73
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
74
#define HAL_USE_EFL                         FALSE
75
#endif
76
 
77
/**
78
 * @brief   Enables the GPT subsystem.
79
 */
80
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
81
#define HAL_USE_GPT                         FALSE
82
#endif
83
 
84
/**
85
 * @brief   Enables the I2C subsystem.
86
 */
87
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
88
#define HAL_USE_I2C                         FALSE
89
#endif
90
 
91
/**
92
 * @brief   Enables the I2S subsystem.
93
 */
94
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
95
#define HAL_USE_I2S                         FALSE
96
#endif
97
 
98
/**
99
 * @brief   Enables the ICU subsystem.
100
 */
101
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
102
#define HAL_USE_ICU                         FALSE
103
#endif
104
 
105
/**
106
 * @brief   Enables the MAC subsystem.
107
 */
108
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
109
#define HAL_USE_MAC                         FALSE
110
#endif
111
 
112
/**
113
 * @brief   Enables the MMC_SPI subsystem.
114
 */
115
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
116
#define HAL_USE_MMC_SPI                     FALSE
117
#endif
118
 
119
/**
120
 * @brief   Enables the PWM subsystem.
121
 */
122
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
123
#define HAL_USE_PWM                         FALSE
124
#endif
125
 
126
/**
127
 * @brief   Enables the RTC subsystem.
128
 */
129
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
130
#define HAL_USE_RTC                         FALSE
131
#endif
132
 
133
/**
134
 * @brief   Enables the SDC subsystem.
135
 */
136
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
137
#define HAL_USE_SDC                         FALSE
138
#endif
139
 
140
/**
141
 * @brief   Enables the SERIAL subsystem.
142
 */
143
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
144
#define HAL_USE_SERIAL                      TRUE
145
#endif
146
 
147
/**
148
 * @brief   Enables the SERIAL over USB subsystem.
149
 */
150
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
151
#define HAL_USE_SERIAL_USB                  FALSE
152
#endif
153
 
154
/**
155
 * @brief   Enables the SIO subsystem.
156
 */
157
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
158
#define HAL_USE_SIO                         FALSE
159
#endif
160
 
161
/**
162
 * @brief   Enables the SPI subsystem.
163
 */
164
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
165
#define HAL_USE_SPI                         TRUE
166
#endif
167
 
168
/**
169
 * @brief   Enables the TRNG subsystem.
170
 */
171
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
172
#define HAL_USE_TRNG                        FALSE
173
#endif
174
 
175
/**
176
 * @brief   Enables the UART subsystem.
177
 */
178
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
179
#define HAL_USE_UART                         FALSE
180
#endif
181
 
182
/**
183
 * @brief   Enables the USB subsystem.
184
 */
185
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
186
#define HAL_USE_USB                         FALSE
187
#endif
188
 
189
/**
190
 * @brief   Enables the WDG subsystem.
191
 */
192
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
193
#define HAL_USE_WDG                         FALSE
194
#endif
195
 
196
/**
197
 * @brief   Enables the WSPI subsystem.
198
 */
199
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
200
#define HAL_USE_WSPI                        FALSE
201
#endif
202
 
203
/*===========================================================================*/
204
/* PAL driver related settings.                                              */
205
/*===========================================================================*/
206
 
207
/**
208
 * @brief   Enables synchronous APIs.
209
 * @note    Disabling this option saves both code and data space.
210
 */
211
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
212
#define PAL_USE_CALLBACKS                   FALSE
213
#endif
214
 
215
/**
216
 * @brief   Enables synchronous APIs.
217
 * @note    Disabling this option saves both code and data space.
218
 */
219
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
220
#define PAL_USE_WAIT                        FALSE
221
#endif
222
 
223
/*===========================================================================*/
224
/* ADC driver related settings.                                              */
225
/*===========================================================================*/
226
 
227
/**
228
 * @brief   Enables synchronous APIs.
229
 * @note    Disabling this option saves both code and data space.
230
 */
231
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
232
#define ADC_USE_WAIT                        TRUE
233
#endif
234
 
235
/**
236
 * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
237
 * @note    Disabling this option saves both code and data space.
238
 */
239
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
240
#define ADC_USE_MUTUAL_EXCLUSION            TRUE
241
#endif
242
 
243
/*===========================================================================*/
244
/* CAN driver related settings.                                              */
245
/*===========================================================================*/
246
 
247
/**
248
 * @brief   Sleep mode related APIs inclusion switch.
249
 */
250
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
251
#define CAN_USE_SLEEP_MODE                  TRUE
252
#endif
253
 
254
/**
255
 * @brief   Enforces the driver to use direct callbacks rather than OSAL events.
256
 */
257
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
258
#define CAN_ENFORCE_USE_CALLBACKS           FALSE
259
#endif
260
 
261
/*===========================================================================*/
262
/* CRY driver related settings.                                              */
263
/*===========================================================================*/
264
 
265
/**
266
 * @brief   Enables the SW fall-back of the cryptographic driver.
267
 * @details When enabled, this option, activates a fall-back software
268
 *          implementation for algorithms not supported by the underlying
269
 *          hardware.
270
 * @note    Fall-back implementations may not be present for all algorithms.
271
 */
272
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
273
#define HAL_CRY_USE_FALLBACK                FALSE
274
#endif
275
 
276
/**
277
 * @brief   Makes the driver forcibly use the fall-back implementations.
278
 */
279
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
280
#define HAL_CRY_ENFORCE_FALLBACK            FALSE
281
#endif
282
 
283
/*===========================================================================*/
284
/* DAC driver related settings.                                              */
285
/*===========================================================================*/
286
 
287
/**
288
 * @brief   Enables synchronous APIs.
289
 * @note    Disabling this option saves both code and data space.
290
 */
291
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
292
#define DAC_USE_WAIT                        TRUE
293
#endif
294
 
295
/**
296
 * @brief   Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
297
 * @note    Disabling this option saves both code and data space.
298
 */
299
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
300
#define DAC_USE_MUTUAL_EXCLUSION            TRUE
301
#endif
302
 
303
/*===========================================================================*/
304
/* I2C driver related settings.                                              */
305
/*===========================================================================*/
306
 
307
/**
308
 * @brief   Slave mode API enable switch.
309
 * @note    The low level driver must support this capability.
310
 */
311
#if !defined(I2C_ENABLE_SLAVE_MODE)
312
#define I2C_ENABLE_SLAVE_MODE               FALSE
313
#endif
314
 
315
/**
316
 * @brief   Enables the mutual exclusion APIs on the I2C bus.
317
 */
318
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
319
#define I2C_USE_MUTUAL_EXCLUSION            TRUE
320
#endif
321
 
322
/*===========================================================================*/
323
/* MAC driver related settings.                                              */
324
/*===========================================================================*/
325
 
326
/**
327
 * @brief   Enables the zero-copy API.
328
 */
329
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
330
#define MAC_USE_ZERO_COPY                   FALSE
331
#endif
332
 
333
/**
334
 * @brief   Enables an event sources for incoming packets.
335
 */
336
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
337
#define MAC_USE_EVENTS                      TRUE
338
#endif
339
 
340
/*===========================================================================*/
341
/* MMC_SPI driver related settings.                                          */
342
/*===========================================================================*/
343
 
344
/**
345
 * @brief   Timeout before assuming a failure while waiting for card idle.
346
 * @note    Time is in milliseconds.
347
 */
348
#if !defined(MMC_IDLE_TIMEOUT_MS) || defined(__DOXYGEN__)
349
#define MMC_IDLE_TIMEOUT_MS                 1000
350
#endif
351
 
352
/**
353
 * @brief   Mutual exclusion on the SPI bus.
354
 */
355
#if !defined(MMC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
356
#define MMC_USE_MUTUAL_EXCLUSION            TRUE
357
#endif
358
 
359
/*===========================================================================*/
360
/* SDC driver related settings.                                              */
361
/*===========================================================================*/
362
 
363
/**
364
 * @brief   Number of initialization attempts before rejecting the card.
365
 * @note    Attempts are performed at 10mS intervals.
366
 */
367
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
368
#define SDC_INIT_RETRY                      100
369
#endif
370
 
371
/**
372
 * @brief   Include support for MMC cards.
373
 * @note    MMC support is not yet implemented so this option must be kept
374
 *          at @p FALSE.
375
 */
376
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
377
#define SDC_MMC_SUPPORT                     FALSE
378
#endif
379
 
380
/**
381
 * @brief   Delays insertions.
382
 * @details If enabled this options inserts delays into the MMC waiting
383
 *          routines releasing some extra CPU time for the threads with
384
 *          lower priority, this may slow down the driver a bit however.
385
 */
386
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
387
#define SDC_NICE_WAITING                    TRUE
388
#endif
389
 
390
/**
391
 * @brief   OCR initialization constant for V20 cards.
392
 */
393
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
394
#define SDC_INIT_OCR_V20                    0x50FF8000U
395
#endif
396
 
397
/**
398
 * @brief   OCR initialization constant for non-V20 cards.
399
 */
400
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
401
#define SDC_INIT_OCR                        0x80100000U
402
#endif
403
 
404
/*===========================================================================*/
405
/* SERIAL driver related settings.                                           */
406
/*===========================================================================*/
407
 
408
/**
409
 * @brief   Default bit rate.
410
 * @details Configuration parameter, this is the baud rate selected for the
411
 *          default configuration.
412
 */
413
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
414
#define SERIAL_DEFAULT_BITRATE              38400
415
#endif
416
 
417
/**
418
 * @brief   Serial buffers size.
419
 * @details Configuration parameter, you can change the depth of the queue
420
 *          buffers depending on the requirements of your application.
421
 * @note    The default is 16 bytes for both the transmission and receive
422
 *          buffers.
423
 */
424
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
425
#define SERIAL_BUFFERS_SIZE                 16
426
#endif
427
 
428
/*===========================================================================*/
429
/* SIO driver related settings.                                              */
430
/*===========================================================================*/
431
 
432
/**
433
 * @brief   Default bit rate.
434
 * @details Configuration parameter, this is the baud rate selected for the
435
 *          default configuration.
436
 */
437
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
438
#define SIO_DEFAULT_BITRATE                 38400
439
#endif
440
 
441
/**
442
 * @brief   Support for thread synchronization API.
443
 */
444
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
445
#define SIO_USE_SYNCHRONIZATION             TRUE
446
#endif
447
 
448
/*===========================================================================*/
449
/* SERIAL_USB driver related setting.                                        */
450
/*===========================================================================*/
451
 
452
/**
453
 * @brief   Serial over USB buffers size.
454
 * @details Configuration parameter, the buffer size must be a multiple of
455
 *          the USB data endpoint maximum packet size.
456
 * @note    The default is 256 bytes for both the transmission and receive
457
 *          buffers.
458
 */
459
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
460
#define SERIAL_USB_BUFFERS_SIZE             256
461
#endif
462
 
463
/**
464
 * @brief   Serial over USB number of buffers.
465
 * @note    The default is 2 buffers.
466
 */
467
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
468
#define SERIAL_USB_BUFFERS_NUMBER           2
469
#endif
470
 
471
/*===========================================================================*/
472
/* SPI driver related settings.                                              */
473
/*===========================================================================*/
474
 
475
/**
476
 * @brief   Enables synchronous APIs.
477
 * @note    Disabling this option saves both code and data space.
478
 */
479
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
480
#define SPI_USE_WAIT                        TRUE
481
#endif
482
 
483
/**
484
 * @brief   Inserts an assertion on function errors before returning.
485
 */
486
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
487
#define SPI_USE_ASSERT_ON_ERROR             TRUE
488
#endif
489
 
490
/**
491
 * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
492
 * @note    Disabling this option saves both code and data space.
493
 */
494
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
495
#define SPI_USE_MUTUAL_EXCLUSION            TRUE
496
#endif
497
 
498
/**
499
 * @brief   Handling method for SPI CS line.
500
 * @note    Disabling this option saves both code and data space.
501
 */
502
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
503
#define SPI_SELECT_MODE                     SPI_SELECT_MODE_PAD
504
#endif
505
 
506
/*===========================================================================*/
507
/* UART driver related settings.                                             */
508
/*===========================================================================*/
509
 
510
/**
511
 * @brief   Enables synchronous APIs.
512
 * @note    Disabling this option saves both code and data space.
513
 */
514
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
515
#define UART_USE_WAIT                       FALSE
516
#endif
517
 
518
/**
519
 * @brief   Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
520
 * @note    Disabling this option saves both code and data space.
521
 */
522
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
523
#define UART_USE_MUTUAL_EXCLUSION           FALSE
524
#endif
525
 
526
/*===========================================================================*/
527
/* USB driver related settings.                                              */
528
/*===========================================================================*/
529
 
530
/**
531
 * @brief   Enables synchronous APIs.
532
 * @note    Disabling this option saves both code and data space.
533
 */
534
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
535
#define USB_USE_WAIT                        FALSE
536
#endif
537
 
538
/*===========================================================================*/
539
/* WSPI driver related settings.                                             */
540
/*===========================================================================*/
541
 
542
/**
543
 * @brief   Enables synchronous APIs.
544
 * @note    Disabling this option saves both code and data space.
545
 */
546
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
547
#define WSPI_USE_WAIT                       TRUE
548
#endif
549
 
550
/**
551
 * @brief   Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
552
 * @note    Disabling this option saves both code and data space.
553
 */
554
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
555
#define WSPI_USE_MUTUAL_EXCLUSION           TRUE
556
#endif
557
 
558
#endif /* HALCONF_H */
559
 
560
/** @} */