Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / RT-STM32L476RG-NUCLEO64 / halconf.h @ 27d0378b

History | View | Annotate | Download (16.5 KB)

1
/*
2
    ChibiOS - Copyright (C) 2006..2017 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_
32
#define _CHIBIOS_HAL_CONF_VER_6_0_
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
/**
58
 * @brief   Enables the cryptographic subsystem.
59
 */
60
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
61
#define HAL_USE_CRY                         FALSE
62
#endif
63

    
64
/**
65
 * @brief   Enables the DAC subsystem.
66
 */
67
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
68
#define HAL_USE_DAC                         FALSE
69
#endif
70

    
71
/**
72
 * @brief   Enables the EXT subsystem.
73
 */
74
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
75
#define HAL_USE_EXT                         FALSE
76
#endif
77

    
78
/**
79
 * @brief   Enables the GPT subsystem.
80
 */
81
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
82
#define HAL_USE_GPT                         FALSE
83
#endif
84

    
85
/**
86
 * @brief   Enables the I2C subsystem.
87
 */
88
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
89
#define HAL_USE_I2C                         FALSE
90
#endif
91

    
92
/**
93
 * @brief   Enables the I2S subsystem.
94
 */
95
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
96
#define HAL_USE_I2S                         FALSE
97
#endif
98

    
99
/**
100
 * @brief   Enables the ICU subsystem.
101
 */
102
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
103
#define HAL_USE_ICU                         FALSE
104
#endif
105

    
106
/**
107
 * @brief   Enables the MAC subsystem.
108
 */
109
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
110
#define HAL_USE_MAC                         FALSE
111
#endif
112

    
113
/**
114
 * @brief   Enables the MMC_SPI subsystem.
115
 */
116
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
117
#define HAL_USE_MMC_SPI                     FALSE
118
#endif
119

    
120
/**
121
 * @brief   Enables the PWM subsystem.
122
 */
123
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
124
#define HAL_USE_PWM                         FALSE
125
#endif
126

    
127
/**
128
 * @brief   Enables the QSPI subsystem.
129
 */
130
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
131
#define HAL_USE_QSPI                        FALSE
132
#endif
133

    
134
/**
135
 * @brief   Enables the RTC subsystem.
136
 */
137
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
138
#define HAL_USE_RTC                         TRUE
139
#endif
140

    
141
/**
142
 * @brief   Enables the SDC subsystem.
143
 */
144
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
145
#define HAL_USE_SDC                         FALSE
146
#endif
147

    
148
/**
149
 * @brief   Enables the SERIAL subsystem.
150
 */
151
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
152
#define HAL_USE_SERIAL                      TRUE
153
#endif
154

    
155
/**
156
 * @brief   Enables the SERIAL over USB subsystem.
157
 */
158
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
159
#define HAL_USE_SERIAL_USB                  FALSE
160
#endif
161

    
162
/**
163
 * @brief   Enables the SPI subsystem.
164
 */
165
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
166
#define HAL_USE_SPI                         FALSE
167
#endif
168

    
169
/**
170
 * @brief   Enables the UART subsystem.
171
 */
172
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
173
#define HAL_USE_UART                        FALSE
174
#endif
175

    
176
/**
177
 * @brief   Enables the USB subsystem.
178
 */
179
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
180
#define HAL_USE_USB                         FALSE
181
#endif
182

    
183
/**
184
 * @brief   Enables the WDG subsystem.
185
 */
186
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
187
#define HAL_USE_WDG                         FALSE
188
#endif
189

    
190
/*===========================================================================*/
191
/* PAL driver related settings.                                              */
192
/*===========================================================================*/
193

    
194
/**
195
 * @brief   Enables synchronous APIs.
196
 * @note    Disabling this option saves both code and data space.
197
 */
198
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
199
#define PAL_USE_CALLBACKS                   TRUE
200
#endif
201

    
202
/**
203
 * @brief   Enables synchronous APIs.
204
 * @note    Disabling this option saves both code and data space.
205
 */
206
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
207
#define PAL_USE_WAIT                        FALSE
208
#endif
209

    
210
/*===========================================================================*/
211
/* ADC driver related settings.                                              */
212
/*===========================================================================*/
213

    
214
/**
215
 * @brief   Enables synchronous APIs.
216
 * @note    Disabling this option saves both code and data space.
217
 */
218
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
219
#define ADC_USE_WAIT                        TRUE
220
#endif
221

    
222
/**
223
 * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
224
 * @note    Disabling this option saves both code and data space.
225
 */
226
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
227
#define ADC_USE_MUTUAL_EXCLUSION            TRUE
228
#endif
229

    
230
/*===========================================================================*/
231
/* CAN driver related settings.                                              */
232
/*===========================================================================*/
233

    
234
/**
235
 * @brief   Sleep mode related APIs inclusion switch.
236
 */
237
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
238
#define CAN_USE_SLEEP_MODE                  FALSE
239
#endif
240

    
241
/**
242
 * @brief   Enforces the driver to use direct callbacks rather than OSAL events.
243
 */
244
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
245
#define CAN_ENFORCE_USE_CALLBACKS           FALSE
246
#endif
247

    
248
/*===========================================================================*/
249
/* CRY driver related settings.                                              */
250
/*===========================================================================*/
251

    
252
/**
253
 * @brief   Enables the SW fall-back of the cryptographic driver.
254
 * @details When enabled, this option, activates a fall-back software
255
 *          implementation for algorithms not supported by the underlying
256
 *          hardware.
257
 * @note    Fall-back implementations may not be present for all algorithms.
258
 */
259
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
260
#define HAL_CRY_USE_FALLBACK                FALSE
261
#endif
262

    
263
/**
264
 * @brief   Makes the driver forcibly use the fall-back implementations.
265
 */
266
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
267
#define HAL_CRY_ENFORCE_FALLBACK            FALSE
268
#endif
269

    
270
/*===========================================================================*/
271
/* DAC driver related settings.                                              */
272
/*===========================================================================*/
273

    
274
/**
275
 * @brief   Enables synchronous APIs.
276
 * @note    Disabling this option saves both code and data space.
277
 */
278
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
279
#define DAC_USE_WAIT                        TRUE
280
#endif
281

    
282
/**
283
 * @brief   Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
284
 * @note    Disabling this option saves both code and data space.
285
 */
286
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
287
#define DAC_USE_MUTUAL_EXCLUSION            TRUE
288
#endif
289

    
290
/*===========================================================================*/
291
/* I2C driver related settings.                                              */
292
/*===========================================================================*/
293

    
294
/**
295
 * @brief   Enables the mutual exclusion APIs on the I2C bus.
296
 */
297
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
298
#define I2C_USE_MUTUAL_EXCLUSION            TRUE
299
#endif
300

    
301
/*===========================================================================*/
302
/* MAC driver related settings.                                              */
303
/*===========================================================================*/
304

    
305
/**
306
 * @brief   Enables the zero-copy API.
307
 */
308
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
309
#define MAC_USE_ZERO_COPY                   FALSE
310
#endif
311

    
312
/**
313
 * @brief   Enables an event sources for incoming packets.
314
 */
315
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
316
#define MAC_USE_EVENTS                      FALSE
317
#endif
318

    
319
/*===========================================================================*/
320
/* MMC_SPI driver related settings.                                          */
321
/*===========================================================================*/
322

    
323
/**
324
 * @brief   Delays insertions.
325
 * @details If enabled this options inserts delays into the MMC waiting
326
 *          routines releasing some extra CPU time for the threads with
327
 *          lower priority, this may slow down the driver a bit however.
328
 *          This option is recommended also if the SPI driver does not
329
 *          use a DMA channel and heavily loads the CPU.
330
 */
331
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
332
#define MMC_NICE_WAITING                    FALSE
333
#endif
334

    
335
/*===========================================================================*/
336
/* QSPI driver related settings.                                             */
337
/*===========================================================================*/
338

    
339
/**
340
 * @brief   Enables synchronous APIs.
341
 * @note    Disabling this option saves both code and data space.
342
 */
343
#if !defined(QSPI_USE_WAIT) || defined(__DOXYGEN__)
344
#define QSPI_USE_WAIT                       TRUE
345
#endif
346

    
347
/**
348
 * @brief   Enables the @p qspiAcquireBus() and @p qspiReleaseBus() APIs.
349
 * @note    Disabling this option saves both code and data space.
350
 */
351
#if !defined(QSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
352
#define QSPI_USE_MUTUAL_EXCLUSION           TRUE
353
#endif
354

    
355
/*===========================================================================*/
356
/* SDC driver related settings.                                              */
357
/*===========================================================================*/
358

    
359
/**
360
 * @brief   Number of initialization attempts before rejecting the card.
361
 * @note    Attempts are performed at 10mS intervals.
362
 */
363
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
364
#define SDC_INIT_RETRY                      100
365
#endif
366

    
367
/**
368
 * @brief   Include support for MMC cards.
369
 * @note    MMC support is not yet implemented so this option must be kept
370
 *          at @p FALSE.
371
 */
372
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
373
#define SDC_MMC_SUPPORT                     FALSE
374
#endif
375

    
376
/**
377
 * @brief   Delays insertions.
378
 * @details If enabled this options inserts delays into the MMC waiting
379
 *          routines releasing some extra CPU time for the threads with
380
 *          lower priority, this may slow down the driver a bit however.
381
 */
382
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
383
#define SDC_NICE_WAITING                    FALSE
384
#endif
385

    
386
/**
387
 * @brief   OCR initialization constant for V20 cards.
388
 */
389
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
390
#define SDC_INIT_OCR_V20                    0x50FF8000U
391
#endif
392

    
393
/**
394
 * @brief   OCR initialization constant for non-V20 cards.
395
 */
396
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
397
#define SDC_INIT_OCR                        0x80100000U
398
#endif
399

    
400
/*===========================================================================*/
401
/* SERIAL driver related settings.                                           */
402
/*===========================================================================*/
403

    
404
/**
405
 * @brief   Default bit rate.
406
 * @details Configuration parameter, this is the baud rate selected for the
407
 *          default configuration.
408
 */
409
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
410
#define SERIAL_DEFAULT_BITRATE              38400
411
#endif
412

    
413
/**
414
 * @brief   Serial buffers size.
415
 * @details Configuration parameter, you can change the depth of the queue
416
 *          buffers depending on the requirements of your application.
417
 * @note    The default is 16 bytes for both the transmission and receive
418
 *          buffers.
419
 */
420
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
421
#define SERIAL_BUFFERS_SIZE                 16
422
#endif
423

    
424
/*===========================================================================*/
425
/* SERIAL_USB driver related setting.                                        */
426
/*===========================================================================*/
427

    
428
/**
429
 * @brief   Serial over USB buffers size.
430
 * @details Configuration parameter, the buffer size must be a multiple of
431
 *          the USB data endpoint maximum packet size.
432
 * @note    The default is 256 bytes for both the transmission and receive
433
 *          buffers.
434
 */
435
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
436
#define SERIAL_USB_BUFFERS_SIZE             256
437
#endif
438

    
439
/**
440
 * @brief   Serial over USB number of buffers.
441
 * @note    The default is 2 buffers.
442
 */
443
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
444
#define SERIAL_USB_BUFFERS_NUMBER           2
445
#endif
446

    
447
/*===========================================================================*/
448
/* SPI driver related settings.                                              */
449
/*===========================================================================*/
450

    
451
/**
452
 * @brief   Enables synchronous APIs.
453
 * @note    Disabling this option saves both code and data space.
454
 */
455
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
456
#define SPI_USE_WAIT                        TRUE
457
#endif
458

    
459
/**
460
 * @brief   Enables circular transfers APIs.
461
 * @note    Disabling this option saves both code and data space.
462
 */
463
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
464
#define SPI_USE_CIRCULAR                    FALSE
465
#endif
466

    
467

    
468
/**
469
 * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
470
 * @note    Disabling this option saves both code and data space.
471
 */
472
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
473
#define SPI_USE_MUTUAL_EXCLUSION            TRUE
474
#endif
475

    
476
/**
477
 * @brief   Handling method for SPI CS line.
478
 * @note    Disabling this option saves both code and data space.
479
 */
480
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
481
#define SPI_SELECT_MODE                     SPI_SELECT_MODE_PAD
482
#endif
483

    
484
/*===========================================================================*/
485
/* UART driver related settings.                                             */
486
/*===========================================================================*/
487

    
488
/**
489
 * @brief   Enables synchronous APIs.
490
 * @note    Disabling this option saves both code and data space.
491
 */
492
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
493
#define UART_USE_WAIT                       FALSE
494
#endif
495

    
496
/**
497
 * @brief   Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
498
 * @note    Disabling this option saves both code and data space.
499
 */
500
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
501
#define UART_USE_MUTUAL_EXCLUSION           FALSE
502
#endif
503

    
504
/*===========================================================================*/
505
/* USB driver related settings.                                              */
506
/*===========================================================================*/
507

    
508
/**
509
 * @brief   Enables synchronous APIs.
510
 * @note    Disabling this option saves both code and data space.
511
 */
512
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
513
#define USB_USE_WAIT                        FALSE
514
#endif
515

    
516
#endif /* HALCONF_H */
517

    
518
/** @} */