Allow encoder config from info.json (#17295)
This commit is contained in:
		
							parent
							
								
									4c39bad2e6
								
							
						
					
					
						commit
						1a400d8644
					
				
					 5 changed files with 159 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,26 @@
 | 
			
		|||
    "$schema": "https://json-schema.org/draft/2020-12/schema#",
 | 
			
		||||
    "$id": "qmk.keyboard.v1",
 | 
			
		||||
    "title": "Keyboard Information",
 | 
			
		||||
    "definitions": {
 | 
			
		||||
        "encoder_config": {
 | 
			
		||||
            "type": "object",
 | 
			
		||||
            "properties": {
 | 
			
		||||
                "rotary": {
 | 
			
		||||
                    "type": "array",
 | 
			
		||||
                    "items": {
 | 
			
		||||
                        "type": "object",
 | 
			
		||||
                        "additionalProperties": false,
 | 
			
		||||
                        "required": ["pin_a", "pin_b"],
 | 
			
		||||
                        "properties": {
 | 
			
		||||
                            "pin_a": {"$ref": "qmk.definitions.v1#/mcu_pin"},
 | 
			
		||||
                            "pin_b": {"$ref": "qmk.definitions.v1#/mcu_pin"},
 | 
			
		||||
                            "resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"} 
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "type": "object",
 | 
			
		||||
    "properties": {
 | 
			
		||||
        "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
 | 
			
		||||
| 
						 | 
				
			
			@ -113,6 +133,12 @@
 | 
			
		|||
            "type": "array",
 | 
			
		||||
            "items": {"$ref": "qmk.definitions.v1#/filename"}
 | 
			
		||||
        },
 | 
			
		||||
        "encoder": {
 | 
			
		||||
            "$ref": "#/definitions/encoder_config",
 | 
			
		||||
            "properties": {
 | 
			
		||||
                "enabled": {"type": "boolean"}
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        "features": {"$ref": "qmk.definitions.v1#/boolean_array"},
 | 
			
		||||
        "indicators": {
 | 
			
		||||
            "type": "object",
 | 
			
		||||
| 
						 | 
				
			
			@ -363,6 +389,15 @@
 | 
			
		|||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                "encoder": {
 | 
			
		||||
                    "type": "object",
 | 
			
		||||
                    "additionalProperties": false,
 | 
			
		||||
                    "properties": {
 | 
			
		||||
                        "right": {
 | 
			
		||||
                            "$ref": "#/definitions/encoder_config"
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                "main": {
 | 
			
		||||
                    "type": "string",
 | 
			
		||||
                    "enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue