Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move backlight config to data driven #19910

Merged
merged 6 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions data/mappings/info_config.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
"BACKLIGHT_CAPS_LOCK": {"info_key": "backlight.as_caps_lock", "value_type": "bool"},
"BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
"BACKLIGHT_LIMIT_VAL": {"info_key": "backlight.max_brightness", "value_type": "int"},
"BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
Expand Down
1 change: 1 addition & 0 deletions data/mappings/info_rules.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BOOTMAGIC_ENABLE": {"info_key": "bootmagic.enabled", "value_type": "bool"},
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
"BACKLIGHT_DRIVER": {"info_key": "backlight.driver"},
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
"DEBOUNCE_TYPE": {"info_key": "build.debounce_type"},
"ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"},
Expand Down
7 changes: 6 additions & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
"type": "object",
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": ["pwm", "software", "timer", "custom"]
},
"breathing": {"type": "boolean"},
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"levels": {
Expand All @@ -118,7 +122,8 @@
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
"on_state": {"$ref": "qmk.definitions.v1#/bit"},
"as_caps_lock": {"type": "boolean"}
}
},
"bluetooth": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/0xcb/1337/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_A { F6 }
#define ENCODERS_PAD_B { F5 }

#define BACKLIGHT_PIN B5
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 7

#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
#define RGBLED_NUM 4
Expand Down
5 changes: 5 additions & 0 deletions keyboards/0xcb/1337/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x1337",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B5",
"levels": 7,
"breathing": true
},
"qmk_lufa_bootloader": {
"led": "B0"
},
Expand Down
4 changes: 0 additions & 4 deletions keyboards/1upkeyboards/1up60hse/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5

#define RGB_DI_PIN F0
#ifdef RGB_DI_PIN
#define RGBLIGHT_EFFECT_BREATHING
Expand Down
5 changes: 5 additions & 0 deletions keyboards/1upkeyboards/1up60hse/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x6873",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B7",
"levels": 5,
"breathing": true
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"community_layouts": ["60_ansi"],
Expand Down
2 changes: 0 additions & 2 deletions keyboards/1upkeyboards/1up60hte/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B7

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

Expand Down
3 changes: 3 additions & 0 deletions keyboards/1upkeyboards/1up60hte/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x6874",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B7"
},
"indicators": {
"caps_lock": "B6",
"on_state": 0
Expand Down
5 changes: 0 additions & 5 deletions keyboards/1upkeyboards/1up60rgb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#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

Expand Down
4 changes: 4 additions & 0 deletions keyboards/1upkeyboards/1up60rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x7267",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B6",
"levels": 5
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"community_layouts": ["60_ansi", "60_iso", "60_ansi_split_bs_rshift", "60_hhkb"],
Expand Down
4 changes: 0 additions & 4 deletions keyboards/25keys/aleth42/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_A { B5, F5 }
#define ENCODERS_PAD_B { B6, F6 }

#define BACKLIGHT_PIN C6
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 8

#define RGB_DI_PIN B3
#ifdef RGB_DI_PIN
#define RGBLED_NUM 8
Expand Down
5 changes: 5 additions & 0 deletions keyboards/25keys/aleth42/rev1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"usb": {
"device_version": "0.0.1"
},
"backlight": {
"pin": "C6",
"levels": 8,
"breathing": true
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu"
}
2 changes: 0 additions & 2 deletions keyboards/40percentclub/gherkin/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

Expand Down
3 changes: 3 additions & 0 deletions keyboards/40percentclub/gherkin/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x6060",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B5"
},
"processor": "atmega32u4",
"bootloader": "caterina",
"community_layouts": ["ortho_3x10"],
Expand Down
5 changes: 0 additions & 5 deletions keyboards/40percentclub/luddite/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 4
#endif

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

Expand Down
4 changes: 4 additions & 0 deletions keyboards/40percentclub/luddite/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x4C55",
"device_version": "10.0.1"
},
"backlight": {
"pin": "B5",
"levels": 4
},
"processor": "atmega32u4",
"bootloader": "caterina",
"community_layouts": ["60_ansi"],
Expand Down
3 changes: 0 additions & 3 deletions keyboards/40percentclub/mf68/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B5
#define BACKLIGHT_BREATHING

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
Expand Down
4 changes: 4 additions & 0 deletions keyboards/40percentclub/mf68/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x4D68",
"device_version": "1.0.1"
},
"backlight": {
"pin": "B5",
"breathing": true
},
"processor": "atmega32u4",
"bootloader": "caterina",
"community_layouts": ["68_ansi"],
Expand Down
2 changes: 0 additions & 2 deletions keyboards/40percentclub/nori/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B5

// enable RGB underglow
#define RGB_DI_PIN B4
#define RGBLIGHT_EFFECT_BREATHING
Expand Down
3 changes: 3 additions & 0 deletions keyboards/40percentclub/nori/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x0A0C",
"device_version": "4.4.4"
},
"backlight": {
"pin": "B5"
},
"processor": "atmega32u4",
"bootloader": "caterina",
"community_layouts": ["ortho_4x4", "ortho_4x12"],
Expand Down
22 changes: 0 additions & 22 deletions keyboards/40percentclub/sixpack/config.h

This file was deleted.

4 changes: 3 additions & 1 deletion keyboards/40percentclub/sixpack/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"device_version": "10.0.1"
},
"backlight": {
"pins": ["F4", "F5"]
"pins": ["F4", "F5"],
"levels": 6,
"breathing": true
},
"indicators": {
"caps_lock": "B0",
Expand Down
4 changes: 0 additions & 4 deletions keyboards/4pplet/eagle_viper_rep/rev_a/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { A2, A1, B8, A10, C15, A15, B7, B6, C14, C13}
#define DIODE_DIRECTION COL2ROW

/* In switch leds */
#define BACKLIGHT_PIN A3
#define BACKLIGHT_PWM_DRIVER PWMD2
#define BACKLIGHT_PWM_CHANNEL 4
#define BACKLIGHT_PAL_MODE 2
#define BACKLIGHT_LEVELS 10
#define BACKLIGHT_BREATHING TRUE

/* Underglow */
#define RGB_DI_PIN A7
Expand Down
5 changes: 5 additions & 0 deletions keyboards/4pplet/eagle_viper_rep/rev_a/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x0007",
"device_version": "0.0.1"
},
"backlight": {
"pin": "A3",
"levels": 10,
"breathing": true
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"layouts": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes
BACKLIGHT_DRIVER = pwm
RGBLIGHT_ENABLE = yes
WS2812_DRIVER = spi

Expand Down
4 changes: 0 additions & 4 deletions keyboards/4pplet/eagle_viper_rep/rev_b/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { A2, A1, B8, A10, C15, A15, B7, B6, C14, C13}
#define DIODE_DIRECTION COL2ROW

/* In switch leds */
#define BACKLIGHT_PIN A6
#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 1
#define BACKLIGHT_LEVELS 6
#define BACKLIGHT_BREATHING

/* Underglow */
#define RGBLED_NUM 16
Expand Down
5 changes: 5 additions & 0 deletions keyboards/4pplet/eagle_viper_rep/rev_b/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x0010",
"device_version": "0.0.2"
},
"backlight": {
"pin": "A6",
"levels": 6,
"breathing": true
},
"indicators": {
"caps_lock": "B1",
"num_lock": "B12",
Expand Down
2 changes: 0 additions & 2 deletions keyboards/8pack/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define BACKLIGHT_LEVELS 8

// ws2812 options
#define RGB_DI_PIN D2 // pin the DI on the ws2812 is hooked-up to
#define RGBLED_NUM 8 // number of LEDs
Expand Down
3 changes: 2 additions & 1 deletion keyboards/8pack/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"pid": "0x2171"
},
"backlight": {
"pins": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"]
"pins": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"],
"levels": 8
},
"processor": "atmega32u4",
"bootloader": "caterina",
Expand Down
3 changes: 0 additions & 3 deletions keyboards/abstract/ellipse/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN C6
#define BACKLIGHT_LEVELS 15

#define RGB_DI_PIN E6
#ifdef RGB_DI_PIN
#define RGBLED_NUM 3
Expand Down
4 changes: 4 additions & 0 deletions keyboards/abstract/ellipse/rev1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"backlight": {
"pin": "C6",
"levels": 15
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/acekeyboard/titan60/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING

#define RGB_DI_PIN D0
#ifdef RGB_DI_PIN
# define RGBLED_NUM 6
Expand Down
4 changes: 4 additions & 0 deletions keyboards/acekeyboard/titan60/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x5449",
"device_version": "0.0.1"
},
"backlight": {
"pin": "B7",
"breathing": true
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/acheron/athena/alpha/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE

#define BACKLIGHT_PIN A6
#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 2
#define BACKLIGHT_LEVELS 20
#define BACKLIGHT_BREATHING

#define RGB_DI_PIN B15
#define RGBLED_NUM 34
Expand Down
Loading