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/common | |
parent | b56282756b5faa410301de8c4ecdcae0e0148652 (diff) |
Refactor use of _STM32_ defines (#14439)
Diffstat (limited to 'tmk_core/common')
-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 4515b025da..6a57d889bb 100644 --- a/tmk_core/common/chibios/chibios_config.h +++ b/tmk_core/common/chibios/chibios_config.h @@ -22,23 +22,28 @@ // STM32 compatibility #if defined(MCU_STM32) # define CPU_CLOCK STM32_SYSCLK -#endif -#if defined(STM32F1XX) -# define USE_GPIOV1 -#endif +# if defined(STM32F1XX) +# define USE_GPIOV1 +# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define PAL_OUTPUT_SPEED_HIGHEST PAL_STM32_OSPEED_HIGHEST +# define PAL_PUPDR_FLOATING PAL_STM32_PUPDR_FLOATING +# endif -#if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) -# define USE_I2CV1 +# if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) +# define USE_I2CV1 +# endif #endif // teensy compatibility #if defined(MCU_KINETIS) # define CPU_CLOCK KINETIS_SYSCLK_FREQUENCY -#endif -#if defined(K20x) || defined(KL2x) -# define USE_I2CV1 -# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed -# define USE_GPIOV1 -#endif +# if defined(K20x) || defined(KL2x) +# define USE_I2CV1 +# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed +# define USE_GPIOV1 +# endif +#endif
\ No newline at end of file |