diff --git a/keyboards/handwired/onekey/stm32_mini_v2/board.h b/keyboards/handwired/onekey/stm32_mini_v2/board.h index edd68f15ae9..6895c574ed4 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/board.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/board.h @@ -1,4 +1,4 @@ -/* Copyright 2022 HorrorTroll +/* Copyright 2023 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 diff --git a/keyboards/handwired/onekey/stm32_mini_v2/config.h b/keyboards/handwired/onekey/stm32_mini_v2/config.h index e32486ee3ec..abc54fa1068 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/config.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/config.h @@ -1,4 +1,4 @@ -/* Copyright 2022 HorrorTroll +/* Copyright 2023 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,8 +16,6 @@ #pragma once -#include "config_common.h" - // SPI configuration #define SPI_DRIVER SPID1 #define SPI_SCK_PIN A5 @@ -44,5 +42,3 @@ #define BACKLIGHT_PWM_DRIVER PWMD2 #define BACKLIGHT_PWM_CHANNEL 1 #endif - -#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/stm32_mini_v2/halconf.h b/keyboards/handwired/onekey/stm32_mini_v2/halconf.h index 605435b6b6a..70599475f54 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/halconf.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2022 HorrorTroll +/* Copyright 2023 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 @@ -21,6 +21,8 @@ #pragma once +#define HAL_USE_ADC TRUE + #define HAL_USE_PWM TRUE #define HAL_USE_SPI TRUE diff --git a/keyboards/handwired/onekey/stm32_mini_v2/info.json b/keyboards/handwired/onekey/stm32_mini_v2/info.json index 825c812c054..d252a98a271 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/info.json +++ b/keyboards/handwired/onekey/stm32_mini_v2/info.json @@ -1,6 +1,7 @@ { "keyboard_name": "Onekey STM32 Mini v2 STM32F103RC", "processor": "STM32F103", + "bootloader": "stm32duino", "board": "STM32_F103_STM32DUINO", "matrix_pins": { "cols": ["B0"], @@ -9,7 +10,11 @@ "backlight": { "pin": "A0" }, - "rgblight": { + "ws2812": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h b/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h index f1225afdc22..1afce3052ed 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h +++ b/keyboards/handwired/onekey/stm32_mini_v2/mcuconf.h @@ -1,4 +1,4 @@ -/* Copyright 2022 HorrorTroll +/* Copyright 2023 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 @@ -23,6 +23,9 @@ #include_next +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE + #undef STM32_PWM_USE_TIM2 #define STM32_PWM_USE_TIM2 TRUE diff --git a/keyboards/handwired/onekey/stm32_mini_v2/rules.mk b/keyboards/handwired/onekey/stm32_mini_v2/rules.mk index af4b3e520c6..2c6a6783330 100644 --- a/keyboards/handwired/onekey/stm32_mini_v2/rules.mk +++ b/keyboards/handwired/onekey/stm32_mini_v2/rules.mk @@ -1,11 +1,5 @@ # 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 -BOOTLOADER_TYPE = stm32duino -DFU_ARGS = -d 1EAF:0003 -a 2 -R -DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +MCU_LDSCRIPT = STM32F103xC_stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xC_stm32duino_bootloader.ld b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xC_stm32duino.ld similarity index 100% rename from platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xC_stm32duino_bootloader.ld rename to platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xC_stm32duino.ld