Skip to content

Commit

Permalink
Add LED/RGB Matrix drivers to info.json schema (qmk#23127)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and peepeetee committed Mar 12, 2024
1 parent 0679861 commit 6f31f91
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 34 deletions.
88 changes: 55 additions & 33 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"driver": {
"type": "string",
"enum": ["quadrature", "custom"]
"enum": ["custom", "quadrature"]
},
"rotary": {
"type": "array",
Expand All @@ -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"},
Expand Down Expand Up @@ -146,7 +144,7 @@
"properties": {
"driver": {
"type": "string",
"enum": ["pwm", "software", "timer", "custom"]
"enum": ["custom", "pwm", "software", "timer"]
},
"default": {
"type": "object",
Expand Down Expand Up @@ -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",
Expand All @@ -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": {
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -774,7 +796,7 @@
"st7565": {"type": "boolean"},
"wpm": {"type": "boolean"}
}
}
},
"watchdog": {"type": "boolean"},
"watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"sync_matrix_state": {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/moky/moky88/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
]
},
"rgb_matrix": {
"driver": "aw20216",
"driver": "aw20216s",
"max_brightness": 108,
"animations": {
"alphas_mods": true,
Expand Down

0 comments on commit 6f31f91

Please sign in to comment.