Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onekey: migrate some stuff to data driven #18502

Merged
merged 3 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/blackpill_f401/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@

#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
13 changes: 12 additions & 1 deletion keyboards/handwired/onekey/blackpill_f401/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
7 changes: 0 additions & 7 deletions keyboards/handwired/onekey/blackpill_f401/rules.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# MCU name
MCU = STM32F401
BOARD = BLACKPILL_STM32_F401

# Bootloader selection
BOOTLOADER = stm32-dfu

KEYBOARD_SHARED_EP = yes
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/blackpill_f411/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +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 SOLENOID_PIN B12
Expand Down
13 changes: 12 additions & 1 deletion keyboards/handwired/onekey/blackpill_f411/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
7 changes: 0 additions & 7 deletions keyboards/handwired/onekey/blackpill_f411/rules.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# MCU name
MCU = STM32F411
BOARD = BLACKPILL_STM32_F411

# Bootloader selection
BOOTLOADER = stm32-dfu

KEYBOARD_SHARED_EP = yes
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@

#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
15 changes: 14 additions & 1 deletion keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
7 changes: 0 additions & 7 deletions keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
# MCU name
MCU = STM32F411
BOARD = BLACKPILL_STM32_F411

# Bootloader selection
BOOTLOADER = tinyuf2

KEYBOARD_SHARED_EP = yes
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/bluepill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@

#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
13 changes: 12 additions & 1 deletion keyboards/handwired/onekey/bluepill/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/bluepill/rules.mk
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions keyboards/handwired/onekey/bluepill_f103c6/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@

#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

// This code does not fit into the really small flash of STM32F103x6 together
Expand Down
14 changes: 13 additions & 1 deletion keyboards/handwired/onekey/bluepill_f103c6/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
4 changes: 0 additions & 4 deletions keyboards/handwired/onekey/bluepill_f103c6/rules.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 0 additions & 10 deletions keyboards/handwired/onekey/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/elite_c/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion keyboards/handwired/onekey/elite_c/info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
5 changes: 0 additions & 5 deletions keyboards/handwired/onekey/elite_c/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu
8 changes: 0 additions & 8 deletions keyboards/handwired/onekey/evb_wb32f3g71/config.h

This file was deleted.

8 changes: 7 additions & 1 deletion keyboards/handwired/onekey/evb_wb32f3g71/info.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/evb_wb32f3g71/rules.mk
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions keyboards/handwired/onekey/evb_wb32fq95/config.h

This file was deleted.

8 changes: 7 additions & 1 deletion keyboards/handwired/onekey/evb_wb32fq95/info.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/evb_wb32fq95/rules.mk
Original file line number Diff line number Diff line change
@@ -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
15 changes: 14 additions & 1 deletion keyboards/handwired/onekey/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
]
}
}
Expand Down
6 changes: 0 additions & 6 deletions keyboards/handwired/onekey/kb2040/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion keyboards/handwired/onekey/kb2040/info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"keyboard_name": "Onekey KB2040"
"keyboard_name": "Onekey KB2040",
"development_board": "kb2040",
"matrix_pins": {
"cols": ["GP4"],
"rows": ["GP5"]
},
"rgblight": {
"pin": "A1"
}
}
5 changes: 0 additions & 5 deletions keyboards/handwired/onekey/kb2040/rules.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# MCU name
MCU = RP2040
BOOTLOADER = rp2040

OLED_ENABLE = yes
OLED_DRIVER = SSD1306

OPT_DEFS += -DHAL_USE_I2C=TRUE

Loading