diff options
| author | Joel Challis <git@zvecr.com> | 2021-09-15 02:19:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-15 11:19:51 +1000 |
| commit | a78f0e8a0ba869681d636457f30e668e34853cb7 (patch) | |
| tree | 1b9b4a6a6eb97dc433e2bec397e579e96086b4bc /tmk_core | |
| parent | b56282756b5faa410301de8c4ecdcae0e0148652 (diff) | |
| download | qmk_firmware-a78f0e8a0ba869681d636457f30e668e34853cb7.tar.gz qmk_firmware-a78f0e8a0ba869681d636457f30e668e34853cb7.zip | |
Refactor use of _STM32_ defines (#14439)
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/chibios/chibios_config.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h index 4515b025d..6a57d889b 100644 --- a/tmk_core/common/chibios/chibios_config.h +++ b/tmk_core/common/chibios/chibios_config.h | |||
| @@ -22,23 +22,28 @@ | |||
| 22 | // STM32 compatibility | 22 | // STM32 compatibility |
| 23 | #if defined(MCU_STM32) | 23 | #if defined(MCU_STM32) |
| 24 | # define CPU_CLOCK STM32_SYSCLK | 24 | # define CPU_CLOCK STM32_SYSCLK |
| 25 | #endif | ||
| 26 | 25 | ||
| 27 | #if defined(STM32F1XX) | 26 | # if defined(STM32F1XX) |
| 28 | # define USE_GPIOV1 | 27 | # define USE_GPIOV1 |
| 29 | #endif | 28 | # define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_STM32_ALTERNATE_OPENDRAIN |
| 29 | # define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_STM32_ALTERNATE_PUSHPULL | ||
| 30 | # else | ||
| 31 | # define PAL_OUTPUT_SPEED_HIGHEST PAL_STM32_OSPEED_HIGHEST | ||
| 32 | # define PAL_PUPDR_FLOATING PAL_STM32_PUPDR_FLOATING | ||
| 33 | # endif | ||
| 30 | 34 | ||
| 31 | #if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) | 35 | # if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) |
| 32 | # define USE_I2CV1 | 36 | # define USE_I2CV1 |
| 37 | # endif | ||
| 33 | #endif | 38 | #endif |
| 34 | 39 | ||
| 35 | // teensy compatibility | 40 | // teensy compatibility |
| 36 | #if defined(MCU_KINETIS) | 41 | #if defined(MCU_KINETIS) |
| 37 | # define CPU_CLOCK KINETIS_SYSCLK_FREQUENCY | 42 | # define CPU_CLOCK KINETIS_SYSCLK_FREQUENCY |
| 38 | #endif | ||
| 39 | 43 | ||
| 40 | #if defined(K20x) || defined(KL2x) | 44 | # if defined(K20x) || defined(KL2x) |
| 41 | # define USE_I2CV1 | 45 | # define USE_I2CV1 |
| 42 | # define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed | 46 | # define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed |
| 43 | # define USE_GPIOV1 | 47 | # define USE_GPIOV1 |
| 44 | #endif | 48 | # endif |
| 49 | #endif \ No newline at end of file | ||
