aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorhonorless <[email protected]>2024-02-10 11:01:24 -0500
committerPete Johanson <[email protected]>2024-02-10 16:15:09 -0800
commitcdcf4ebfb6d53b6230a65a85f060b6343db3b40b (patch)
tree65403d261513430f7c727b38dcc7f6e0166fd49d
parentf72f415c5bd23a89d7e50b1a8e22ede70c0db9e3 (diff)
downloadzmk-cdcf4ebfb6d53b6230a65a85f060b6343db3b40b.tar.gz
zmk-cdcf4ebfb6d53b6230a65a85f060b6343db3b40b.zip
feat(boards): allow use of blackpill_f401cc
-rw-r--r--app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml9
-rw-r--r--app/boards/blackpill_f401cc.conf6
-rw-r--r--app/boards/blackpill_f401cc.overlay50
3 files changed, 65 insertions, 0 deletions
diff --git a/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml b/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
new file mode 100644
index 0000000000..329b7371d5
--- /dev/null
+++ b/app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
@@ -0,0 +1,9 @@
+file_format: "1"
+id: blackpill_f401cc
+name: BlackPill F401CC
+type: board
+arch: arm
+outputs:
+ - usb
+url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
+exposes: [blackpill]
diff --git a/app/boards/blackpill_f401cc.conf b/app/boards/blackpill_f401cc.conf
new file mode 100644
index 0000000000..c4252425b2
--- /dev/null
+++ b/app/boards/blackpill_f401cc.conf
@@ -0,0 +1,6 @@
+CONFIG_CONSOLE=n
+CONFIG_SERIAL=n
+CONFIG_UART_CONSOLE=n
+CONFIG_UART_INTERRUPT_DRIVEN=n
+CONFIG_ZMK_USB=y
+CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
diff --git a/app/boards/blackpill_f401cc.overlay b/app/boards/blackpill_f401cc.overlay
new file mode 100644
index 0000000000..6ed4c3cf84
--- /dev/null
+++ b/app/boards/blackpill_f401cc.overlay
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2024 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+/ {
+ blackpill: connector {
+ compatible = "blackpill";
+ #gpio-cells = <2>;
+ gpio-map-mask = <0xffffffff 0xffffffc0>;
+ gpio-map-pass-thru = <0 0x3f>;
+ gpio-map
+ = <2 0 &gpioc 13 0> /* PC13 */
+ , <3 0 &gpioc 14 0> /* PC14 */
+ , <4 0 &gpioc 15 0> /* PC15 */
+ , <10 0 &gpioa 0 0> /* PA0 */
+ , <11 0 &gpioa 1 0> /* PA1 */
+ , <12 0 &gpioa 2 0> /* PA2 */
+ , <13 0 &gpioa 3 0> /* PA3 */
+ , <14 0 &gpioa 4 0> /* PA4 */
+ , <15 0 &gpioa 5 0> /* PA5 */
+ , <16 0 &gpioa 6 0> /* PA6 */
+ , <17 0 &gpioa 7 0> /* PA7 */
+ , <18 0 &gpiob 0 0> /* PB0 */
+ , <19 0 &gpiob 1 0> /* PB1 */
+ , <20 0 &gpiob 2 0> /* PB2 */
+ , <21 0 &gpiob 10 0> /* PB10 */
+ , <25 0 &gpiob 12 0> /* PB12 */
+ , <26 0 &gpiob 13 0> /* PB13 */
+ , <27 0 &gpiob 14 0> /* PB14 */
+ , <28 0 &gpiob 15 0> /* PB15 */
+ , <29 0 &gpioa 8 0> /* PA8 */
+ , <30 0 &gpioa 9 0> /* PA9 */
+ , <31 0 &gpioa 10 0> /* PA10 */
+ , <38 0 &gpioa 15 0> /* PA15 */
+ , <39 0 &gpiob 3 0> /* PB3 */
+ , <40 0 &gpiob 4 0> /* PB4 */
+ , <41 0 &gpiob 5 0> /* PB5 */
+ , <42 0 &gpiob 6 0> /* PB6 */
+ , <43 0 &gpiob 7 0> /* PB7 */
+ , <45 0 &gpiob 8 0> /* PB8 */
+ , <46 0 &gpiob 9 0> /* PB9 */
+ ;
+ };
+};
+
+blackpill_i2c: &i2c1 {};
+blackpill_spi: &spi1 {};
+blackpill_serial: &usart1 {};