summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/converters
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-04-03 18:22:52 +0100
committerGitHub <noreply@github.com>2022-04-03 18:22:52 +0100
commit1660b2d2e25f5c43306a043c372255d0f66bb925 (patch)
tree6138d28ccd52c1b4041ec66ec11e873078b18c21 /platforms/chibios/converters
parente6a7e7ac8e81bbfc49489d584c8afc60dae696ce (diff)
Refactor CTPC logic to allow future converters (#16621)
* Refactor CTPC logic to allow future converters * Update builddefs/converters.mk Co-authored-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'platforms/chibios/converters')
-rw-r--r--platforms/chibios/converters/promicro_to_proton_c/_pin_defs.h41
-rw-r--r--platforms/chibios/converters/promicro_to_proton_c/converter.mk8
2 files changed, 49 insertions, 0 deletions
diff --git a/platforms/chibios/converters/promicro_to_proton_c/_pin_defs.h b/platforms/chibios/converters/promicro_to_proton_c/_pin_defs.h
new file mode 100644
index 0000000000..ad1a81692e
--- /dev/null
+++ b/platforms/chibios/converters/promicro_to_proton_c/_pin_defs.h
@@ -0,0 +1,41 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+// Left side (front)
+#define D3 PAL_LINE(GPIOA, 9)
+#define D2 PAL_LINE(GPIOA, 10)
+// GND
+// GND
+#define D1 PAL_LINE(GPIOB, 7)
+#define D0 PAL_LINE(GPIOB, 6)
+#define D4 PAL_LINE(GPIOB, 5)
+#define C6 PAL_LINE(GPIOB, 4)
+#define D7 PAL_LINE(GPIOB, 3)
+#define E6 PAL_LINE(GPIOB, 2)
+#define B4 PAL_LINE(GPIOB, 1)
+#define B5 PAL_LINE(GPIOB, 0)
+
+// Right side (front)
+// RAW
+// GND
+// RESET
+// VCC
+#define F4 PAL_LINE(GPIOA, 2)
+#define F5 PAL_LINE(GPIOA, 1)
+#define F6 PAL_LINE(GPIOA, 0)
+#define F7 PAL_LINE(GPIOB, 8)
+#define B1 PAL_LINE(GPIOB, 13)
+#define B3 PAL_LINE(GPIOB, 14)
+#define B2 PAL_LINE(GPIOB, 15)
+#define B6 PAL_LINE(GPIOB, 9)
+
+// LEDs (only D5/C13 uses an actual LED)
+#ifdef CONVERT_TO_PROTON_C_RXLED
+# define D5 PAL_LINE(GPIOC, 14)
+# define B0 PAL_LINE(GPIOC, 13)
+#else
+# define D5 PAL_LINE(GPIOC, 13)
+# define B0 PAL_LINE(GPIOC, 14)
+#endif
diff --git a/platforms/chibios/converters/promicro_to_proton_c/converter.mk b/platforms/chibios/converters/promicro_to_proton_c/converter.mk
new file mode 100644
index 0000000000..406adae32c
--- /dev/null
+++ b/platforms/chibios/converters/promicro_to_proton_c/converter.mk
@@ -0,0 +1,8 @@
+# Proton C MCU settings for converting AVR projects
+MCU := STM32F303
+BOARD := QMK_PROTON_C
+BOOTLOADER := stm32-dfu
+
+# These are defaults based on what has been implemented for ARM boards
+AUDIO_ENABLE ?= yes
+WS2812_DRIVER ?= bitbang