aboutsummaryrefslogtreecommitdiff
path: root/platforms/chibios/chibios_config.h
diff options
context:
space:
mode:
authorHorrorTroll <sonicvipduc@gmail.com>2024-11-21 13:28:28 +0700
committerGitHub <noreply@github.com>2024-11-21 17:28:28 +1100
commit39161b9ee793f4c62836b209ec877acda457b88d (patch)
treeaa0bd408e0b65e6c9ee31f19b2b3cdfc374e5c83 /platforms/chibios/chibios_config.h
parent074bbbfb2129c738a3abfcdcb3e754c7ffcd1b04 (diff)
Added MCU support for ArteryTek AT32F415 (#23445)
Diffstat (limited to 'platforms/chibios/chibios_config.h')
-rw-r--r--platforms/chibios/chibios_config.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index 8f46fe0736..95136baf30 100644
--- a/platforms/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
@@ -142,6 +142,19 @@
# endif
#endif
+// AT32 compatibility
+#if defined(MCU_AT32)
+# define CPU_CLOCK AT32_SYSCLK
+
+# if defined(AT32F415)
+# define USE_GPIOV1
+# define USE_I2CV1
+# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_AT32_ALTERNATE_OPENDRAIN
+# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_AT32_ALTERNATE_PUSHPULL
+# define AUDIO_PWM_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# 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