summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/config.h26
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/halconf.h28
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/info.json15
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h33
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/readme.md7
-rw-r--r--keyboards/handwired/onekey/bluepill_uf2boot/rules.mk2
6 files changed, 111 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/config.h b/keyboards/handwired/onekey/bluepill_uf2boot/config.h
new file mode 100644
index 0000000000..79fa79595a
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define BACKLIGHT_PWM_DRIVER PWMD2
+#define BACKLIGHT_PWM_CHANNEL 1
+
+#define ADC_PIN A0
+
+#define RGB_CI_PIN A2
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/halconf.h b/keyboards/handwired/onekey/bluepill_uf2boot/halconf.h
new file mode 100644
index 0000000000..dbc3e82a79
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/halconf.h
@@ -0,0 +1,28 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/halconf.h -r platforms/chibios/common/configs/halconf.h`
+ */
+
+#pragma once
+
+#define HAL_USE_ADC TRUE
+
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/info.json b/keyboards/handwired/onekey/bluepill_uf2boot/info.json
new file mode 100644
index 0000000000..1f823ea0d7
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "Onekey Bluepill STM32F103 uf2boot",
+ "development_board": "bluepill",
+ "bootloader": "uf2boot",
+ "matrix_pins": {
+ "cols": ["B0"],
+ "rows": ["A7"]
+ },
+ "backlight": {
+ "pin": "A0"
+ },
+ "rgblight": {
+ "pin": "A1"
+ }
+}
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h b/keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h
new file mode 100644
index 0000000000..39834c135b
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h
@@ -0,0 +1,33 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
+#undef STM32_PWM_USE_TIM2
+#define STM32_PWM_USE_TIM2 TRUE
+
+#undef STM32_SPI_USE_SPI2
+#define STM32_SPI_USE_SPI2 FALSE
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/readme.md b/keyboards/handwired/onekey/bluepill_uf2boot/readme.md
new file mode 100644
index 0000000000..7886ed1888
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/readme.md
@@ -0,0 +1,7 @@
+# Bluepill onekey
+
+To trigger keypress, short together pins *B0* and *A7*.
+
+This variant requires the uf2-stm32f103 bootloader to be installed. This can be downloaded from the [uf2-stm32f103 releases page](https://github.com/mmoskal/uf2-stm32f103/releases).
+
+Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk. \ No newline at end of file
diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/rules.mk b/keyboards/handwired/onekey/bluepill_uf2boot/rules.mk
new file mode 100644
index 0000000000..a92b099328
--- /dev/null
+++ b/keyboards/handwired/onekey/bluepill_uf2boot/rules.mk
@@ -0,0 +1,2 @@
+# Enter lower-power sleep mode when on the ChibiOS idle thread
+OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE