From 266a85eda0cbb63852565d0c1d7ddb24700b8c1f Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 1 Dec 2020 12:58:00 -0800 Subject: add missing schemas --- data/schemas/api_keyboard.jsonschema | 35 ++++++ data/schemas/false.jsonschema | 1 + data/schemas/keyboard.jsonschema | 232 +++++++++++++++++++++++++++++++++++ data/schemas/true.jsonschema | 1 + 4 files changed, 269 insertions(+) create mode 100644 data/schemas/api_keyboard.jsonschema create mode 100644 data/schemas/false.jsonschema create mode 100644 data/schemas/keyboard.jsonschema create mode 100644 data/schemas/true.jsonschema (limited to 'data') diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema new file mode 100644 index 0000000000..d570ee9990 --- /dev/null +++ b/data/schemas/api_keyboard.jsonschema @@ -0,0 +1,35 @@ +{ + "allOf": [ + { "$ref": "qmk.keyboard.v1" }, + { + "$id": "qmk.api.keyboard.v1", + "keymaps": { + "type": "string" + }, + "parse_errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "parse_warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "processor_type": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "keyboard_folder": { + "type": "string" + }, + "platform": { + "type": "string" + } + } + ] +} diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema new file mode 100644 index 0000000000..c508d5366f --- /dev/null +++ b/data/schemas/false.jsonschema @@ -0,0 +1 @@ +false diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema new file mode 100644 index 0000000000..75e792b646 --- /dev/null +++ b/data/schemas/keyboard.jsonschema @@ -0,0 +1,232 @@ +{ + "$schema": "http://json-schema.org/schema#", + "$id": "qmk.keyboard.v1", + "title": "Keyboard Information", + "type": "object", + "properties": { + "keyboard_name": { + "type": "string", + "minLength": 2, + "maxLength": 250 + }, + "maintainer": { + "type": "string", + "minLength": 2, + "maxLength": 250 + }, + "manufacturer": { + "type": "string", + "minLength": 2, + "maxLength": 250 + }, + "url": { + "type": "string", + "format": "uri" + }, + "processor": { + "type": "string", + "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4"] + }, + "bootloader": { + "type": "string", + "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"] + }, + "diode_direction": { + "type": "string", + "enum": ["COL2ROW", "ROW2COL"] + }, + "debounce": { + "type": "number", + "min": 0, + "multipleOf": 1 + }, + "height": { + "type": "number", + "min": 0.25 + }, + "width": { + "type": "number", + "min": 0.25 + }, + "community_layouts": { + "type": "array", + "items": { + "type": "string", + "minLength": 2, + "pattern": "^[0-9a-z_]*$" + } + }, + "features": { + "type": "object", + "additionalProperties": {"type": "boolean"} + }, + "indicators": { + "type": "object", + "properties": { + "caps_lock": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + "num_lock": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + "scroll_lock": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + } + } + }, + "layout_aliases": { + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^LAYOUT_[0-9a-z_]*$" + } + }, + "layouts": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "properties": { + "c_macro": { + "type": "boolean" + }, + "key_count": { + "type": "number", + "min": 0, + "multipleOf": 1 + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": {"type": "string"}, + "matrix": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number", + "min": 0, + "multipleOf": 1 + } + }, + "h": { + "type": "number", + "min": 0.25 + }, + "w": { + "type": "number", + "min": 0.25 + }, + "x": { + "type": "number", + "min": 0 + }, + "y": { + "type": "number", + "min": 0 + } + } + } + } + } + } + }, + "matrix_pins": { + "type": "object", + "additionalProperties": false, + "properties": { + "direct": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + { + "type": "null" + } + ] + } + } + }, + "cols": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + } + }, + "rows": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + } + } + } + }, + "rgblight": { + "type": "object", + "additionalProperties": false, + "properties": { + "animations": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "brightness_steps": { + "type": "number", + "min": 0, + "multipleOf": 1 + }, + "hue_steps": { + "type": "number", + "min": 0, + "multipleOf": 1 + }, + "led_count": { + "type": "number", + "min": 0, + "multipleOf": 1 + }, + "pin": { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + "saturation_steps": { + "type": "number", + "min": 0, + "multipleOf": 1 + } + } + }, + "usb": { + "type": "object", + "additionalProperties": false, + "properties": { + "device_ver": { + "type": "string", + "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" + }, + "pid": { + "type": "string", + "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" + }, + "vid": { + "type": "string", + "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" + } + } + } + } +} diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema new file mode 100644 index 0000000000..27ba77ddaf --- /dev/null +++ b/data/schemas/true.jsonschema @@ -0,0 +1 @@ +true -- cgit v1.2.3 From b2c26f7cdd4b268e80f98cae7f444956559436ec Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 1 Dec 2020 16:04:22 -0800 Subject: get qmk generate-api into a good state --- data/schemas/keyboard.jsonschema | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 75e792b646..9355ee49bd 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -90,6 +90,9 @@ "type": "object", "additionalProperties": false, "properties": { + "filename": { + "type": "string" + }, "c_macro": { "type": "boolean" }, @@ -119,6 +122,18 @@ "type": "number", "min": 0.25 }, + "r": { + "type": "number", + "min": 0 + }, + "rx": { + "type": "number", + "min": 0 + }, + "ry": { + "type": "number", + "min": 0 + }, "w": { "type": "number", "min": 0.25 @@ -199,6 +214,12 @@ "min": 0, "multipleOf": 1 }, + "max_brightness": { + "type": "number", + "min": 0, + "max": 255, + "multipleOf": 1 + }, "pin": { "type": "string", "pattern": "^[A-K]\\d{1,2}$" @@ -207,6 +228,18 @@ "type": "number", "min": 0, "multipleOf": 1 + }, + "sleep": {"type": "boolean"}, + "split": {"type": "boolean"}, + "split_count": { + "type": "array", + "minLength": 2, + "maxLength": 2, + "items": { + "type": "number", + "min": 0, + "multipleOf": 1 + } } } }, -- cgit v1.2.3 From ed19198c7891735a5ba3f118f25c608f968f746f Mon Sep 17 00:00:00 2001 From: Zach White Date: Wed, 6 Jan 2021 10:33:30 -0800 Subject: loosen up the schema to allow any pin format --- data/schemas/keyboard.jsonschema | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 9355ee49bd..f250ffd8a9 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -163,8 +163,7 @@ "items": { "oneOf": [ { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" + "type": "string" }, { "type": "null" @@ -176,15 +175,13 @@ "cols": { "type": "array", "items": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" + "type": "string" } }, "rows": { "type": "array", "items": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" + "type": "string" } } } -- cgit v1.2.3 From 82007aa03a93ba77e54f4660c80ef3749630de0c Mon Sep 17 00:00:00 2001 From: Zach White Date: Wed, 6 Jan 2021 10:37:53 -0800 Subject: Revert "loosen up the schema to allow any pin format" This reverts commit e41762be64c170f42ab3f8aa6b7e3078e5895e92. --- data/schemas/keyboard.jsonschema | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index f250ffd8a9..9355ee49bd 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -163,7 +163,8 @@ "items": { "oneOf": [ { - "type": "string" + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" }, { "type": "null" @@ -175,13 +176,15 @@ "cols": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" } }, "rows": { "type": "array", "items": { - "type": "string" + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" } } } -- cgit v1.2.3 From 30331b383f9ef4620e47aa07e4f9af7fae9d30b3 Mon Sep 17 00:00:00 2001 From: Zach White Date: Fri, 8 Jan 2021 00:00:15 -0800 Subject: fix bugs triggered by certain boards --- data/schemas/keyboard.jsonschema | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 9355ee49bd..e13771e92a 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -166,6 +166,10 @@ "type": "string", "pattern": "^[A-K]\\d{1,2}$" }, + { + "type": "number", + "multipleOf": 1 + }, { "type": "null" } @@ -176,15 +180,37 @@ "cols": { "type": "array", "items": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + { + "type": "number", + "multipleOf": 1 + }, + { + "type": "null" + } + ] } }, "rows": { "type": "array", "items": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + { + "type": "number", + "multipleOf": 1 + }, + { + "type": "null" + } + ] } } } -- cgit v1.2.3 From 962bc8d9dd413690dbeadeaac971a5389697210f Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 9 Jan 2021 13:34:14 -0800 Subject: Use the schema to eliminate custom code (#11108) * use the schema to eliminate custom code * Update docs/reference_info_json.md Co-authored-by: Ryan * make flake8 happy * bugfix * do not overwrite make vars from json Co-authored-by: Ryan --- data/schemas/keyboard.jsonschema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index e13771e92a..f76c7fd189 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -25,7 +25,7 @@ }, "processor": { "type": "string", - "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4"] + "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4", "unknown"] }, "bootloader": { "type": "string", -- cgit v1.2.3 From eaa9106ec74591593e638ac015a5c90d17b30612 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 9 Jan 2021 20:18:47 -0800 Subject: Add support for specifying BOARD in info.json (#11492) * add support for specifying BOARD in info.json * move BOARD from rules.mk to info.json for clueboard * fix keyboards that do not require board * remove out of compliance values --- data/schemas/keyboard.jsonschema | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index f76c7fd189..0b3d6f393d 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -27,6 +27,11 @@ "type": "string", "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4", "unknown"] }, + "board": { + "type": "string", + "minLength": 2, + "pattern": "^[a-zA-Z_][0-9a-zA-Z_]*$" + }, "bootloader": { "type": "string", "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"] -- cgit v1.2.3 From 625f29368b7408db4375b412064dafa4dfa4bb35 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 25 Jan 2021 22:00:47 +1100 Subject: Update list of MCUs in keyboard.jsonschema to mirror qmk.constants.py (#11688) --- data/schemas/keyboard.jsonschema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 0b3d6f393d..3dba21bc0f 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -25,7 +25,7 @@ }, "processor": { "type": "string", - "enum": ["MK20DX128", "MK20DX256", "MKL26Z64", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "at90usb1286", "at90usb646", "atmega16u2", "atmega328p", "atmega32a", "atmega32u2", "atmega32u4", "attiny85", "cortex-m4", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] }, "board": { "type": "string", -- cgit v1.2.3 From d92ffd1157e3ecc4ae2dbf8548c45c8b0269f664 Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Sat, 30 Jan 2021 03:53:56 +0000 Subject: Adds AT90USB162 support (#11570) * at90usb162 support * fix missing bracket * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- data/schemas/keyboard.jsonschema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 3dba21bc0f..8f1c0a9157 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -25,7 +25,7 @@ }, "processor": { "type": "string", - "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] }, "board": { "type": "string", -- cgit v1.2.3 From ef6329af7c7be77b537fbfc5a5cc7105acc679f7 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 31 Jan 2021 12:46:00 -0800 Subject: Create a system to map between info.json and config.h/rules.mk (#11548) * generate rules.mk from a json mapping * generate rules.mk from a json mapping * support for config.h from json maps * improve the mapping system * document the mapping system * move data/maps to data/mappings * fix flake8 errors * fixup LED_MATRIX_DRIVER * remove product and description from the vision_division keymap level * reduce the complexity of generate-rules-mk * add tests for the generate commands * fix qmk doctor when submodules are not clean --- data/mappings/info_config.json | 42 ++++++++++++++++++++++++++++++++++++++++++ data/mappings/info_rules.json | 15 +++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 data/mappings/info_config.json create mode 100644 data/mappings/info_rules.json (limited to 'data') diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json new file mode 100644 index 0000000000..885e6d0256 --- /dev/null +++ b/data/mappings/info_config.json @@ -0,0 +1,42 @@ +# This file maps keys between `config.h` and `info.json`. It is used by QMK +# to correctly and consistently map back and forth between the two systems. +{ + # Format: + # : {"info_key": , ["value_type": ], ["to_json": ], ["to_c": ]} + # value_type: one of "array", "array.int", "int", "hex", "list", "mapping" + # to_json: Default `true`. Set to `false` to exclude this mapping from info.json + # to_c: Default `true`. Set to `false` to exclude this mapping from config.h + # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places + "DEBOUNCE": {"info_key": "debounce", "value_type": "int"} + "DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"}, + "DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false}, + "DIODE_DIRECTION": {"info_key": "diode_direction"}, + "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, + "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, + "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, + "LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"}, + "MANUFACTURER": {"info_key": "manufacturer"}, + "RGB_DI_PIN": {"info_key": "rgblight.pin"}, + "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, + "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, + "RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool"}, + "RGBLIGHT_EFFECT_ALTERNATING": {"info_key": "rgblight.animations.alternating", "value_type": "bool"}, + "RGBLIGHT_EFFECT_BREATHING": {"info_key": "rgblight.animations.breathing", "value_type": "bool"}, + "RGBLIGHT_EFFECT_CHRISTMAS": {"info_key": "rgblight.animations.christmas", "value_type": "bool"}, + "RGBLIGHT_EFFECT_KNIGHT": {"info_key": "rgblight.animations.knight", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RAINBOW_MOOD": {"info_key": "rgblight.animations.rainbow_mood", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RAINBOW_SWIRL": {"info_key": "rgblight.animations.rainbow_swirl", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RGB_TEST": {"info_key": "rgblight.animations.rgb_test", "value_type": "bool"}, + "RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"}, + "RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"}, + "RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"}, + "RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"}, + "RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"}, + "RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"}, + "RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"}, + "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, + "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, + "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, + "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, + "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"} +} diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json new file mode 100644 index 0000000000..97f772c4d5 --- /dev/null +++ b/data/mappings/info_rules.json @@ -0,0 +1,15 @@ +# This file maps keys between `rules.mk` and `info.json`. It is used by QMK +# to correctly and consistently map back and forth between the two systems. +{ + # Format: + # : {"info_key": , ["value_type": ], ["to_json": ], ["to_c": ]} + # value_type: one of "array", "array.int", "int", "list", "hex", "mapping" + # to_json: Default `true`. Set to `false` to exclude this mapping from info.json + # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk + # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places + "BOARD": {"info_key": "board"}, + "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, + "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, + "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, + "MCU": {"info_key": "processor", "warn_duplicate": false}, +} -- cgit v1.2.3 From 620a946d01477b64ee2f719141aa35400c0188c6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Feb 2021 11:27:46 +1100 Subject: Add STM32G431 and STM32G474 board definitions. (#11793) * Add STM32G431 and STM32G474 board definitions. * Add docs. --- data/schemas/keyboard.jsonschema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 8f1c0a9157..967b5f9904 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -25,7 +25,7 @@ }, "processor": { "type": "string", - "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] }, "board": { "type": "string", -- cgit v1.2.3 From 1581ea48dcd48d0d3f42cc09b388c468aedec45d Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 27 Feb 2021 12:00:50 -0800 Subject: Fix develop (#12039) Fixes file encoding errors on Windows, and layouts not correctly merging into info.json. * force utf8 encoding * correctly merge layouts and layout aliases * show what aliases point to --- data/schemas/keyboard.jsonschema | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 967b5f9904..f5fb611bd2 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -85,8 +85,16 @@ "layout_aliases": { "type": "object", "additionalProperties": { - "type": "string", - "pattern": "^LAYOUT_[0-9a-z_]*$" + "oneOf": [ + { + "type": "string", + "enum": ["LAYOUT"] + }, + { + "type": "string", + "pattern": "^LAYOUT_[0-9a-z_]*$" + } + ] } }, "layouts": { -- cgit v1.2.3