From 0d413a5a1f3e54156c09e937f0fa10225cd3e5ba Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Fri, 21 Oct 2022 15:14:31 +0700 Subject: [PATCH] Update and move some line to info.json --- keyboards/handwired/onekey/stm32_mini_v2/config.h | 10 +--------- .../handwired/onekey/stm32_mini_v2/halconf.h | 4 ++-- .../handwired/onekey/stm32_mini_v2/info.json | 15 +++++++++++++++ .../handwired/onekey/stm32_mini_v2/mcuconf.h | 4 ++-- keyboards/handwired/onekey/stm32_mini_v2/rules.mk | 4 ---- 5 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 keyboards/handwired/onekey/stm32_mini_v2/info.json diff --git a/keyboards/handwired/onekey/stm32_mini_v2/config.h b/keyboards/handwired/onekey/stm32_mini_v2/config.h index a29f549cf84..c8aeee439d9 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/config.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/config.h @@ -18,13 +18,6 @@ #include "config_common.h" -#define PRODUCT Onekey STM32 Mini v2 STM32F103RC - -/* Key matrix pins */ -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { B1 } -#define UNUSED_PINS - // SPI configuration #define SPI_DRIVER SPID1 #define SPI_SCK_PIN A5 @@ -48,12 +41,11 @@ #ifdef BACKLIGHT_ENABLE /* Backlight config */ - #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD2 #define BACKLIGHT_PWM_CHANNEL 1 #endif #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ - #define RGB_DI_PIN A1 + #define RGB_CI_PIN A2 #endif diff --git a/keyboards/handwired/onekey/stm32_mini_v2/halconf.h b/keyboards/handwired/onekey/stm32_mini_v2/halconf.h index 70adcdf5211..605435b6b6a 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/halconf.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2020 QMK +/* Copyright 2022 HorrorTroll * * 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 @@ -16,7 +16,7 @@ /* * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/halconf.h -r platforms/chibios/common/configs/halconf.h` + * `qmk chibios-confmigrate -i keyboards/handwired/onekey/stm32_mini_v2/halconf.h -r platforms/chibios/common/configs/halconf.h` */ #pragma once diff --git a/keyboards/handwired/onekey/stm32_mini_v2/info.json b/keyboards/handwired/onekey/stm32_mini_v2/info.json new file mode 100644 index 00000000000..825c812c054 --- /dev/null +++ b/keyboards/handwired/onekey/stm32_mini_v2/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Onekey STM32 Mini v2 STM32F103RC", + "processor": "STM32F103", + "board": "STM32_F103_STM32DUINO", + "matrix_pins": { + "cols": ["B0"], + "rows": ["B1"] + }, + "backlight": { + "pin": "A0" + }, + "rgblight": { + "pin": "A1" + } +} diff --git a/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h b/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h index cf2528c5608..f1225afdc22 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h @@ -1,4 +1,4 @@ -/* Copyright 2020 QMK +/* Copyright 2022 HorrorTroll * * 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 @@ -16,7 +16,7 @@ /* * 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` + * `qmk chibios-confmigrate -i keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h` */ #pragma once diff --git a/keyboards/handwired/onekey/stm32_mini_v2/rules.mk b/keyboards/handwired/onekey/stm32_mini_v2/rules.mk index 28588c53776..af4b3e520c6 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/rules.mk +++ b/keyboards/handwired/onekey/stm32_mini_v2/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 = STM32F103xC_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO BOOTLOADER_TYPE = stm32duino DFU_ARGS = -d 1EAF:0003 -a 2 -R DFU_SUFFIX_ARGS = -v 1EAF -p 0003