aboutsummaryrefslogtreecommitdiff
path: root/quantum/stm32/halconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/stm32/halconf.h')
-rw-r--r--quantum/stm32/halconf.h166
1 files changed, 151 insertions, 15 deletions
diff --git a/quantum/stm32/halconf.h b/quantum/stm32/halconf.h
index 72e011d3d..106f0f575 100644
--- a/quantum/stm32/halconf.h
+++ b/quantum/stm32/halconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio 2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
@@ -28,6 +28,9 @@
28#ifndef HALCONF_H 28#ifndef HALCONF_H
29# define HALCONF_H 29# define HALCONF_H
30 30
31# define _CHIBIOS_HAL_CONF_
32# define _CHIBIOS_HAL_CONF_VER_7_0_
33
31# include "mcuconf.h" 34# include "mcuconf.h"
32 35
33/** 36/**
@@ -52,17 +55,17 @@
52# endif 55# endif
53 56
54/** 57/**
55 * @brief Enables the DAC subsystem. 58 * @brief Enables the cryptographic subsystem.
56 */ 59 */
57# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) 60# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
58# define HAL_USE_DAC TRUE 61# define HAL_USE_CRY FALSE
59# endif 62# endif
60 63
61/** 64/**
62 * @brief Enables the EXT subsystem. 65 * @brief Enables the DAC subsystem.
63 */ 66 */
64# if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) 67# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
65# define HAL_USE_EXT FALSE 68# define HAL_USE_DAC TRUE
66# endif 69# endif
67 70
68/** 71/**
@@ -115,13 +118,6 @@
115# endif 118# endif
116 119
117/** 120/**
118 * @brief Enables the QSPI subsystem.
119 */
120# if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
121# define HAL_USE_QSPI FALSE
122# endif
123
124/**
125 * @brief Enables the RTC subsystem. 121 * @brief Enables the RTC subsystem.
126 */ 122 */
127# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) 123# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
@@ -150,6 +146,13 @@
150# endif 146# endif
151 147
152/** 148/**
149 * @brief Enables the SIO subsystem.
150 */
151# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
152# define HAL_USE_SIO FALSE
153# endif
154
155/**
153 * @brief Enables the SPI subsystem. 156 * @brief Enables the SPI subsystem.
154 */ 157 */
155# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) 158# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
@@ -157,6 +160,13 @@
157# endif 160# endif
158 161
159/** 162/**
163 * @brief Enables the TRNG subsystem.
164 */
165# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
166# define HAL_USE_TRNG FALSE
167# endif
168
169/**
160 * @brief Enables the UART subsystem. 170 * @brief Enables the UART subsystem.
161 */ 171 */
162# if !defined(HAL_USE_UART) || defined(__DOXYGEN__) 172# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
@@ -177,6 +187,33 @@
177# define HAL_USE_WDG FALSE 187# define HAL_USE_WDG FALSE
178# endif 188# endif
179 189
190/**
191 * @brief Enables the WSPI subsystem.
192 */
193# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
194# define HAL_USE_WSPI FALSE
195# endif
196
197/*===========================================================================*/
198/* PAL driver related settings. */
199/*===========================================================================*/
200
201/**
202 * @brief Enables synchronous APIs.
203 * @note Disabling this option saves both code and data space.
204 */
205# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
206# define PAL_USE_CALLBACKS FALSE
207# endif
208
209/**
210 * @brief Enables synchronous APIs.
211 * @note Disabling this option saves both code and data space.
212 */
213# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
214# define PAL_USE_WAIT FALSE
215# endif
216
180/*===========================================================================*/ 217/*===========================================================================*/
181/* ADC driver related settings. */ 218/* ADC driver related settings. */
182/*===========================================================================*/ 219/*===========================================================================*/
@@ -208,6 +245,55 @@
208# define CAN_USE_SLEEP_MODE TRUE 245# define CAN_USE_SLEEP_MODE TRUE
209# endif 246# endif
210 247
248/**
249 * @brief Enforces the driver to use direct callbacks rather than OSAL events.
250 */
251# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
252# define CAN_ENFORCE_USE_CALLBACKS FALSE
253# endif
254
255/*===========================================================================*/
256/* CRY driver related settings. */
257/*===========================================================================*/
258
259/**
260 * @brief Enables the SW fall-back of the cryptographic driver.
261 * @details When enabled, this option, activates a fall-back software
262 * implementation for algorithms not supported by the underlying
263 * hardware.
264 * @note Fall-back implementations may not be present for all algorithms.
265 */
266# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
267# define HAL_CRY_USE_FALLBACK FALSE
268# endif
269
270/**
271 * @brief Makes the driver forcibly use the fall-back implementations.
272 */
273# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
274# define HAL_CRY_ENFORCE_FALLBACK FALSE
275# endif
276
277/*===========================================================================*/
278/* DAC driver related settings. */
279/*===========================================================================*/
280
281/**
282 * @brief Enables synchronous APIs.
283 * @note Disabling this option saves both code and data space.
284 */
285# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
286# define DAC_USE_WAIT TRUE
287# endif
288
289/**
290 * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
291 * @note Disabling this option saves both code and data space.
292 */
293# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
294# define DAC_USE_MUTUAL_EXCLUSION TRUE
295# endif
296
211/*===========================================================================*/ 297/*===========================================================================*/
212/* I2C driver related settings. */ 298/* I2C driver related settings. */
213/*===========================================================================*/ 299/*===========================================================================*/
@@ -224,7 +310,7 @@
224/*===========================================================================*/ 310/*===========================================================================*/
225 311
226/** 312/**
227 * @brief Enables an event sources for incoming packets. 313 * @brief Enables the zero-copy API.
228 */ 314 */
229# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) 315# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
230# define MAC_USE_ZERO_COPY FALSE 316# define MAC_USE_ZERO_COPY FALSE
@@ -284,6 +370,20 @@
284# define SDC_NICE_WAITING TRUE 370# define SDC_NICE_WAITING TRUE
285# endif 371# endif
286 372
373/**
374 * @brief OCR initialization constant for V20 cards.
375 */
376# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
377# define SDC_INIT_OCR_V20 0x50FF8000U
378# endif
379
380/**
381 * @brief OCR initialization constant for non-V20 cards.
382 */
383# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
384# define SDC_INIT_OCR 0x80100000U
385# endif
386
287/*===========================================================================*/ 387/*===========================================================================*/
288/* SERIAL driver related settings. */ 388/* SERIAL driver related settings. */
289/*===========================================================================*/ 389/*===========================================================================*/
@@ -344,6 +444,14 @@
344# endif 444# endif
345 445
346/** 446/**
447 * @brief Enables circular transfers APIs.
448 * @note Disabling this option saves both code and data space.
449 */
450# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
451# define SPI_USE_CIRCULAR FALSE
452# endif
453
454/**
347 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. 455 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
348 * @note Disabling this option saves both code and data space. 456 * @note Disabling this option saves both code and data space.
349 */ 457 */
@@ -351,6 +459,14 @@
351# define SPI_USE_MUTUAL_EXCLUSION TRUE 459# define SPI_USE_MUTUAL_EXCLUSION TRUE
352# endif 460# endif
353 461
462/**
463 * @brief Handling method for SPI CS line.
464 * @note Disabling this option saves both code and data space.
465 */
466# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
467# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
468# endif
469
354/*===========================================================================*/ 470/*===========================================================================*/
355/* UART driver related settings. */ 471/* UART driver related settings. */
356/*===========================================================================*/ 472/*===========================================================================*/
@@ -383,6 +499,26 @@
383# define USB_USE_WAIT TRUE 499# define USB_USE_WAIT TRUE
384# endif 500# endif
385 501
502/*===========================================================================*/
503/* WSPI driver related settings. */
504/*===========================================================================*/
505
506/**
507 * @brief Enables synchronous APIs.
508 * @note Disabling this option saves both code and data space.
509 */
510# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
511# define WSPI_USE_WAIT TRUE
512# endif
513
514/**
515 * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
516 * @note Disabling this option saves both code and data space.
517 */
518# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
519# define WSPI_USE_MUTUAL_EXCLUSION TRUE
520# endif
521
386#endif /* HALCONF_H */ 522#endif /* HALCONF_H */
387 523
388/** @} */ 524/** @} */