Skip to content

Commit

Permalink
wip: data driven
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlK90 committed Aug 10, 2024
1 parent d7e5084 commit 4b0e270
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/mappings/info_config.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "flag"},
"SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"},
"SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"},
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "flag"},
"SPLIT_WATCHDOG_TIMEOUT": {"info_key": "split.transport.watchdog_timeout", "value_type": "int"},
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "flag", "deprecated": true, "replace_with": "`split.usb_detect.driver` in info.json"},
"SPLIT_WATCHDOG_TIMEOUT": {"info_key": "split.transport.watchdog_timeout", "value_type": "int", "deprecated": true, "replace_with": "`split.usb_detect.timeout` in info.json"},
"SPLIT_ACTIVITY_ENABLE": {"info_key": "split.transport.sync.activity", "value_type": "flag"},
"SPLIT_DETECTED_OS_ENABLE": {"info_key": "split.transport.sync.detected_os", "value_type": "flag"},
"SPLIT_HAPTIC_ENABLE": {"info_key": "split.transport.sync.haptic", "value_type": "flag"},
Expand Down
2 changes: 2 additions & 0 deletions data/mappings/info_rules.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"SERIAL_DRIVER": {"info_key": "split.serial.driver"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
"SPLIT_USB_DETECT_ENABLE": {"info_key": "split.usb_detect.enabled", "value_type": "bool"},
"SPLIT_USB_DETECT_DRIVER": {"info_key": "split.usb_detect.driver"},
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
"STENO_PROTOCOL": {"info_key": "stenography.protocol"},
"USB_WAIT_FOR_ENUMERATION": {"info_key": "usb.wait_for_enumeration", "value_type": "bool"},
Expand Down
7 changes: 6 additions & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,13 @@
"additionalProperties": false,
"properties": {
"enabled": {"type": "boolean"},
"driver": {
"type": "string",
"enum": ["vbus_sensing", "usb_enumeration", "usb_enumeration_watchdog"],
},
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"vbus_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
}
},
"main": {
Expand Down

0 comments on commit 4b0e270

Please sign in to comment.