From 98530cad3ba8733d8a100e0bc5f3cf47339c4b3e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 29 Oct 2023 01:09:02 +0100 Subject: Implement data driven dip switches (#22017) * Add data driven dip switches * Autogen weak matrix_mask --- data/schemas/keyboard.jsonschema | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'data/schemas/keyboard.jsonschema') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index c120099745..540ce4e42a 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -20,7 +20,15 @@ } } } - } + }, + "dip_switch_config": { + "type": "object", + "properties": { + "pins": { + "$ref": "qmk.definitions.v1#/mcu_pin_array" + } + } + }, }, "type": "object", "not": { "required": [ "vendorId", "productId" ] }, // reject via keys... @@ -245,6 +253,25 @@ "type": "array", "items": {"$ref": "qmk.definitions.v1#/filename"} }, + "dip_switch": { + "$ref": "#/definitions/dip_switch_config", + "properties": { + "enabled": {"type": "boolean"}, + "matrix_grid": { + "type": "array", + "minItems": 1, + "items": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "integer", + "minimum": 0 + } + } + } + } + }, "eeprom": { "properties": { "driver": {"type": "string"}, @@ -636,6 +663,15 @@ } } }, + "dip_switch": { + "type": "object", + "additionalProperties": false, + "properties": { + "right": { + "$ref": "#/definitions/dip_switch_config" + } + } + }, "encoder": { "type": "object", "additionalProperties": false, -- cgit v1.2.3