summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-01-17 08:44:34 +1100
committerGitHub <noreply@github.com>2022-01-17 08:44:34 +1100
commitc72ed7c02473dec4da6cb263c1e0fb2ca4856b94 (patch)
tree4c218562b5ed5bbd34da67f37093ba6f47012d57 /data
parent557fbbd6afbff3bdd571e580ea79ba3905a28ce4 (diff)
downloadqmk_firmware-c72ed7c02473dec4da6cb263c1e0fb2ca4856b94.tar.gz
qmk_firmware-c72ed7c02473dec4da6cb263c1e0fb2ca4856b94.zip
CLI: Parse USB device version BCD (#14580)
* CLI: Parse USB device version BCD * Apply suggestions
Diffstat (limited to 'data')
-rw-r--r--data/mappings/info_config.json2
-rw-r--r--data/schemas/definitions.jsonschema10
-rw-r--r--data/schemas/keyboard.jsonschema3
3 files changed, 11 insertions, 4 deletions
diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json
index 3cb64dd3a2..cfe8807d43 100644
--- a/data/mappings/info_config.json
+++ b/data/mappings/info_config.json
@@ -15,6 +15,8 @@
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
"DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"},
+ # TODO: Replace ^^^ with vvv
+ #"DEVICE_VER": {"info_key": "usb.device_version", "value_type": "bcd_version"},
"DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false},
"DIODE_DIRECTION": {"info_key": "diode_direction"},
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema
index 822f237073..3f92e289a7 100644
--- a/data/schemas/definitions.jsonschema
+++ b/data/schemas/definitions.jsonschema
@@ -20,6 +20,10 @@
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
+ "bcd_version": {
+ "type": "string",
+ "pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
+ },
"text_identifier": {
"type": "string",
"minLength": 1,
@@ -70,13 +74,13 @@
"signed_int": {
"type": "number",
"multipleOf": 1
- }
+ },
"signed_int_8": {
"type": "number",
"min": -127,
"max": 127,
"multipleOf": 1
- }
+ },
"string_array": {
"type": "array",
"items": {
@@ -97,7 +101,7 @@
"type": "number",
"min": 0,
"multipleOf": 1
- }
+ },
"unsigned_int_8": {
"type": "number",
"min": 0,
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 94bbbe7e85..f7b05d6655 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -320,7 +320,8 @@
"type": "object",
"additionalProperties": false,
"properties": {
- "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
+ "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, # Deprecated
+ "device_version": {"$ref": "qmk.definitions.v1#/bcd_version"},
"force_nkro": {"type": "boolean"},
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},