summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/chibios/chibios_config.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h
index c35f589557..f065948028 100644
--- a/tmk_core/common/chibios/chibios_config.h
+++ b/tmk_core/common/chibios/chibios_config.h
@@ -48,4 +48,12 @@
# 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
+#endif
+
+#if defined(HT32)
+# define CPU_CLOCK HT32_CK_SYS_FREQUENCY
+# define PAL_MODE_ALTERNATE PAL_HT32_MODE_AF
+# define PAL_OUTPUT_TYPE_OPENDRAIN (PAL_HT32_MODE_OD | PAL_HT32_MODE_DIR)
+# define PAL_OUTPUT_TYPE_PUSHPULL PAL_HT32_MODE_DIR
+# define PAL_OUTPUT_SPEED_HIGHEST 0
+#endif