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) --- data/mappings/info_config.hjson | 1 + data/mappings/info_rules.hjson | 1 + data/schemas/keyboard.jsonschema | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 7645598c77..46108e6fe6 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -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"}, diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index c409da04c6..7c3780504c 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -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"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 95387ba367..6f4f9c82ac 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -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": { @@ -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": { -- cgit v1.2.3