diff options
author | Ryan <fauxpark@gmail.com> | 2022-09-30 04:23:11 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 04:23:11 +1000 |
commit | 45b5ed5c6e1ecdf95e9ce0523a8ff49d45b8822f (patch) | |
tree | 081caca5fb2e86ba1af0550a35e6743235cb6922 /keyboards/handwired | |
parent | bad8c6718901603b8a64d371b003ae4ab6a24044 (diff) |
Onekey: migrate some stuff to data driven (#18502)
Diffstat (limited to 'keyboards/handwired')
69 files changed, 259 insertions, 335 deletions
diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h index 2554e2207c..4e9552480f 100644 --- a/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/keyboards/handwired/onekey/blackpill_f401/config.h @@ -18,13 +18,9 @@ #include "config_common.h" -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { A7 } - -#define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 -#define RGB_DI_PIN A1 - #define ADC_PIN A0 + +#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/blackpill_f401/info.json b/keyboards/handwired/onekey/blackpill_f401/info.json index 50afb4b9b0..b79b17b000 100644 --- a/keyboards/handwired/onekey/blackpill_f401/info.json +++ b/keyboards/handwired/onekey/blackpill_f401/info.json @@ -1,3 +1,14 @@ { - "keyboard_name": "Onekey Blackpill STM32F401" + "keyboard_name": "Onekey Blackpill STM32F401", + "development_board": "blackpill_f401", + "matrix_pins": { + "cols": ["B0"], + "rows": ["A7"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } } diff --git a/keyboards/handwired/onekey/blackpill_f401/rules.mk b/keyboards/handwired/onekey/blackpill_f401/rules.mk index 1fec226e9b..1071cf62ee 100644 --- a/keyboards/handwired/onekey/blackpill_f401/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f401/rules.mk @@ -1,8 +1 @@ -# MCU name -MCU = STM32F401 -BOARD = BLACKPILL_STM32_F401 - -# Bootloader selection -BOOTLOADER = stm32-dfu - KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h index 9e9737fbf5..b97df0c666 100644 --- a/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/keyboards/handwired/onekey/blackpill_f411/config.h @@ -18,17 +18,13 @@ #include "config_common.h" -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { A7 } - -#define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 -#define RGB_DI_PIN A1 - #define ADC_PIN A0 +#define RGB_CI_PIN A2 + #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } #define SOLENOID_PINS_ACTIVE_STATE { high, high, low } diff --git a/keyboards/handwired/onekey/blackpill_f411/info.json b/keyboards/handwired/onekey/blackpill_f411/info.json index 0b2c14d5b9..19c6cbfed9 100644 --- a/keyboards/handwired/onekey/blackpill_f411/info.json +++ b/keyboards/handwired/onekey/blackpill_f411/info.json @@ -1,3 +1,14 @@ { - "keyboard_name": "Onekey Blackpill STM32F411" + "keyboard_name": "Onekey Blackpill STM32F411", + "development_board": "blackpill_f411", + "matrix_pins": { + "cols": ["B0"], + "rows": ["A7"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } } diff --git a/keyboards/handwired/onekey/blackpill_f411/rules.mk b/keyboards/handwired/onekey/blackpill_f411/rules.mk index cd1657335d..1071cf62ee 100644 --- a/keyboards/handwired/onekey/blackpill_f411/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f411/rules.mk @@ -1,8 +1 @@ -# MCU name -MCU = STM32F411 -BOARD = BLACKPILL_STM32_F411 - -# Bootloader selection -BOOTLOADER = stm32-dfu - KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h index f4b589c6d2..c8800fa163 100755 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h @@ -18,13 +18,9 @@ #include "config_common.h" -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { A7 } - -#define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 -#define RGB_DI_PIN A1 - #define ADC_PIN A0 + +#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json index 59cdec59f7..3acccb7148 100644 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json @@ -1,3 +1,16 @@ { - "keyboard_name": "Onekey Blackpill STM32F411 TinyUF2" + "keyboard_name": "Onekey Blackpill STM32F411 TinyUF2", + "processor": "STM32F411", + "bootloader": "tinyuf2", + "board": "BLACKPILL_STM32_F411", + "matrix_pins": { + "cols": ["B0"], + "rows": ["A7"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } } diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk index 2c38e9b580..1071cf62ee 100755 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk @@ -1,8 +1 @@ -# MCU name -MCU = STM32F411 -BOARD = BLACKPILL_STM32_F411 - -# Bootloader selection -BOOTLOADER = tinyuf2 - KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 0f85ad91c7..79fa79595a 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -18,13 +18,9 @@ #include "config_common.h" -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { A7 } - -#define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD2 #define BACKLIGHT_PWM_CHANNEL 1 -#define RGB_DI_PIN A1 - #define ADC_PIN A0 + +#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/bluepill/info.json b/keyboards/handwired/onekey/bluepill/info.json index 2126c62b05..7bef2db170 100644 --- a/keyboards/handwired/onekey/bluepill/info.json +++ b/keyboards/handwired/onekey/bluepill/info.json @@ -1,3 +1,14 @@ { - "keyboard_name": "Onekey Bluepill STM32F103" + "keyboard_name": "Onekey Bluepill STM32F103", + "development_board": "bluepill", + "matrix_pins": { + "cols": ["B0"], + "rows": ["A7"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } } diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 019b1130d9..a92b099328 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,8 +1,2 @@ -# MCU name -MCU = STM32F103 - -# Bootloader selection -BOOTLOADER = stm32duino - # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/bluepill_f103c6/config.h b/keyboards/handwired/onekey/bluepill_f103c6/config.h index 903277bd3b..8b62ed86f2 100644 --- a/keyboards/handwired/onekey/bluepill_f103c6/config.h +++ b/keyboards/handwired/onekey/bluepill_f103c6/config.h @@ -18,18 +18,13 @@ #include "config_common.h" -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { A7 } -#define UNUSED_PINS - -#define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD2 #define BACKLIGHT_PWM_CHANNEL 1 -#define RGB_DI_PIN A1 - #define ADC_PIN A0 +#define RGB_CI_PIN A2 + // This code does not fit into the really small flash of STM32F103x6 together // with CONSOLE_ENABLE=yes, and the debugging console is probably more // important for the "okeney" testing firmware. In a real firmware you may be diff --git a/keyboards/handwired/onekey/bluepill_f103c6/info.json b/keyboards/handwired/onekey/bluepill_f103c6/info.json index 0ef180f6ec..353f074d92 100644 --- a/keyboards/handwired/onekey/bluepill_f103c6/info.json +++ b/keyboards/handwired/onekey/bluepill_f103c6/info.json @@ -1,3 +1,15 @@ { - "keyboard_name": "Onekey Bluepill STM32F103C6" + "keyboard_name": "Onekey Bluepill STM32F103C6", + "processor": "STM32F103", + "board": "STM32_F103_STM32DUINO", + "matrix_pins": { + "cols": ["B0"], + "rows": ["A7"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } } diff --git a/keyboards/handwired/onekey/bluepill_f103c6/rules.mk b/keyboards/handwired/onekey/bluepill_f103c6/rules.mk index f2280a1a59..c76a8ebe6e 100644 --- a/keyboards/handwired/onekey/bluepill_f103c6/rules.mk +++ b/keyboards/handwired/onekey/bluepill_f103c6/rules.mk @@ -1,12 +1,8 @@ -# MCU name -MCU = STM32F103 - # Bootloader selection # Cannot use `BOOTLOADER = stm32duino` due to the need to override # `MCU_LDSCRIPT`, therefore all parameters need to be specified here manually. OPT_DEFS += -DBOOTLOADER_STM32DUINO MCU_LDSCRIPT = STM32F103x6_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO BOOTLOADER_TYPE = stm32duino DFU_ARGS = -d 1EAF:0003 -a 2 -R DFU_SUFFIX_ARGS = -v 1EAF -p 0003 diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index f1ce6d9491..9fcd881321 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -17,16 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 1 - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/onekey/elite_c/config.h b/keyboards/handwired/onekey/elite_c/config.h index 83eded68de..473cfdfbda 100644 --- a/keyboards/handwired/onekey/elite_c/config.h +++ b/keyboards/handwired/onekey/elite_c/config.h @@ -18,12 +18,6 @@ #include "config_common.h" -#define MATRIX_COL_PINS { F4 } -#define MATRIX_ROW_PINS { F5 } - -#define BACKLIGHT_PIN B6 - -#define RGB_DI_PIN F6 #define RGB_CI_PIN B1 #define ADC_PIN F6 diff --git a/keyboards/handwired/onekey/elite_c/info.json b/keyboards/handwired/onekey/elite_c/info.json index d86f8b4395..1548561041 100644 --- a/keyboards/handwired/onekey/elite_c/info.json +++ b/keyboards/handwired/onekey/elite_c/info.json @@ -1,3 +1,14 @@ { - "keyboard_name": "Onekey Elite-C" + "keyboard_name": "Onekey Elite-C", + "development_board": "elite_c", + "matrix_pins": { + "cols": ["F4"], + "rows": ["F5"] + }, + "backlight": { + "pin": "B6" + }, + "rgblight": { + "pin": "F6" + } } diff --git a/keyboards/handwired/onekey/elite_c/rules.mk b/keyboards/handwired/onekey/elite_c/rules.mk index e8326bcf09..e69de29bb2 100644 --- a/keyboards/handwired/onekey/elite_c/rules.mk +++ b/keyboards/handwired/onekey/elite_c/rules.mk @@ -1,5 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/config.h b/keyboards/handwired/onekey/evb_wb32f3g71/config.h deleted file mode 100644 index 722aa59821..0000000000 --- a/keyboards/handwired/onekey/evb_wb32f3g71/config.h +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2021 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -#include "config_common.h" - -#define MATRIX_COL_PINS { B12 } -#define MATRIX_ROW_PINS { B13 } diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/info.json b/keyboards/handwired/onekey/evb_wb32f3g71/info.json index c4d9d317e5..6287cdc34a 100644 --- a/keyboards/handwired/onekey/evb_wb32f3g71/info.json +++ b/keyboards/handwired/onekey/evb_wb32f3g71/info.json @@ -1,3 +1,9 @@ { - "keyboard_name": "Onekey WB32F3G71 Eval" + "keyboard_name": "Onekey WB32F3G71 Eval", + "processor": "WB32F3G71", + "bootloader": "wb32-dfu", + "matrix_pins": { + "cols": ["B12"], + "rows": ["B13"] + } } diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk b/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk index 9f64c6683f..033dd66aa4 100644 --- a/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk +++ b/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = WB32F3G71 - -# Bootloader selection -BOOTLOADER = wb32-dfu - MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control NKRO_ENABLE = no # Enable N-Key Rollover diff --git a/keyboards/handwired/onekey/evb_wb32fq95/config.h b/keyboards/handwired/onekey/evb_wb32fq95/config.h deleted file mode 100644 index 722aa59821..0000000000 --- a/keyboards/handwired/onekey/evb_wb32fq95/config.h +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2021 Nick Brassel (@tzarc) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -#include "config_common.h" - -#define MATRIX_COL_PINS { B12 } -#define MATRIX_ROW_PINS { B13 } diff --git a/keyboards/handwired/onekey/evb_wb32fq95/info.json b/keyboards/handwired/onekey/evb_wb32fq95/info.json index ccc65b2e70..3fc1c88657 100644 --- a/keyboards/handwired/onekey/evb_wb32fq95/info.json +++ b/keyboards/handwired/onekey/evb_wb3 |