summaryrefslogtreecommitdiff
path: root/platforms/chibios/chibios_config.h
diff options
context:
space:
mode:
authorJoy Lee <chang.li@westberrytech.com>2021-11-27 06:28:18 +0800
committerGitHub <noreply@github.com>2021-11-27 09:28:18 +1100
commit68838bb700413144c6fdaf680f3d412b8231b584 (patch)
tree771e7fea9bc145c9e833ac66dcb712af9b55e532 /platforms/chibios/chibios_config.h
parentb04f66f2452494206673323c9495ea6a56c0cb06 (diff)
Westberrytech pr (#14422)
* Added support for WB32 MCU * Modified eeprom_wb32.c * Remove the eeprom_wb32-related code
Diffstat (limited to 'platforms/chibios/chibios_config.h')
-rw-r--r--platforms/chibios/chibios_config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index ad2f808a95..4e35736606 100644
--- a/platforms/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
@@ -51,6 +51,18 @@
# endif
#endif
+// WB32 compatibility
+#if defined(MCU_WB32)
+# define CPU_CLOCK WB32_MAINCLK
+
+# if defined(WB32F3G71xx)
+# define PAL_OUTPUT_TYPE_OPENDRAIN PAL_WB32_OTYPE_OPENDRAIN
+# define PAL_OUTPUT_TYPE_PUSHPULL PAL_WB32_OTYPE_PUSHPULL
+# define PAL_OUTPUT_SPEED_HIGHEST PAL_WB32_OSPEED_HIGH
+# define PAL_PUPDR_FLOATING PAL_WB32_PUPDR_FLOATING
+# endif
+#endif
+
#if defined(GD32VF103)
/* This chip has the same API as STM32F103, but uses different names for literally the same thing.
* As of 4.7.2021 QMK is tailored to use STM32 defines/names, for compatibility sake