From a5b70400c787a26f52077d193551c892897b5f27 Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Wed, 7 Aug 2024 21:12:44 +0700 Subject: [PATCH] Update onekey board --- keyboards/handwired/onekey/at_start_f415/config.h | 3 +++ keyboards/handwired/onekey/at_start_f415/halconf.h | 2 ++ .../onekey/at_start_f415/{info.json => keyboard.json} | 8 ++++++++ keyboards/handwired/onekey/at_start_f415/mcuconf.h | 3 +++ keyboards/handwired/onekey/at_start_f415/rules.mk | 1 - 5 files changed, 16 insertions(+), 1 deletion(-) rename keyboards/handwired/onekey/at_start_f415/{info.json => keyboard.json} (62%) delete mode 100644 keyboards/handwired/onekey/at_start_f415/rules.mk diff --git a/keyboards/handwired/onekey/at_start_f415/config.h b/keyboards/handwired/onekey/at_start_f415/config.h index 2b35460f5a38..266e45dd0046 100644 --- a/keyboards/handwired/onekey/at_start_f415/config.h +++ b/keyboards/handwired/onekey/at_start_f415/config.h @@ -5,3 +5,6 @@ #pragma once #define ADC_PIN A0 + +#define BACKLIGHT_PWM_DRIVER PWMD5 +#define BACKLIGHT_PWM_CHANNEL 1 diff --git a/keyboards/handwired/onekey/at_start_f415/halconf.h b/keyboards/handwired/onekey/at_start_f415/halconf.h index 75d30e6b2d88..1423633d15fc 100644 --- a/keyboards/handwired/onekey/at_start_f415/halconf.h +++ b/keyboards/handwired/onekey/at_start_f415/halconf.h @@ -8,4 +8,6 @@ #define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE + #include_next diff --git a/keyboards/handwired/onekey/at_start_f415/info.json b/keyboards/handwired/onekey/at_start_f415/keyboard.json similarity index 62% rename from keyboards/handwired/onekey/at_start_f415/info.json rename to keyboards/handwired/onekey/at_start_f415/keyboard.json index 14cd8443045f..f598923a6a55 100644 --- a/keyboards/handwired/onekey/at_start_f415/info.json +++ b/keyboards/handwired/onekey/at_start_f415/keyboard.json @@ -2,10 +2,18 @@ "keyboard_name": "Onekey AT-START-F415", "processor": "AT32F415", "bootloader": "at32-dfu", + "usb": { + "shared_endpoint": { + "keyboard": true + } + }, "matrix_pins": { "cols": ["B3"], "rows": ["B4"] }, + "backlight": { + "pin": "A0" + }, "ws2812": { "pin": "B0" } diff --git a/keyboards/handwired/onekey/at_start_f415/mcuconf.h b/keyboards/handwired/onekey/at_start_f415/mcuconf.h index 5fe8ac666064..9bc11d507cce 100644 --- a/keyboards/handwired/onekey/at_start_f415/mcuconf.h +++ b/keyboards/handwired/onekey/at_start_f415/mcuconf.h @@ -11,3 +11,6 @@ #undef AT32_I2C_USE_I2C1 #define AT32_I2C_USE_I2C1 TRUE + +#undef AT32_PWM_USE_TMR5 +#define AT32_PWM_USE_TMR5 TRUE diff --git a/keyboards/handwired/onekey/at_start_f415/rules.mk b/keyboards/handwired/onekey/at_start_f415/rules.mk deleted file mode 100644 index 1071cf62ee35..000000000000 --- a/keyboards/handwired/onekey/at_start_f415/rules.mk +++ /dev/null @@ -1 +0,0 @@ -KEYBOARD_SHARED_EP = yes