summaryrefslogtreecommitdiffstats
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2023-07-28 01:19:53 +0200
committerGitHub <noreply@github.com>2023-07-28 09:19:53 +1000
commitfca71f8d3173e2e5d54ff58688b01d4a72df3613 (patch)
tree91fadbb1dd377fd2a4d0e85b1b4820e542ab3d23 /keyboards/handwired
parent96789a7cb01b6ac3b6cf46a8dec650ac19c823c0 (diff)
[Keyboard] Add STM32f3 Discovery onekey (#21625)
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/config.h6
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/halconf.h8
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/info.json19
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/mcuconf.h9
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/readme.md5
-rw-r--r--keyboards/handwired/onekey/stm32f3_disco/rules.mk0
6 files changed, 47 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/stm32f3_disco/config.h b/keyboards/handwired/onekey/stm32f3_disco/config.h
new file mode 100644
index 0000000000..a0e3c54ec1
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/config.h
@@ -0,0 +1,6 @@
+// Copyright 2023 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define ADC_PIN A0
diff --git a/keyboards/handwired/onekey/stm32f3_disco/halconf.h b/keyboards/handwired/onekey/stm32f3_disco/halconf.h
new file mode 100644
index 0000000000..e9d7ece8fc
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/halconf.h
@@ -0,0 +1,8 @@
+// Copyright 2023 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define HAL_USE_ADC TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/stm32f3_disco/info.json b/keyboards/handwired/onekey/stm32f3_disco/info.json
new file mode 100644
index 0000000000..b541cd8ae4
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/info.json
@@ -0,0 +1,19 @@
+{
+ "keyboard_name": "Onekey STM32F3 Discovery",
+ "processor": "STM32F303",
+ "bootloader": "stm32-dfu",
+ "matrix_pins": {
+ "cols": ["B4"],
+ "rows": ["B5"]
+ },
+ "backlight": {
+ "pin": "E8"
+ },
+ "ws2812": {
+ "pin": "A0"
+ },
+ "apa102": {
+ "data_pin": "A0",
+ "clock_pin": "B13"
+ }
+}
diff --git a/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h
new file mode 100644
index 0000000000..9172860b0f
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h
@@ -0,0 +1,9 @@
+// Copyright 2023 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
diff --git a/keyboards/handwired/onekey/stm32f3_disco/readme.md b/keyboards/handwired/onekey/stm32f3_disco/readme.md
new file mode 100644
index 0000000000..ff5c061184
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/readme.md
@@ -0,0 +1,5 @@
+# STM32F303 Discovery kit onekey
+
+* Supported Hardware: [STM32F303 Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html)
+
+To trigger keypress, short together pins *B4* and *B5*.
diff --git a/keyboards/handwired/onekey/stm32f3_disco/rules.mk b/keyboards/handwired/onekey/stm32f3_disco/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f3_disco/rules.mk