Skip to content

Commit 314f6c1

Browse files
authored
Move backlight config to data driven (#19910)
1 parent ba7546a commit 314f6c1

File tree

1,003 files changed

+1873
-1684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,003 files changed

+1873
-1684
lines changed

data/mappings/info_config.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
1414
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
1515
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
16+
"BACKLIGHT_CAPS_LOCK": {"info_key": "backlight.as_caps_lock", "value_type": "bool"},
1617
"BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
1718
"BACKLIGHT_LIMIT_VAL": {"info_key": "backlight.max_brightness", "value_type": "int"},
1819
"BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},

data/mappings/info_rules.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
1515
"BOOTMAGIC_ENABLE": {"info_key": "bootmagic.enabled", "value_type": "bool"},
1616
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
17+
"BACKLIGHT_DRIVER": {"info_key": "backlight.driver"},
1718
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
1819
"DEBOUNCE_TYPE": {"info_key": "build.debounce_type"},
1920
"ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"},

data/schemas/keyboard.jsonschema

+6-1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
"type": "object",
109109
"additionalProperties": false,
110110
"properties": {
111+
"driver": {
112+
"type": "string",
113+
"enum": ["pwm", "software", "timer", "custom"]
114+
},
111115
"breathing": {"type": "boolean"},
112116
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
113117
"levels": {
@@ -118,7 +122,8 @@
118122
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
119123
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
120124
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
121-
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
125+
"on_state": {"$ref": "qmk.definitions.v1#/bit"},
126+
"as_caps_lock": {"type": "boolean"}
122127
}
123128
},
124129
"bluetooth": {

keyboards/0xcb/1337/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
#define ENCODERS_PAD_A { F6 }
2424
#define ENCODERS_PAD_B { F5 }
2525

26-
#define BACKLIGHT_PIN B5
27-
#define BACKLIGHT_BREATHING
28-
#define BACKLIGHT_LEVELS 7
29-
3026
#define RGB_DI_PIN D3
3127
#ifdef RGB_DI_PIN
3228
#define RGBLED_NUM 4

keyboards/0xcb/1337/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"pid": "0x1337",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B5",
13+
"levels": 7,
14+
"breathing": true
15+
},
1116
"qmk_lufa_bootloader": {
1217
"led": "B0"
1318
},

keyboards/1upkeyboards/1up60hse/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3434
/* COL2ROW, ROW2COL*/
3535
#define DIODE_DIRECTION COL2ROW
3636

37-
#define BACKLIGHT_PIN B7
38-
#define BACKLIGHT_BREATHING
39-
#define BACKLIGHT_LEVELS 5
40-
4137
#define RGB_DI_PIN F0
4238
#ifdef RGB_DI_PIN
4339
#define RGBLIGHT_EFFECT_BREATHING

keyboards/1upkeyboards/1up60hse/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"pid": "0x6873",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B7",
13+
"levels": 5,
14+
"breathing": true
15+
},
1116
"processor": "atmega32u4",
1217
"bootloader": "atmel-dfu",
1318
"community_layouts": ["60_ansi"],

keyboards/1upkeyboards/1up60hte/config.h

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
/* COL2ROW or ROW2COL */
2727
#define DIODE_DIRECTION COL2ROW
2828

29-
#define BACKLIGHT_PIN B7
30-
3129
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
3230
#define LOCKING_SUPPORT_ENABLE
3331

keyboards/1upkeyboards/1up60hte/info.json

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"pid": "0x6874",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B7"
13+
},
1114
"indicators": {
1215
"caps_lock": "B6",
1316
"on_state": 0

keyboards/1upkeyboards/1up60rgb/config.h

-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
/* COL2ROW or ROW2COL */
99
#define DIODE_DIRECTION COL2ROW
1010

11-
#define BACKLIGHT_PIN B6
12-
#ifdef BACKLIGHT_PIN
13-
#define BACKLIGHT_LEVELS 5
14-
#endif
15-
1611
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
1712
#define LOCKING_SUPPORT_ENABLE
1813

keyboards/1upkeyboards/1up60rgb/info.json

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"pid": "0x7267",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B6",
13+
"levels": 5
14+
},
1115
"processor": "atmega32u4",
1216
"bootloader": "atmel-dfu",
1317
"community_layouts": ["60_ansi", "60_iso", "60_ansi_split_bs_rshift", "60_hhkb"],

keyboards/25keys/aleth42/rev1/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2828
#define ENCODERS_PAD_A { B5, F5 }
2929
#define ENCODERS_PAD_B { B6, F6 }
3030

31-
#define BACKLIGHT_PIN C6
32-
#define BACKLIGHT_BREATHING
33-
#define BACKLIGHT_LEVELS 8
34-
3531
#define RGB_DI_PIN B3
3632
#ifdef RGB_DI_PIN
3733
#define RGBLED_NUM 8

keyboards/25keys/aleth42/rev1/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"usb": {
33
"device_version": "0.0.1"
44
},
5+
"backlight": {
6+
"pin": "C6",
7+
"levels": 8,
8+
"breathing": true
9+
},
510
"processor": "atmega32u4",
611
"bootloader": "atmel-dfu"
712
}

keyboards/40percentclub/gherkin/config.h

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
/* COL2ROW or ROW2COL */
99
#define DIODE_DIRECTION COL2ROW
1010

11-
#define BACKLIGHT_PIN B5
12-
1311
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
1412
#define LOCKING_SUPPORT_ENABLE
1513

keyboards/40percentclub/gherkin/info.json

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"pid": "0x6060",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B5"
13+
},
1114
"processor": "atmega32u4",
1215
"bootloader": "caterina",
1316
"community_layouts": ["ortho_3x10"],

keyboards/40percentclub/luddite/config.h

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
#define DIODE_DIRECTION COL2ROW
99

10-
#define BACKLIGHT_PIN B5
11-
#ifdef BACKLIGHT_PIN
12-
#define BACKLIGHT_LEVELS 4
13-
#endif
14-
1510
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
1611
#define LOCKING_SUPPORT_ENABLE
1712

keyboards/40percentclub/luddite/info.json

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"pid": "0x4C55",
99
"device_version": "10.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B5",
13+
"levels": 4
14+
},
1115
"processor": "atmega32u4",
1216
"bootloader": "caterina",
1317
"community_layouts": ["60_ansi"],

keyboards/40percentclub/mf68/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3434
/* COL2ROW or ROW2COL */
3535
#define DIODE_DIRECTION COL2ROW
3636

37-
#define BACKLIGHT_PIN B5
38-
#define BACKLIGHT_BREATHING
39-
4037
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
4138
#define LOCKING_SUPPORT_ENABLE
4239
/* Locking resynchronize hack */

keyboards/40percentclub/mf68/info.json

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"pid": "0x4D68",
99
"device_version": "1.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B5",
13+
"breathing": true
14+
},
1115
"processor": "atmega32u4",
1216
"bootloader": "caterina",
1317
"community_layouts": ["68_ansi"],

keyboards/40percentclub/nori/config.h

-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
/* COL2ROW, ROW2COL*/
3434
#define DIODE_DIRECTION COL2ROW
3535

36-
#define BACKLIGHT_PIN B5
37-
3836
// enable RGB underglow
3937
#define RGB_DI_PIN B4
4038
#define RGBLIGHT_EFFECT_BREATHING

keyboards/40percentclub/nori/info.json

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"pid": "0x0A0C",
99
"device_version": "4.4.4"
1010
},
11+
"backlight": {
12+
"pin": "B5"
13+
},
1114
"processor": "atmega32u4",
1215
"bootloader": "caterina",
1316
"community_layouts": ["ortho_4x4", "ortho_4x12"],

keyboards/40percentclub/sixpack/config.h

-22
This file was deleted.

keyboards/40percentclub/sixpack/info.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"device_version": "10.0.1"
1010
},
1111
"backlight": {
12-
"pins": ["F4", "F5"]
12+
"pins": ["F4", "F5"],
13+
"levels": 6,
14+
"breathing": true
1315
},
1416
"indicators": {
1517
"caps_lock": "B0",

keyboards/4pplet/eagle_viper_rep/rev_a/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
#define MATRIX_ROW_PINS { A2, A1, B8, A10, C15, A15, B7, B6, C14, C13}
2121
#define DIODE_DIRECTION COL2ROW
2222

23-
/* In switch leds */
24-
#define BACKLIGHT_PIN A3
2523
#define BACKLIGHT_PWM_DRIVER PWMD2
2624
#define BACKLIGHT_PWM_CHANNEL 4
2725
#define BACKLIGHT_PAL_MODE 2
28-
#define BACKLIGHT_LEVELS 10
29-
#define BACKLIGHT_BREATHING TRUE
3026

3127
/* Underglow */
3228
#define RGB_DI_PIN A7

keyboards/4pplet/eagle_viper_rep/rev_a/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"pid": "0x0007",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "A3",
13+
"levels": 10,
14+
"breathing": true
15+
},
1116
"processor": "STM32F072",
1217
"bootloader": "stm32-dfu",
1318
"layouts": {

keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CONSOLE_ENABLE = yes # Console for debug
88
COMMAND_ENABLE = yes # Commands for debug and configuration
99
NKRO_ENABLE = yes # Enable N-Key Rollover
1010
BACKLIGHT_ENABLE = yes
11-
BACKLIGHT_DRIVER = pwm
1211
RGBLIGHT_ENABLE = yes
1312
WS2812_DRIVER = spi
1413

keyboards/4pplet/eagle_viper_rep/rev_b/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
#define MATRIX_ROW_PINS { A2, A1, B8, A10, C15, A15, B7, B6, C14, C13}
2121
#define DIODE_DIRECTION COL2ROW
2222

23-
/* In switch leds */
24-
#define BACKLIGHT_PIN A6
2523
#define BACKLIGHT_PWM_DRIVER PWMD3
2624
#define BACKLIGHT_PWM_CHANNEL 1
2725
#define BACKLIGHT_PAL_MODE 1
28-
#define BACKLIGHT_LEVELS 6
29-
#define BACKLIGHT_BREATHING
3026

3127
/* Underglow */
3228
#define RGBLED_NUM 16

keyboards/4pplet/eagle_viper_rep/rev_b/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"pid": "0x0010",
99
"device_version": "0.0.2"
1010
},
11+
"backlight": {
12+
"pin": "A6",
13+
"levels": 6,
14+
"breathing": true
15+
},
1116
"indicators": {
1217
"caps_lock": "B1",
1318
"num_lock": "B12",

keyboards/8pack/config.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
/* Locking resynchronize hack */
77
#define LOCKING_RESYNC_ENABLE
88

9-
#define BACKLIGHT_LEVELS 8
10-
119
// ws2812 options
1210
#define RGB_DI_PIN D2 // pin the DI on the ws2812 is hooked-up to
1311
#define RGBLED_NUM 8 // number of LEDs

keyboards/8pack/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"pid": "0x2171"
99
},
1010
"backlight": {
11-
"pins": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"]
11+
"pins": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"],
12+
"levels": 8
1213
},
1314
"processor": "atmega32u4",
1415
"bootloader": "caterina",

keyboards/abstract/ellipse/rev1/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3434
/* COL2ROW, ROW2COL */
3535
#define DIODE_DIRECTION COL2ROW
3636

37-
#define BACKLIGHT_PIN C6
38-
#define BACKLIGHT_LEVELS 15
39-
4037
#define RGB_DI_PIN E6
4138
#ifdef RGB_DI_PIN
4239
#define RGBLED_NUM 3

keyboards/abstract/ellipse/rev1/info.json

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"pid": "0x0001",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "C6",
13+
"levels": 15
14+
},
1115
"processor": "atmega32u4",
1216
"bootloader": "atmel-dfu",
1317
"layouts": {

keyboards/acekeyboard/titan60/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3737
/* COL2ROW, ROW2COL */
3838
#define DIODE_DIRECTION COL2ROW
3939

40-
#define BACKLIGHT_PIN B7
41-
#define BACKLIGHT_BREATHING
42-
4340
#define RGB_DI_PIN D0
4441
#ifdef RGB_DI_PIN
4542
# define RGBLED_NUM 6

keyboards/acekeyboard/titan60/info.json

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"pid": "0x5449",
99
"device_version": "0.0.1"
1010
},
11+
"backlight": {
12+
"pin": "B7",
13+
"breathing": true
14+
},
1115
"processor": "atmega32u4",
1216
"bootloader": "atmel-dfu",
1317
"layouts": {

keyboards/acheron/athena/alpha/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
#define LOCKING_SUPPORT_ENABLE
2727
#define LOCKING_RESYNC_ENABLE
2828

29-
#define BACKLIGHT_PIN A6
3029
#define BACKLIGHT_PWM_DRIVER PWMD3
3130
#define BACKLIGHT_PWM_CHANNEL 1
3231
#define BACKLIGHT_PAL_MODE 2
33-
#define BACKLIGHT_LEVELS 20
34-
#define BACKLIGHT_BREATHING
3532

3633
#define RGB_DI_PIN B15
3734
#define RGBLED_NUM 34

0 commit comments

Comments
 (0)