From 14d1d9639c4c25a6318b0f9b14606bfd07f8303d Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 26 Feb 2024 08:29:25 +1100 Subject: [PATCH] Add LED/RGB Matrix drivers to info.json schema (#23127) --- data/schemas/keyboard.jsonschema | 88 ++++++++++++++++++++------------ keyboards/moky/moky88/info.json | 2 +- 2 files changed, 56 insertions(+), 34 deletions(-) diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 79668fe386..340eb64ba1 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -8,7 +8,7 @@ "properties": { "driver": { "type": "string", - "enum": ["quadrature", "custom"] + "enum": ["custom", "quadrature"] }, "rotary": { "type": "array", @@ -28,14 +28,12 @@ "dip_switch_config": { "type": "object", "properties": { - "pins": { - "$ref": "qmk.definitions.v1#/mcu_pin_array" - } + "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} } - }, + } }, "type": "object", - "not": { "required": [ "vendorId", "productId" ] }, // reject via keys... + "not": {"required": ["vendorId", "productId"]}, // reject via keys... "properties": { "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"}, @@ -146,7 +144,7 @@ "properties": { "driver": { "type": "string", - "enum": ["pwm", "software", "timer", "custom"] + "enum": ["custom", "pwm", "software", "timer"] }, "default": { "type": "object", @@ -318,8 +316,8 @@ }, "features": { "$ref": "qmk.definitions.v1#/boolean_array", - "propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" }, - "not": { "required": [ "lto" ] } + "propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"}, + "not": {"required": ["lto"]} }, "indicators": { "type": "object", @@ -344,15 +342,9 @@ "type": "object", "additionalProperties": false, "properties": { - "filename": { - "type": "string" - }, - "c_macro": { - "type": "boolean" - }, - "json_layout": { - "type": "boolean" - }, + "filename": {"type": "string"}, + "c_macro": {"type": "boolean"}, + "json_layout": {"type": "boolean"}, "layout": { "type": "array", "items": { @@ -435,10 +427,8 @@ "properties": { "animations": { "type": "object", - "propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" } - "additionalProperties": { - "type": "boolean" - } + "propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"}, + "additionalProperties": {"type": "boolean"} }, "default": { "type": "object", @@ -450,7 +440,24 @@ "speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } }, - "driver": {"type": "string"}, + "driver": { + "type": "string", + "enum": [ + "custom", + "is31fl3218", + "is31fl3729", + "is31fl3731", + "is31fl3733", + "is31fl3736", + "is31fl3737", + "is31fl3741", + "is31fl3742a", + "is31fl3743a", + "is31fl3745", + "is31fl3746a", + "snled27351" + ] + }, "center_point": { "type": "array", "minItems": 2, @@ -499,10 +506,8 @@ "properties": { "animations": { "type": "object", - "propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" } - "additionalProperties": { - "type": "boolean" - } + "propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"}, + "additionalProperties": {"type": "boolean"} }, "default": { "type": "object", @@ -516,7 +521,26 @@ "speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} } }, - "driver": {"type": "string"}, + "driver": { + "type": "string", + "enum": [ + "aw20216s", + "custom", + "is31fl3218", + "is31fl3729", + "is31fl3731", + "is31fl3733", + "is31fl3736", + "is31fl3737", + "is31fl3741", + "is31fl3742a", + "is31fl3743a", + "is31fl3745", + "is31fl3746a", + "snled27351", + "ws2812" + ] + }, "center_point": { "type": "array", "minItems": 2, @@ -568,10 +592,8 @@ "properties": { "animations": { "type": "object", - "propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" } - "additionalProperties": { - "type": "boolean" - } + "propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"}, + "additionalProperties": {"type": "boolean"} }, "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "default": { @@ -774,7 +796,7 @@ "st7565": {"type": "boolean"}, "wpm": {"type": "boolean"} } - } + }, "watchdog": {"type": "boolean"}, "watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "sync_matrix_state": { diff --git a/keyboards/moky/moky88/info.json b/keyboards/moky/moky88/info.json index 79d5373ea8..38ed4dbd28 100644 --- a/keyboards/moky/moky88/info.json +++ b/keyboards/moky/moky88/info.json @@ -35,7 +35,7 @@ ] }, "rgb_matrix": { - "driver": "aw20216", + "driver": "aw20216s", "max_brightness": 108, "animations": { "alphas_mods": true,