summaryrefslogtreecommitdiff
path: root/keyboards/handwired/onekey
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/onekey')
-rw-r--r--keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c2
-rw-r--r--keyboards/handwired/onekey/keymaps/oled/keymap.c3
-rw-r--r--keyboards/handwired/onekey/keymaps/quine/rules.mk1
-rw-r--r--keyboards/handwired/onekey/readme.md2
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/chconf.h23
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/config.h37
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/halconf.h23
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h29
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/readme.md5
-rw-r--r--keyboards/handwired/onekey/sipeed_longan_nano/rules.mk11
-rw-r--r--keyboards/handwired/onekey/stm32f405_feather/config.h25
-rw-r--r--keyboards/handwired/onekey/stm32f405_feather/readme.md7
-rw-r--r--keyboards/handwired/onekey/stm32f405_feather/rules.mk8
-rw-r--r--keyboards/handwired/onekey/teensy_32/config.h4
-rw-r--r--keyboards/handwired/onekey/teensy_lc/config.h4
15 files changed, 176 insertions, 8 deletions
diff --git a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c
index 956932329c..1287614a8b 100644
--- a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c
+++ b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c
@@ -17,7 +17,7 @@
#include QMK_KEYBOARD_H
void board_init(void) {
- // B9 is configured as I2C1_SDA in the board file; that function must be
+ // B9 is configured as I2C1_SDA_PIN in the board file; that function must be
// disabled before using B7 as I2C1_SDA.
setPinInputHigh(B9);
}
diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c
index c19b6918c0..e020d5e4b6 100644
--- a/keyboards/handwired/onekey/keymaps/oled/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/oled/keymap.c
@@ -361,7 +361,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation;
}
-void oled_task_user(void) {
+bool oled_task_user(void) {
if (update_speed_test) {
// Speed test mode - wait for screen update completion.
if (!oled_dirty) {
@@ -450,6 +450,7 @@ void oled_task_user(void) {
oled_write_P(PSTR("Draw Once"), false);
break;
}
+ return false;
}
void keyboard_post_init_user(void) {
diff --git a/keyboards/handwired/onekey/keymaps/quine/rules.mk b/keyboards/handwired/onekey/keymaps/quine/rules.mk
deleted file mode 100644
index 4c2b0289a2..0000000000
--- a/keyboards/handwired/onekey/keymaps/quine/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-BOOTLOADER = atmel-dfu
diff --git a/keyboards/handwired/onekey/readme.md b/keyboards/handwired/onekey/readme.md
index b630b11748..2973b7d873 100644
--- a/keyboards/handwired/onekey/readme.md
+++ b/keyboards/handwired/onekey/readme.md
@@ -3,7 +3,7 @@
Custom handwired one key keyboard. **See each individual board for pin information.**
* Keyboard Maintainer: QMK Community
-* Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2
+* Hardware Supported: Blackpill F401/F411, Bluepill, Elite-C, Pro Micro, Proton C, Sipeed Longan Nano, STM32F0 Disco, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2
* Hardware Availability: *n/a*
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h
new file mode 100644
index 0000000000..b1eb18de78
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 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/>.
+ */
+
+#pragma once
+
+#define CH_CFG_ST_RESOLUTION 16
+
+#define CH_CFG_ST_FREQUENCY 10000
+
+#include_next <chconf.h>
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/config.h
new file mode 100644
index 0000000000..1825b936d8
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/config.h
@@ -0,0 +1,37 @@
+/* Copyright 2021 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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define MATRIX_COL_PINS \
+ { B0 }
+#define MATRIX_ROW_PINS \
+ { A7 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN A1 /* Green LED. */
+#define BACKLIGHT_PWM_DRIVER PWMD5 /* GD32 numbering scheme starts from 0, TIMER4 on GD32 boards is TIMER5 on STM32 boards. */
+#define BACKLIGHT_PWM_CHANNEL 2 /* GD32 numbering scheme starts from 0, Channel 1 on GD32 boards is Channel 2 on STM32 boards. */
+
+#define RGB_DI_PIN A2
+#define RGB_CI_PIN B13
+
+#define ADC_PIN A0
+
+#define I2C1_CLOCK_SPEED 1000000 /* GD32VF103 supports fast mode plus. */
+#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h
new file mode 100644
index 0000000000..2579c58747
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 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/>.
+ */
+
+#pragma once
+
+#define HAL_USE_PWM TRUE
+#define HAL_USE_ADC TRUE
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h
new file mode 100644
index 0000000000..eba0dd9eeb
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h
@@ -0,0 +1,29 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2021 Stefan Kerkmann
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef GD32_ADC_USE_ADC0
+#define GD32_ADC_USE_ADC0 TRUE
+
+#undef GD32_I2C_USE_I2C0
+#define GD32_I2C_USE_I2C0 TRUE
+
+#undef GD32_PWM_USE_TIM4
+#define GD32_PWM_USE_TIM4 TRUE
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/readme.md b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md
new file mode 100644
index 0000000000..0a3a291576
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md
@@ -0,0 +1,5 @@
+# Sipeed Longan Nano onekey
+
+Supported Hardware: *GD32VF103CB Sipeed Longan Nano*.
+
+To trigger keypress, short together pins *B0* and *A7*. \ No newline at end of file
diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk
new file mode 100644
index 0000000000..aef4fee6b2
--- /dev/null
+++ b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk
@@ -0,0 +1,11 @@
+# MCU name
+MCU = GD32VF103
+BOARD = SIPEED_LONGAN_NANO
+
+# Bootloader selection
+BOOTLOADER = gd32v-dfu
+
+# Build Options
+# change yes to no to disable
+#
+KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/handwired/onekey/stm32f405_feather/config.h b/keyboards/handwired/onekey/stm32f405_feather/config.h
new file mode 100644
index 0000000000..32d7807975
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f405_feather/config.h
@@ -0,0 +1,25 @@
+/* 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 PRODUCT Onekey Adafruit Feather STM32F405
+
+#define MATRIX_COL_PINS { C2 }
+#define MATRIX_ROW_PINS { C3 }
+#define UNUSED_PINS
diff --git a/keyboards/handwired/onekey/stm32f405_feather/readme.md b/keyboards/handwired/onekey/stm32f405_feather/readme.md
new file mode 100644
index 0000000000..49a05725d5
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f405_feather/readme.md
@@ -0,0 +1,7 @@
+# Adafruit Feather STM32F405 Express onekey
+
+* Supported Hardware: [Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382)
+
+To trigger keypress, short together pins *GPIO 12 / PC2* and *GPIO 11 / PC3*.
+
+https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#enabling-dfu-bootloader-mode-3045622-2 \ No newline at end of file
diff --git a/keyboards/handwired/onekey/stm32f405_feather/rules.mk b/keyboards/handwired/onekey/stm32f405_feather/rules.mk
new file mode 100644
index 0000000000..bff7a7e297
--- /dev/null
+++ b/keyboards/handwired/onekey/stm32f405_feather/rules.mk
@@ -0,0 +1,8 @@
+# MCU name
+MCU = STM32F405
+
+# Bootloader selection
+BOOTLOADER = stm32-dfu
+
+# Enter lower-power sleep mode when on the ChibiOS idle thread
+OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h
index 180f324875..e388b01af8 100644
--- a/keyboards/handwired/onekey/teensy_32/config.h
+++ b/keyboards/handwired/onekey/teensy_32/config.h
@@ -26,7 +26,7 @@
#define UNUSED_PINS
// i2c_master defines
-#define I2C1_SCL 0 // A2 on pinout = B0
-#define I2C1_SDA 1 // A3 on pinout = B1
+#define I2C1_SCL_PIN B0 // A2 on pinout = B0
+#define I2C1_SDA_PIN B1 // A3 on pinout = B1
#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h
index ad30f969f5..4e594e7d7e 100644
--- a/keyboards/handwired/onekey/teensy_lc/config.h
+++ b/keyboards/handwired/onekey/teensy_lc/config.h
@@ -26,7 +26,7 @@
#define UNUSED_PINS
// i2c_master defines
-#define I2C1_SCL 0 // A2 on pinout = B0
-#define I2C1_SDA 1 // A3 on pinout = B1
+#define I2C1_SCL_PIN B0 // A2 on pinout = B0
+#define I2C1_SDA_PIN B1 // A3 on pinout = B1
#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2