Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / NUCLEO-L476RG / halconf.h @ 0f60c8ad

History | View | Annotate | Download (16.927 KB)

1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2019  Thomas Schöpping et al.
4

5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

    
19
/**
20
 * @file
21
 * @brief   HAL configuration header for the NUCLEO-L476RG module.
22
 * @details HAL configuration file, this file allows to enable or disable the
23
 *          various device drivers from your application. You may also use
24
 *          this file in order to override the device drivers default settings.
25
 *
26
 * @addtogroup NUCLEO-L476RG_HAL_CONF
27
 * @{
28
 */
29

    
30
#ifndef HALCONF_H
31
#define HALCONF_H
32

    
33
#define _CHIBIOS_HAL_CONF_
34
#define _CHIBIOS_HAL_CONF_VER_6_0_
35

    
36
#include <alldconf.h>
37
#include "mcuconf.h"
38

    
39
/**
40
 * @brief   Enables the PAL subsystem.
41
 */
42
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
43
#define HAL_USE_PAL                         TRUE
44
#endif
45

    
46
/**
47
 * @brief   Enables the ADC subsystem.
48
 */
49
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
50
#define HAL_USE_ADC                         FALSE
51
#endif
52

    
53
/**
54
 * @brief   Enables the CAN subsystem.
55
 */
56
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
57
#define HAL_USE_CAN                         FALSE
58
#endif
59

    
60
/**
61
 * @brief   Enables the cryptographic subsystem.
62
 */
63
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
64
#define HAL_USE_CRY                         FALSE
65
#endif
66

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

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

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

    
88
/**
89
 * @brief   Enables the I2C subsystem.
90
 */
91
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
92
// enable if MPU6050 demo is enabled
93
#if defined(AMIROLLD_CFG_MPU6050)
94
#define HAL_USE_I2C                         TRUE
95
#else
96
#define HAL_USE_I2C                         FALSE
97
#endif
98
#endif
99

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

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

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

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

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

    
135
/**
136
 * @brief   Enables the QEI subsystem.
137
 */
138
#if !defined(HAL_USE_QEI) || defined(__DOXYGEN__)
139
#define HAL_USE_QEI                         FALSE
140
#endif
141

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

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

    
156
/**
157
 * @brief   Enables the SDC subsystem.
158
 */
159
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
160
#define HAL_USE_SDC                         FALSE
161
#endif
162

    
163
/**
164
 * @brief   Enables the SERIAL subsystem.
165
 */
166
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
167
#define HAL_USE_SERIAL                      TRUE
168
#endif
169

    
170
/**
171
 * @brief   Enables the SERIAL over USB subsystem.
172
 */
173
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
174
#define HAL_USE_SERIAL_USB                  FALSE
175
#endif
176

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

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

    
191
/**
192
 * @brief   Enables the USB subsystem.
193
 */
194
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
195
#define HAL_USE_USB                         FALSE
196
#endif
197

    
198
/**
199
 * @brief   Enables the WDG subsystem.
200
 */
201
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
202
#define HAL_USE_WDG                         FALSE
203
#endif
204

    
205
/*===========================================================================*/
206
/* PAL driver related settings.                                              */
207
/*===========================================================================*/
208

    
209
/**
210
 * @brief   Enables synchronous APIs.
211
 * @note    Disabling this option saves both code and data space.
212
 */
213
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
214
#define PAL_USE_CALLBACKS                   TRUE
215
#endif
216

    
217
/**
218
 * @brief   Enables synchronous APIs.
219
 * @note    Disabling this option saves both code and data space.
220
 */
221
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
222
#define PAL_USE_WAIT                        FALSE
223
#endif
224

    
225
/*===========================================================================*/
226
/* ADC driver related settings.                                              */
227
/*===========================================================================*/
228

    
229
/**
230
 * @brief   Enables synchronous APIs.
231
 * @note    Disabling this option saves both code and data space.
232
 */
233
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
234
#define ADC_USE_WAIT                        TRUE
235
#endif
236

    
237
/**
238
 * @brief   Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
239
 * @note    Disabling this option saves both code and data space.
240
 */
241
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
242
#define ADC_USE_MUTUAL_EXCLUSION            TRUE
243
#endif
244

    
245
/*===========================================================================*/
246
/* CAN driver related settings.                                              */
247
/*===========================================================================*/
248

    
249
/**
250
 * @brief   Sleep mode related APIs inclusion switch.
251
 */
252
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
253
#define CAN_USE_SLEEP_MODE                  TRUE
254
#endif
255

    
256
/**
257
 * @brief   Enforces the driver to use direct callbacks rather than OSAL events.
258
 */
259
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
260
#define CAN_ENFORCE_USE_CALLBACKS           FALSE
261
#endif
262

    
263
/*===========================================================================*/
264
/* CRY driver related settings.                                              */
265
/*===========================================================================*/
266

    
267
/**
268
 * @brief   Enables the SW fall-back of the cryptographic driver.
269
 * @details When enabled, this option, activates a fall-back software
270
 *          implementation for algorithms not supported by the underlying
271
 *          hardware.
272
 * @note    Fall-back implementations may not be present for all algorithms.
273
 */
274
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
275
#define HAL_CRY_USE_FALLBACK                FALSE
276
#endif
277

    
278
/**
279
 * @brief   Makes the driver forcibly use the fall-back implementations.
280
 */
281
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
282
#define HAL_CRY_ENFORCE_FALLBACK            FALSE
283
#endif
284

    
285
/*===========================================================================*/
286
/* DAC driver related settings.                                              */
287
/*===========================================================================*/
288

    
289
/**
290
 * @brief   Enables synchronous APIs.
291
 * @note    Disabling this option saves both code and data space.
292
 */
293
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
294
#define DAC_USE_WAIT                        TRUE
295
#endif
296

    
297
/**
298
 * @brief   Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
299
 * @note    Disabling this option saves both code and data space.
300
 */
301
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
302
#define DAC_USE_MUTUAL_EXCLUSION            TRUE
303
#endif
304

    
305
/*===========================================================================*/
306
/* I2C driver related settings.                                              */
307
/*===========================================================================*/
308

    
309
/**
310
 * @brief   Enables the mutual exclusion APIs on the I2C bus.
311
 */
312
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
313
#define I2C_USE_MUTUAL_EXCLUSION            TRUE
314
#endif
315

    
316
/*===========================================================================*/
317
/* MAC driver related settings.                                              */
318
/*===========================================================================*/
319

    
320
/**
321
 * @brief   Enables the zero-copy API.
322
 */
323
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
324
#define MAC_USE_ZERO_COPY                   FALSE
325
#endif
326

    
327
/**
328
 * @brief   Enables an event sources for incoming packets.
329
 */
330
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
331
#define MAC_USE_EVENTS                      TRUE
332
#endif
333

    
334
/*===========================================================================*/
335
/* MMC_SPI driver related settings.                                          */
336
/*===========================================================================*/
337

    
338
/**
339
 * @brief   Delays insertions.
340
 * @details If enabled this options inserts delays into the MMC waiting
341
 *          routines releasing some extra CPU time for the threads with
342
 *          lower priority, this may slow down the driver a bit however.
343
 *          This option is recommended also if the SPI driver does not
344
 *          use a DMA channel and heavily loads the CPU.
345
 */
346
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
347
#define MMC_NICE_WAITING                    TRUE
348
#endif
349

    
350
/*===========================================================================*/
351
/* QSPI driver related settings.                                             */
352
/*===========================================================================*/
353

    
354
/**
355
 * @brief   Enables synchronous APIs.
356
 * @note    Disabling this option saves both code and data space.
357
 */
358
#if !defined(QSPI_USE_WAIT) || defined(__DOXYGEN__)
359
#define QSPI_USE_WAIT                       TRUE
360
#endif
361

    
362
/**
363
 * @brief   Enables the @p qspiAcquireBus() and @p qspiReleaseBus() APIs.
364
 * @note    Disabling this option saves both code and data space.
365
 */
366
#if !defined(QSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
367
#define QSPI_USE_MUTUAL_EXCLUSION           TRUE
368
#endif
369

    
370
/*===========================================================================*/
371
/* SDC driver related settings.                                              */
372
/*===========================================================================*/
373

    
374
/**
375
 * @brief   Number of initialization attempts before rejecting the card.
376
 * @note    Attempts are performed at 10mS intervals.
377
 */
378
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
379
#define SDC_INIT_RETRY                      100
380
#endif
381

    
382
/**
383
 * @brief   Include support for MMC cards.
384
 * @note    MMC support is not yet implemented so this option must be kept
385
 *          at @p FALSE.
386
 */
387
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
388
#define SDC_MMC_SUPPORT                     FALSE
389
#endif
390

    
391
/**
392
 * @brief   Delays insertions.
393
 * @details If enabled this options inserts delays into the MMC waiting
394
 *          routines releasing some extra CPU time for the threads with
395
 *          lower priority, this may slow down the driver a bit however.
396
 */
397
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
398
#define SDC_NICE_WAITING                    TRUE
399
#endif
400

    
401
/**
402
 * @brief   OCR initialization constant for V20 cards.
403
 */
404
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
405
#define SDC_INIT_OCR_V20                    0x50FF8000U
406
#endif
407

    
408
/**
409
 * @brief   OCR initialization constant for non-V20 cards.
410
 */
411
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
412
#define SDC_INIT_OCR                        0x80100000U
413
#endif
414

    
415
/*===========================================================================*/
416
/* SERIAL driver related settings.                                           */
417
/*===========================================================================*/
418

    
419
/**
420
 * @brief   Default bit rate.
421
 * @details Configuration parameter, this is the baud rate selected for the
422
 *          default configuration.
423
 */
424
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
425
#define SERIAL_DEFAULT_BITRATE              115200
426
#endif
427

    
428
/**
429
 * @brief   Serial buffers size.
430
 * @details Configuration parameter, you can change the depth of the queue
431
 *          buffers depending on the requirements of your application.
432
 * @note    The default is 16 bytes for both the transmission and receive
433
 *          buffers.
434
 */
435
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
436
#define SERIAL_BUFFERS_SIZE                 16
437
#endif
438

    
439
/*===========================================================================*/
440
/* SERIAL_USB driver related setting.                                        */
441
/*===========================================================================*/
442

    
443
/**
444
 * @brief   Serial over USB buffers size.
445
 * @details Configuration parameter, the buffer size must be a multiple of
446
 *          the USB data endpoint maximum packet size.
447
 * @note    The default is 256 bytes for both the transmission and receive
448
 *          buffers.
449
 */
450
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
451
#define SERIAL_USB_BUFFERS_SIZE             256
452
#endif
453

    
454
/**
455
 * @brief   Serial over USB number of buffers.
456
 * @note    The default is 2 buffers.
457
 */
458
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
459
#define SERIAL_USB_BUFFERS_NUMBER           2
460
#endif
461

    
462
/*===========================================================================*/
463
/* SPI driver related settings.                                              */
464
/*===========================================================================*/
465

    
466
/**
467
 * @brief   Enables synchronous APIs.
468
 * @note    Disabling this option saves both code and data space.
469
 */
470
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
471
#define SPI_USE_WAIT                        TRUE
472
#endif
473

    
474
/**
475
 * @brief   Enables circular transfers APIs.
476
 * @note    Disabling this option saves both code and data space.
477
 */
478
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
479
#define SPI_USE_CIRCULAR                    FALSE
480
#endif
481

    
482

    
483
/**
484
 * @brief   Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
485
 * @note    Disabling this option saves both code and data space.
486
 */
487
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
488
#define SPI_USE_MUTUAL_EXCLUSION            TRUE
489
#endif
490

    
491
/**
492
 * @brief   Handling method for SPI CS line.
493
 * @note    Disabling this option saves both code and data space.
494
 */
495
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
496
#define SPI_SELECT_MODE                     SPI_SELECT_MODE_PAD
497
#endif
498

    
499
/*===========================================================================*/
500
/* UART driver related settings.                                             */
501
/*===========================================================================*/
502

    
503
/**
504
 * @brief   Enables synchronous APIs.
505
 * @note    Disabling this option saves both code and data space.
506
 */
507
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
508
#define UART_USE_WAIT                       FALSE
509
#endif
510

    
511
/**
512
 * @brief   Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
513
 * @note    Disabling this option saves both code and data space.
514
 */
515
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
516
#define UART_USE_MUTUAL_EXCLUSION           FALSE
517
#endif
518

    
519
/*===========================================================================*/
520
/* USB driver related settings.                                              */
521
/*===========================================================================*/
522

    
523
/**
524
 * @brief   Enables synchronous APIs.
525
 * @note    Disabling this option saves both code and data space.
526
 */
527
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
528
#define USB_USE_WAIT                        FALSE
529
#endif
530

    
531
#endif /* HALCONF_H */
532

    
533
/** @} */