From 314f6c1ddba09851b33e4f3b4bd43bdbc55f9628 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 26 Feb 2023 08:37:57 +1100 Subject: Move backlight config to data driven (#19910) --- keyboards/ymdk/bface/config.h | 3 --- keyboards/ymdk/bface/info.json | 4 ++++ keyboards/ymdk/melody96/config.h | 5 ----- keyboards/ymdk/melody96/info.json | 4 ++++ keyboards/ymdk/np21/config.h | 4 ---- keyboards/ymdk/np21/info.json | 5 +++++ keyboards/ymdk/np24/u4rgb6/config.h | 5 ----- keyboards/ymdk/np24/u4rgb6/info.json | 4 ++++ keyboards/ymdk/wings/config.h | 3 --- keyboards/ymdk/wings/info.json | 4 ++++ keyboards/ymdk/wingshs/config.h | 3 --- keyboards/ymdk/wingshs/info.json | 4 ++++ keyboards/ymdk/yd60mq/config.h | 5 ----- keyboards/ymdk/yd60mq/info.json | 4 ++++ keyboards/ymdk/ym68/config.h | 4 ---- keyboards/ymdk/ym68/info.json | 5 +++++ keyboards/ymdk/ymd21/v2/config.h | 3 --- keyboards/ymdk/ymd21/v2/info.json | 4 ++++ keyboards/ymdk/ymd40/v2/config.h | 3 --- keyboards/ymdk/ymd40/v2/info.json | 4 ++++ keyboards/ymdk/ymd67/config.h | 5 ----- keyboards/ymdk/ymd67/info.json | 4 ++++ keyboards/ymdk/ymd75/config.h | 3 --- keyboards/ymdk/ymd75/rev1/config.h | 1 - keyboards/ymdk/ymd75/rev1/info.json | 4 ++++ keyboards/ymdk/ymd75/rev2/config.h | 1 - keyboards/ymdk/ymd75/rev2/info.json | 4 ++++ keyboards/ymdk/ymd75/rev3/config.h | 1 - keyboards/ymdk/ymd75/rev3/info.json | 4 ++++ keyboards/ymdk/ymd96/config.h | 4 ---- keyboards/ymdk/ymd96/info.json | 5 +++++ 31 files changed, 63 insertions(+), 53 deletions(-) (limited to 'keyboards/ymdk') diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 0b4652da0e..9314f26bea 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -23,9 +23,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 6 - #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/ymdk/bface/info.json b/keyboards/ymdk/bface/info.json index 0547091c2a..641fe31543 100644 --- a/keyboards/ymdk/bface/info.json +++ b/keyboards/ymdk/bface/info.json @@ -8,6 +8,10 @@ "pid": "0x4266", "device_version": "2.0.0" }, + "backlight": { + "pin": "D4", + "levels": 6 + }, "indicators": { "caps_lock": "D1" }, diff --git a/keyboards/ymdk/melody96/config.h b/keyboards/ymdk/melody96/config.h index 2a9a53dcab..1420387adb 100644 --- a/keyboards/ymdk/melody96/config.h +++ b/keyboards/ymdk/melody96/config.h @@ -8,11 +8,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B6 -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 5 -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ymdk/melody96/info.json b/keyboards/ymdk/melody96/info.json index 93c64be2cd..074e6c0485 100644 --- a/keyboards/ymdk/melody96/info.json +++ b/keyboards/ymdk/melody96/info.json @@ -8,6 +8,10 @@ "pid": "0x4D96", "device_version": "0.0.1" }, + "backlight": { + "pin": "B6", + "levels": 5 + }, "indicators": { "caps_lock": "C7", "num_lock": "C6", diff --git a/keyboards/ymdk/np21/config.h b/keyboards/ymdk/np21/config.h index 631f9d5c0e..ce2e688bd7 100644 --- a/keyboards/ymdk/np21/config.h +++ b/keyboards/ymdk/np21/config.h @@ -34,10 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 12 -#define BACKLIGHT_BREATHING - #define RGBLED_NUM 5 //#define RGBLIGHT_HUE_STEP 8 //#define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/ymdk/np21/info.json b/keyboards/ymdk/np21/info.json index 31dc02f0cd..9d1e375cd9 100644 --- a/keyboards/ymdk/np21/info.json +++ b/keyboards/ymdk/np21/info.json @@ -7,6 +7,11 @@ "pid": "0x5021", "device_version": "2.0.0" }, + "backlight": { + "pin": "D4", + "levels": 12, + "breathing": true + }, "indicators": { "num_lock": "D0" }, diff --git a/keyboards/ymdk/np24/u4rgb6/config.h b/keyboards/ymdk/np24/u4rgb6/config.h index ab5642d682..0524cfd563 100644 --- a/keyboards/ymdk/np24/u4rgb6/config.h +++ b/keyboards/ymdk/np24/u4rgb6/config.h @@ -23,11 +23,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN -# define BACKLIGHT_LEVELS 31 -#endif - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN # define RGBLED_NUM 6 diff --git a/keyboards/ymdk/np24/u4rgb6/info.json b/keyboards/ymdk/np24/u4rgb6/info.json index 1d5ff5dbd7..dd4b532538 100644 --- a/keyboards/ymdk/np24/u4rgb6/info.json +++ b/keyboards/ymdk/np24/u4rgb6/info.json @@ -7,6 +7,10 @@ "pid": "0x5024", "device_version": "4.0.6" }, + "backlight": { + "pin": "B7", + "levels": 31 + }, "indicators": { "num_lock": "C6", "on_state": 0 diff --git a/keyboards/ymdk/wings/config.h b/keyboards/ymdk/wings/config.h index 757f474490..3b21cea4a6 100644 --- a/keyboards/ymdk/wings/config.h +++ b/keyboards/ymdk/wings/config.h @@ -32,9 +32,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B6 -#define BACKLIGHT_LEVELS 5 - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 14 diff --git a/keyboards/ymdk/wings/info.json b/keyboards/ymdk/wings/info.json index 80e0c580a3..92f019bacb 100644 --- a/keyboards/ymdk/wings/info.json +++ b/keyboards/ymdk/wings/info.json @@ -8,6 +8,10 @@ "pid": "0x2975", "device_version": "0.0.1" }, + "backlight": { + "pin": "B6", + "levels": 5 + }, "indicators": { "caps_lock": "C7", "on_state": 0 diff --git a/keyboards/ymdk/wingshs/config.h b/keyboards/ymdk/wingshs/config.h index 3b1e7f3182..055c93b327 100644 --- a/keyboards/ymdk/wingshs/config.h +++ b/keyboards/ymdk/wingshs/config.h @@ -30,9 +30,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B6 -#define BACKLIGHT_LEVELS 5 - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 80 diff --git a/keyboards/ymdk/wingshs/info.json b/keyboards/ymdk/wingshs/info.json index e451d10d4d..8e72d4093a 100644 --- a/keyboards/ymdk/wingshs/info.json +++ b/keyboards/ymdk/wingshs/info.json @@ -8,6 +8,10 @@ "pid": "0x4975", "device_version": "0.0.1" }, + "backlight": { + "pin": "B6", + "levels": 5 + }, "indicators": { "caps_lock": "C7", "on_state": 0 diff --git a/keyboards/ymdk/yd60mq/config.h b/keyboards/ymdk/yd60mq/config.h index 602144f294..82d7484aa8 100644 --- a/keyboards/ymdk/yd60mq/config.h +++ b/keyboards/ymdk/yd60mq/config.h @@ -8,11 +8,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 5 -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ymdk/yd60mq/info.json b/keyboards/ymdk/yd60mq/info.json index 2d3777414e..84b42905c7 100644 --- a/keyboards/ymdk/yd60mq/info.json +++ b/keyboards/ymdk/yd60mq/info.json @@ -7,6 +7,10 @@ "vid": "0x594D", "pid": "0x604D" }, + "backlight": { + "pin": "B7", + "levels": 5 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_ansi_tsangan", "60_hhkb", "60_iso", "60_iso_split_bs_rshift", "60_iso_tsangan"], diff --git a/keyboards/ymdk/ym68/config.h b/keyboards/ymdk/ym68/config.h index 7716529d54..d07a8917df 100644 --- a/keyboards/ymdk/ym68/config.h +++ b/keyboards/ymdk/ym68/config.h @@ -32,10 +32,6 @@ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B6 -#define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 5 - #define RGB_DI_PIN E2 #if defined(RGBLIGHT_ENABLE) #define RGBLED_NUM 20 diff --git a/keyboards/ymdk/ym68/info.json b/keyboards/ymdk/ym68/info.json index 5074716cf3..5d4d3913f8 100644 --- a/keyboards/ymdk/ym68/info.json +++ b/keyboards/ymdk/ym68/info.json @@ -8,6 +8,11 @@ "pid": "0xD896", "device_version": "0.0.1" }, + "backlight": { + "pin": "B6", + "levels": 5, + "breathing": true + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ymdk/ymd21/v2/config.h b/keyboards/ymdk/ymd21/v2/config.h index 494a299296..36cbd93891 100644 --- a/keyboards/ymdk/ymd21/v2/config.h +++ b/keyboards/ymdk/ymd21/v2/config.h @@ -32,9 +32,6 @@ #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_BREATHING - #define RGB_DI_PIN E2 #if defined(RGBLIGHT_ENABLE) #define RGBLED_NUM 8 diff --git a/keyboards/ymdk/ymd21/v2/info.json b/keyboards/ymdk/ymd21/v2/info.json index b5729091f6..84badccc5a 100644 --- a/keyboards/ymdk/ymd21/v2/info.json +++ b/keyboards/ymdk/ymd21/v2/info.json @@ -8,6 +8,10 @@ "pid": "0x0110", "device_version": "0.0.1" }, + "backlight": { + "pin": "B7", + "breathing": true + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_6x4"], diff --git a/keyboards/ymdk/ymd40/v2/config.h b/keyboards/ymdk/ymd40/v2/config.h index 3304be6aac..21a027eab4 100644 --- a/keyboards/ymdk/ymd40/v2/config.h +++ b/keyboards/ymdk/ymd40/v2/config.h @@ -32,9 +32,6 @@ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_BREATHING - #if defined(RGBLIGHT_ENABLE) #define RGB_DI_PIN E2 #define RGBLED_NUM 8 diff --git a/keyboards/ymdk/ymd40/v2/info.json b/keyboards/ymdk/ymd40/v2/info.json index 55681cb2f0..375f8c8480 100644 --- a/keyboards/ymdk/ymd40/v2/info.json +++ b/keyboards/ymdk/ymd40/v2/info.json @@ -8,6 +8,10 @@ "pid": "0x4440", "device_version": "0.0.1" }, + "backlight": { + "pin": "B7", + "breathing": true + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_4x12"], diff --git a/keyboards/ymdk/ymd67/config.h b/keyboards/ymdk/ymd67/config.h index ee4bedbaaa..90f4ffed24 100644 --- a/keyboards/ymdk/ymd67/config.h +++ b/keyboards/ymdk/ymd67/config.h @@ -8,11 +8,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 5 -#endif - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ymdk/ymd67/info.json b/keyboards/ymdk/ymd67/info.json index 39a823c830..f66e1533dd 100644 --- a/keyboards/ymdk/ymd67/info.json +++ b/keyboards/ymdk/ymd67/info.json @@ -8,6 +8,10 @@ "pid": "0x6060", "device_version": "0.0.1" }, + "backlight": { + "pin": "B7", + "levels": 5 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/ymdk/ymd75/config.h b/keyboards/ymdk/ymd75/config.h index d384ae2479..5807ae4d8d 100644 --- a/keyboards/ymdk/ymd75/config.h +++ b/keyboards/ymdk/ymd75/config.h @@ -19,9 +19,6 @@ along with this program. If not, see . #pragma once - -#define BACKLIGHT_LEVELS 12 - #define RGB_DI_PIN E2 #define RGBLED_NUM 16 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/ymdk/ymd75/rev1/config.h b/keyboards/ymdk/ymd75/rev1/config.h index 967bb1b226..d46c3bc010 100644 --- a/keyboards/ymdk/ymd75/rev1/config.h +++ b/keyboards/ymdk/ymd75/rev1/config.h @@ -21,5 +21,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define BACKLIGHT_PIN D4 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk/ymd75/rev1/info.json b/keyboards/ymdk/ymd75/rev1/info.json index 6dee7f2d94..967dd3de95 100644 --- a/keyboards/ymdk/ymd75/rev1/info.json +++ b/keyboards/ymdk/ymd75/rev1/info.json @@ -2,6 +2,10 @@ "usb": { "device_version": "1.0.0" }, + "backlight": { + "pin": "D4", + "levels": 12 + }, "indicators": { "caps_lock": "D1" }, diff --git a/keyboards/ymdk/ymd75/rev2/config.h b/keyboards/ymdk/ymd75/rev2/config.h index 04db2b13a6..83e075b290 100644 --- a/keyboards/ymdk/ymd75/rev2/config.h +++ b/keyboards/ymdk/ymd75/rev2/config.h @@ -2,5 +2,4 @@ #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define BACKLIGHT_PIN D4 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk/ymd75/rev2/info.json b/keyboards/ymdk/ymd75/rev2/info.json index be7df2e5a7..56435d5b27 100644 --- a/keyboards/ymdk/ymd75/rev2/info.json +++ b/keyboards/ymdk/ymd75/rev2/info.json @@ -2,6 +2,10 @@ "usb": { "device_version": "2.0.0" }, + "backlight": { + "pin": "D4", + "levels": 12 + }, "indicators": { "caps_lock": "D1" }, diff --git a/keyboards/ymdk/ymd75/rev3/config.h b/keyboards/ymdk/ymd75/rev3/config.h index 87053214b4..e3a31b5116 100644 --- a/keyboards/ymdk/ymd75/rev3/config.h +++ b/keyboards/ymdk/ymd75/rev3/config.h @@ -2,6 +2,5 @@ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define BACKLIGHT_PIN B6 // change the backlight pin that has since changed in Rev 3 #define DIODE_DIRECTION ROW2COL #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 4 diff --git a/keyboards/ymdk/ymd75/rev3/info.json b/keyboards/ymdk/ymd75/rev3/info.json index 850cf51f56..ce0db873cf 100644 --- a/keyboards/ymdk/ymd75/rev3/info.json +++ b/keyboards/ymdk/ymd75/rev3/info.json @@ -2,6 +2,10 @@ "usb": { "device_version": "3.0.0" }, + "backlight": { + "pin": "B6", + "levels": 12 + }, "indicators": { "caps_lock": "C7" }, diff --git a/keyboards/ymdk/ymd96/config.h b/keyboards/ymdk/ymd96/config.h index 384acfd8cf..f4fc0a99c3 100644 --- a/keyboards/ymdk/ymd96/config.h +++ b/keyboards/ymdk/ymd96/config.h @@ -25,10 +25,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 12 -#define BACKLIGHT_BREATHING - #define TAPPING_TOGGLE 3 #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/ymdk/ymd96/info.json b/keyboards/ymdk/ymd96/info.json index ebf56d2ee5..7541e62019 100644 --- a/keyboards/ymdk/ymd96/info.json +++ b/keyboards/ymdk/ymd96/info.json @@ -8,6 +8,11 @@ "pid": "0x422D", "device_version": "2.0.0" }, + "backlight": { + "pin": "D4", + "levels": 12, + "breathing": true + }, "indicators": { "caps_lock": "D1", "num_lock": "D0", -- cgit v1.2.3