Explorar o código

Onekey: migrate some stuff to data driven (#18502)

Ryan %!s(int64=2) %!d(string=hai) anos
pai
achega
45b5ed5c6e
Modificáronse 69 ficheiros con 259 adicións e 335 borrados
  1. 2 6
      keyboards/handwired/onekey/blackpill_f401/config.h
  2. 12 1
      keyboards/handwired/onekey/blackpill_f401/info.json
  3. 0 7
      keyboards/handwired/onekey/blackpill_f401/rules.mk
  4. 2 6
      keyboards/handwired/onekey/blackpill_f411/config.h
  5. 12 1
      keyboards/handwired/onekey/blackpill_f411/info.json
  6. 0 7
      keyboards/handwired/onekey/blackpill_f411/rules.mk
  7. 2 6
      keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
  8. 14 1
      keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json
  9. 0 7
      keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk
  10. 2 6
      keyboards/handwired/onekey/bluepill/config.h
  11. 12 1
      keyboards/handwired/onekey/bluepill/info.json
  12. 0 6
      keyboards/handwired/onekey/bluepill/rules.mk
  13. 2 7
      keyboards/handwired/onekey/bluepill_f103c6/config.h
  14. 13 1
      keyboards/handwired/onekey/bluepill_f103c6/info.json
  15. 0 4
      keyboards/handwired/onekey/bluepill_f103c6/rules.mk
  16. 0 10
      keyboards/handwired/onekey/config.h
  17. 0 6
      keyboards/handwired/onekey/elite_c/config.h
  18. 12 1
      keyboards/handwired/onekey/elite_c/info.json
  19. 0 5
      keyboards/handwired/onekey/elite_c/rules.mk
  20. 0 8
      keyboards/handwired/onekey/evb_wb32f3g71/config.h
  21. 7 1
      keyboards/handwired/onekey/evb_wb32f3g71/info.json
  22. 0 6
      keyboards/handwired/onekey/evb_wb32f3g71/rules.mk
  23. 0 8
      keyboards/handwired/onekey/evb_wb32fq95/config.h
  24. 7 1
      keyboards/handwired/onekey/evb_wb32fq95/info.json
  25. 0 6
      keyboards/handwired/onekey/evb_wb32fq95/rules.mk
  26. 14 1
      keyboards/handwired/onekey/info.json
  27. 0 6
      keyboards/handwired/onekey/kb2040/config.h
  28. 9 1
      keyboards/handwired/onekey/kb2040/info.json
  29. 0 5
      keyboards/handwired/onekey/kb2040/rules.mk
  30. 2 2
      keyboards/handwired/onekey/keymaps/quine/keymap.c
  31. 0 5
      keyboards/handwired/onekey/nucleo_l432kc/config.h
  32. 13 1
      keyboards/handwired/onekey/nucleo_l432kc/info.json
  33. 0 5
      keyboards/handwired/onekey/nucleo_l432kc/rules.mk
  34. 1 1
      keyboards/handwired/onekey/onekey.c
  35. 0 25
      keyboards/handwired/onekey/onekey.h
  36. 0 6
      keyboards/handwired/onekey/promicro/config.h
  37. 12 1
      keyboards/handwired/onekey/promicro/info.json
  38. 0 5
      keyboards/handwired/onekey/promicro/rules.mk
  39. 0 5
      keyboards/handwired/onekey/proton_c/config.h
  40. 12 1
      keyboards/handwired/onekey/proton_c/info.json
  41. 0 6
      keyboards/handwired/onekey/proton_c/rules.mk
  42. 0 6
      keyboards/handwired/onekey/rp2040/config.h
  43. 10 1
      keyboards/handwired/onekey/rp2040/info.json
  44. 0 3
      keyboards/handwired/onekey/rp2040/rules.mk
  45. 0 15
      keyboards/handwired/onekey/rules.mk
  46. 0 7
      keyboards/handwired/onekey/sipeed_longan_nano/config.h
  47. 14 1
      keyboards/handwired/onekey/sipeed_longan_nano/info.json
  48. 0 10
      keyboards/handwired/onekey/sipeed_longan_nano/rules.mk
  49. 2 6
      keyboards/handwired/onekey/stm32f0_disco/config.h
  50. 13 1
      keyboards/handwired/onekey/stm32f0_disco/info.json
  51. 0 6
      keyboards/handwired/onekey/stm32f0_disco/rules.mk
  52. 0 22
      keyboards/handwired/onekey/stm32f405_feather/config.h
  53. 7 1
      keyboards/handwired/onekey/stm32f405_feather/info.json
  54. 0 6
      keyboards/handwired/onekey/stm32f405_feather/rules.mk
  55. 2 7
      keyboards/handwired/onekey/teensy_2/config.h
  56. 13 1
      keyboards/handwired/onekey/teensy_2/info.json
  57. 0 5
      keyboards/handwired/onekey/teensy_2/rules.mk
  58. 2 7
      keyboards/handwired/onekey/teensy_2pp/config.h
  59. 13 1
      keyboards/handwired/onekey/teensy_2pp/info.json
  60. 0 5
      keyboards/handwired/onekey/teensy_2pp/rules.mk
  61. 0 3
      keyboards/handwired/onekey/teensy_32/config.h
  62. 7 1
      keyboards/handwired/onekey/teensy_32/info.json
  63. 0 6
      keyboards/handwired/onekey/teensy_32/rules.mk
  64. 0 3
      keyboards/handwired/onekey/teensy_35/config.h
  65. 7 1
      keyboards/handwired/onekey/teensy_35/info.json
  66. 0 6
      keyboards/handwired/onekey/teensy_35/rules.mk
  67. 0 3
      keyboards/handwired/onekey/teensy_lc/config.h
  68. 7 1
      keyboards/handwired/onekey/teensy_lc/info.json
  69. 0 5
      keyboards/handwired/onekey/teensy_lc/rules.mk

+ 2 - 6
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

+ 12 - 1
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"
+    }
 }

+ 0 - 7
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

+ 2 - 6
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 }

+ 12 - 1
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"
+    }
 }

+ 0 - 7
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

+ 2 - 6
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

+ 14 - 1
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"
+    }
 }

+ 0 - 7
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

+ 2 - 6
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

+ 12 - 1
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"
+    }
 }

+ 0 - 6
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

+ 2 - 7
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

+ 13 - 1
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"
+    }
 }

+ 0 - 4
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

+ 0 - 10
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
 

+ 0 - 6
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

+ 12 - 1
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"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/elite_c/rules.mk

@@ -1,5 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = atmel-dfu

+ 0 - 8
keyboards/handwired/onekey/evb_wb32f3g71/config.h

@@ -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 }

+ 7 - 1
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"]
+    }
 }

+ 0 - 6
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

+ 0 - 8
keyboards/handwired/onekey/evb_wb32fq95/config.h

@@ -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 }

+ 7 - 1
keyboards/handwired/onekey/evb_wb32fq95/info.json

@@ -1,3 +1,9 @@
 {
-    "keyboard_name": "Onekey WB32FQ95 Eval"
+    "keyboard_name": "Onekey WB32FQ95 Eval",
+    "processor": "WB32FQ95",
+    "bootloader": "wb32-dfu",
+    "matrix_pins": {
+        "cols": ["B12"],
+        "rows": ["B13"]
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/evb_wb32fq95/rules.mk

@@ -1,9 +1,3 @@
-# MCU name
-MCU = WB32FQ95
-
-# 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

+ 14 - 1
keyboards/handwired/onekey/info.json

@@ -7,10 +7,23 @@
         "pid": "0x6465",
         "device_version": "0.0.1"
     },
+    "diode_direction": "COL2ROW",
+    "features": {
+        "bootmagic": false,
+        "mousekey": true,
+        "extrakey": true,
+        "console": true,
+        "command": false,
+        "nkro": true,
+        "backlight": false,
+        "rgblight": false,
+        "audio": false
+    },
+    "community_layouts": ["ortho_1x1"],
     "layouts": {
         "LAYOUT_ortho_1x1": {
             "layout": [
-                {"x": 0, "y": 0}
+                {"x": 0, "y": 0, "matrix": [0, 0]}
             ]
         }
     }

+ 0 - 6
keyboards/handwired/onekey/kb2040/config.h

@@ -5,10 +5,6 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS \
-    { GP4 }
-#define MATRIX_ROW_PINS \
-    { GP5 }
 #define DEBUG_MATRIX_SCAN_RATE
 
 #define QMK_WAITING_TEST_BUSY_PIN GP8
@@ -18,8 +14,6 @@
 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
 
-#define RGB_DI_PIN A1
-
 // settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port
 #define OLED_DISPLAY_128X32
 #define I2C_DRIVER I2CD1

+ 9 - 1
keyboards/handwired/onekey/kb2040/info.json

@@ -1,3 +1,11 @@
 {
-    "keyboard_name": "Onekey KB2040"
+    "keyboard_name": "Onekey KB2040",
+    "development_board": "kb2040",
+    "matrix_pins": {
+        "cols": ["GP4"],
+        "rows": ["GP5"]
+    },
+    "rgblight": {
+        "pin": "A1"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/kb2040/rules.mk

@@ -1,9 +1,4 @@
-# MCU name
-MCU = RP2040
-BOOTLOADER = rp2040
-
 OLED_ENABLE = yes
 OLED_DRIVER = SSD1306
 
 OPT_DEFS += -DHAL_USE_I2C=TRUE
-

+ 2 - 2
keyboards/handwired/onekey/keymaps/quine/keymap.c

@@ -1,7 +1,7 @@
-#include <handwired/onekey/onekey.h>
+#include <quantum.h>
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_1x1(KC_A) };
 const char *buf[30] = {
-"#include <handwired/onekey/onekey.h>",
+"#include <quantum.h>",
 "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_1x1(KC_A) };",
 "const char *buf[30] = {",
 "",

+ 0 - 5
keyboards/handwired/onekey/nucleo_l432kc/config.h

@@ -4,15 +4,10 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { A2 }
-#define MATRIX_ROW_PINS { A1 }
-
-#define BACKLIGHT_PIN         B8
 #define BACKLIGHT_PWM_DRIVER  PWMD4
 #define BACKLIGHT_PWM_CHANNEL 3
 #define BACKLIGHT_PAL_MODE    2
 
-#define RGB_DI_PIN A0
 #define RGB_CI_PIN B13
 
 #define ADC_PIN A0

+ 13 - 1
keyboards/handwired/onekey/nucleo_l432kc/info.json

@@ -1,3 +1,15 @@
 {
-    "keyboard_name": "Onekey Nucleo L432KC"
+    "keyboard_name": "Onekey Nucleo L432KC",
+    "processor": "STM32L432",
+    "bootloader": "stm32-dfu",
+    "matrix_pins": {
+        "cols": ["A2"],
+        "rows": ["A1"]
+    },
+    "backlight": {
+        "pin": "B8"
+    },
+    "rgblight": {
+        "pin": "A0"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/nucleo_l432kc/rules.mk

@@ -1,5 +0,0 @@
-# MCU name
-MCU = STM32L432
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu

+ 1 - 1
keyboards/handwired/onekey/onekey.c

@@ -1,7 +1,7 @@
 // Copyright 2022 QMK
 // SPDX-License-Identifier: GPL-2.0-or-later
 
-#include "onekey.h"
+#include "quantum.h"
 
 void keyboard_post_init_kb(void) {
     debug_enable   = true;

+ 0 - 25
keyboards/handwired/onekey/onekey.h

@@ -1,25 +0,0 @@
-/* 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 "quantum.h"
-
-#define LAYOUT_ortho_1x1( \
-    k00 \
-) { \
-    { k00 } \
-}

+ 0 - 6
keyboards/handwired/onekey/promicro/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

+ 12 - 1
keyboards/handwired/onekey/promicro/info.json

@@ -1,3 +1,14 @@
 {
-    "keyboard_name": "Onekey Pro Micro"
+    "keyboard_name": "Onekey Pro Micro",
+    "development_board": "promicro",
+    "matrix_pins": {
+        "cols": ["F4"],
+        "rows": ["F5"]
+    },
+    "backlight": {
+        "pin": "B6"
+    },
+    "rgblight": {
+        "pin": "F6"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/promicro/rules.mk

@@ -1,5 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = caterina

+ 0 - 5
keyboards/handwired/onekey/proton_c/config.h

@@ -18,15 +18,10 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { A2 }
-#define MATRIX_ROW_PINS { A1 }
-
-#define BACKLIGHT_PIN         B8
 #define BACKLIGHT_PWM_DRIVER  PWMD4
 #define BACKLIGHT_PWM_CHANNEL 3
 #define BACKLIGHT_PAL_MODE    2
 
-#define RGB_DI_PIN A0
 #define RGB_CI_PIN B13
 
 #define ADC_PIN A0

+ 12 - 1
keyboards/handwired/onekey/proton_c/info.json

@@ -1,3 +1,14 @@
 {
-    "keyboard_name": "Onekey Proton-C"
+    "keyboard_name": "Onekey Proton-C",
+    "development_board": "proton_c",
+    "matrix_pins": {
+        "cols": ["A2"],
+        "rows": ["A1"]
+    },
+    "backlight": {
+        "pin": "B8"
+    },
+    "rgblight": {
+        "pin": "A0"
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/proton_c/rules.mk

@@ -1,6 +0,0 @@
-# MCU name
-MCU = STM32F303
-BOARD = QMK_PROTON_C
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu

+ 0 - 6
keyboards/handwired/onekey/rp2040/config.h

@@ -5,10 +5,6 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS \
-    { GP4 }
-#define MATRIX_ROW_PINS \
-    { GP5 }
 #define DEBUG_MATRIX_SCAN_RATE
 
 #define QMK_WAITING_TEST_BUSY_PIN GP8
@@ -17,5 +13,3 @@
 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
-
-#define RGB_DI_PIN A1

+ 10 - 1
keyboards/handwired/onekey/rp2040/info.json

@@ -1,3 +1,12 @@
 {
-    "keyboard_name": "Onekey RP2040"
+    "keyboard_name": "Onekey RP2040",
+    "processor": "RP2040",
+    "bootloader": "rp2040",
+    "matrix_pins": {
+        "cols": ["GP4"],
+        "rows": ["GP5"]
+    },
+    "rgblight": {
+        "pin": "A1"
+    }
 }

+ 0 - 3
keyboards/handwired/onekey/rp2040/rules.mk

@@ -1,3 +0,0 @@
-# MCU name
-MCU = RP2040
-BOOTLOADER = rp2040

+ 0 - 15
keyboards/handwired/onekey/rules.mk

@@ -1,16 +1 @@
-# Build Options
-#   change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no       # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes       # Mouse keys
-EXTRAKEY_ENABLE = yes       # Audio control and System control
-CONSOLE_ENABLE = yes        # Console for debug
-COMMAND_ENABLE = no         # Commands for debug and configuration
-NKRO_ENABLE = yes           # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
-AUDIO_ENABLE = no           # Audio output
-
 DEFAULT_FOLDER = handwired/onekey/promicro
-
-LAYOUTS = ortho_1x1

+ 0 - 7
keyboards/handwired/onekey/sipeed_longan_nano/config.h

@@ -18,16 +18,9 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS \
-    { B0 }
-#define MATRIX_ROW_PINS \
-    { A7 }
-
-#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

+ 14 - 1
keyboards/handwired/onekey/sipeed_longan_nano/info.json

@@ -1,3 +1,16 @@
 {
-    "keyboard_name": "Onekey Sipeed Longan Nano"
+    "keyboard_name": "Onekey Sipeed Longan Nano",
+    "processor": "GD32VF103",
+    "bootloader": "gd32v-dfu",
+    "board": "SIPEED_LONGAN_NANO",
+    "matrix_pins": {
+        "cols": ["B0"],
+        "rows": ["A7"]
+    },
+    "backlight": {
+        "pin": "A1"
+    },
+    "rgblight": {
+        "pin": "A2"
+    }
 }

+ 0 - 10
keyboards/handwired/onekey/sipeed_longan_nano/rules.mk

@@ -1,11 +1 @@
-# 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

+ 2 - 6
keyboards/handwired/onekey/stm32f0_disco/config.h

@@ -18,14 +18,10 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { B4 }
-#define MATRIX_ROW_PINS { B5 }
-
-#define BACKLIGHT_PIN         C8
 #define BACKLIGHT_PWM_DRIVER  PWMD3
 #define BACKLIGHT_PWM_CHANNEL 3
 #define BACKLIGHT_PAL_MODE    0
 
-#define RGB_DI_PIN B15
-
 #define ADC_PIN A0
+
+#define RGB_CI_PIN B13

+ 13 - 1
keyboards/handwired/onekey/stm32f0_disco/info.json

@@ -1,3 +1,15 @@
 {
-    "keyboard_name": "Onekey STM32F072 Discovery"
+    "keyboard_name": "Onekey STM32F072 Discovery",
+    "processor": "STM32F072",
+    "bootloader": "stm32-dfu",
+    "matrix_pins": {
+        "cols": ["B4"],
+        "rows": ["B5"]
+    },
+    "backlight": {
+        "pin": "C8"
+    },
+    "rgblight": {
+        "pin": "B15"
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/stm32f0_disco/rules.mk

@@ -1,8 +1,2 @@
-# MCU name
-MCU = STM32F072
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu
-
 # Enter lower-power sleep mode when on the ChibiOS idle thread
 OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

+ 0 - 22
keyboards/handwired/onekey/stm32f405_feather/config.h

@@ -1,22 +0,0 @@
-/* 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 MATRIX_COL_PINS { C2 }
-#define MATRIX_ROW_PINS { C3 }

+ 7 - 1
keyboards/handwired/onekey/stm32f405_feather/info.json

@@ -1,3 +1,9 @@
 {
-    "keyboard_name": "Onekey Adafruit Feather STM32F405"
+    "keyboard_name": "Onekey Adafruit Feather STM32F405",
+    "processor": "STM32F405",
+    "bootloader": "stm32-dfu",
+    "matrix_pins": {
+        "cols": ["C2"],
+        "rows": ["C3"],
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/stm32f405_feather/rules.mk

@@ -1,8 +1,2 @@
-# 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

+ 2 - 7
keyboards/handwired/onekey/teensy_2/config.h

@@ -18,14 +18,9 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { F4 }
-#define MATRIX_ROW_PINS { F5 }
-
-#define BACKLIGHT_PIN B6
-
-#define RGB_DI_PIN F6
-
 #define ADC_PIN F6
 
+#define RGB_CI_PIN F7
+
 #define QMK_WAITING_TEST_BUSY_PIN F6
 #define QMK_WAITING_TEST_YIELD_PIN F7

+ 13 - 1
keyboards/handwired/onekey/teensy_2/info.json

@@ -1,3 +1,15 @@
 {
-    "keyboard_name": "Onekey Teensy 2.0"
+    "keyboard_name": "Onekey Teensy 2.0",
+    "processor": "atmega32u4",
+    "bootloader": "halfkay",
+    "matrix_pins": {
+        "cols": ["F4"],
+        "rows": ["F5"]
+    },
+    "backlight": {
+        "pin": "B6"
+    },
+    "rgblight": {
+        "pin": "F6"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/teensy_2/rules.mk

@@ -1,5 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = halfkay

+ 2 - 7
keyboards/handwired/onekey/teensy_2pp/config.h

@@ -18,14 +18,9 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { F4 }
-#define MATRIX_ROW_PINS { F5 }
-
-#define BACKLIGHT_PIN B6
-
-#define RGB_DI_PIN F6
-
 #define ADC_PIN F6
 
+#define RGB_CI_PIN F7
+
 #define QMK_WAITING_TEST_BUSY_PIN F6
 #define QMK_WAITING_TEST_YIELD_PIN F7

+ 13 - 1
keyboards/handwired/onekey/teensy_2pp/info.json

@@ -1,3 +1,15 @@
 {
-    "keyboard_name": "Onekey Teensy 2.0++"
+    "keyboard_name": "Onekey Teensy 2.0++",
+    "processor": "at90usb1286",
+    "bootloader": "halfkay",
+    "matrix_pins": {
+        "cols": ["F4"],
+        "rows": ["F5"]
+    },
+    "backlight": {
+        "pin": "B6"
+    },
+    "rgblight": {
+        "pin": "F6"
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/teensy_2pp/rules.mk

@@ -1,5 +0,0 @@
-# MCU name
-MCU = at90usb1286
-
-# Bootloader selection
-BOOTLOADER = halfkay

+ 0 - 3
keyboards/handwired/onekey/teensy_32/config.h

@@ -19,9 +19,6 @@
 // TODO: including this causes "error: expected identifier before '(' token" errors
 //#include "config_common.h"
 
-#define MATRIX_COL_PINS { D5 }
-#define MATRIX_ROW_PINS { B2 }
-
 // i2c_master defines
 #define I2C1_SCL_PIN B0 // A2 on pinout = B0
 #define I2C1_SDA_PIN B1 // A3 on pinout = B1

+ 7 - 1
keyboards/handwired/onekey/teensy_32/info.json

@@ -1,3 +1,9 @@
 {
-    "keyboard_name": "Onekey Teensy 3.2"
+    "keyboard_name": "Onekey Teensy 3.2",
+    "processor": "MK20DX256",
+    "bootloader": "halfkay",
+    "matrix_pins": {
+        "cols": ["D5"],
+        "rows": ["B2"]
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/teensy_32/rules.mk

@@ -1,8 +1,2 @@
-# MCU name
-MCU = MK20DX256
-
-# Bootloader selection
-BOOTLOADER = halfkay
-
 # Enter lower-power sleep mode when on the ChibiOS idle thread
 OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

+ 0 - 3
keyboards/handwired/onekey/teensy_35/config.h

@@ -19,9 +19,6 @@
 // TODO: including this causes "error: expected identifier before '(' token" errors
 //#include "config_common.h"
 
-#define MATRIX_COL_PINS { D5 } // 20/A6
-#define MATRIX_ROW_PINS { B2 } // 19/A5
-
 // i2c_master defines
 #define I2C1_SCL_PIN B0 // 16/A2 on pinout
 #define I2C1_SDA_PIN B1 // 17/A3 on pinout

+ 7 - 1
keyboards/handwired/onekey/teensy_35/info.json

@@ -1,3 +1,9 @@
 {
-    "keyboard_name": "Onekey Teensy 3.5"
+    "keyboard_name": "Onekey Teensy 3.5",
+    "processor": "MK64FX512",
+    "bootloader": "halfkay",
+    "matrix_pins": {
+        "cols": ["D5"], // 20/A6
+        "rows": ["B2"]  // 19/A5
+    }
 }

+ 0 - 6
keyboards/handwired/onekey/teensy_35/rules.mk

@@ -1,8 +1,2 @@
-# MCU name
-MCU = MK64FX512
-
-# Bootloader selection
-BOOTLOADER = halfkay
-
 # Enter lower-power sleep mode when on the ChibiOS idle thread
 OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

+ 0 - 3
keyboards/handwired/onekey/teensy_lc/config.h

@@ -19,9 +19,6 @@
 // TODO: including this causes "error: expected identifier before '(' token" errors
 //#include "config_common.h"
 
-#define MATRIX_COL_PINS { D5 }
-#define MATRIX_ROW_PINS { B2 }
-
 // i2c_master defines
 #define I2C1_SCL_PIN B0 // A2 on pinout = B0
 #define I2C1_SDA_PIN B1 // A3 on pinout = B1

+ 7 - 1
keyboards/handwired/onekey/teensy_lc/info.json

@@ -1,3 +1,9 @@
 {
-    "keyboard_name": "Onekey Teensy LC"
+    "keyboard_name": "Onekey Teensy LC",
+    "processor": "MKL26Z64",
+    "bootloader": "halfkay",
+    "matrix_pins": {
+        "cols": ["D5"],
+        "rows": ["B2"]
+    }
 }

+ 0 - 5
keyboards/handwired/onekey/teensy_lc/rules.mk

@@ -1,9 +1,4 @@
-# MCU name
-MCU = MKL26Z64
 USE_CHIBIOS_CONTRIB = yes
 
-# Bootloader selection
-BOOTLOADER = halfkay
-
 # Enter lower-power sleep mode when on the ChibiOS idle thread
 OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE