~ruther/qmk_firmware

7c5ef4060e32396ddcbf0fd2ea9a22f569a4e984 — Michael Stapelberg 4 years ago 8dc036c
allow LINE_PINxx for Teensy 4.x pins (#13247)

fixes https://github.com/qmk/qmk_firmware/issues/13052
2 files changed, 16 insertions(+), 1 deletions(-)

M data/schemas/keyboard.jsonschema
M lib/python/qmk/info.py
M data/schemas/keyboard.jsonschema => data/schemas/keyboard.jsonschema +13 -1
@@ 180,6 180,10 @@
                                    "pattern": "^[A-K]\\d{1,2}$"
                                },
                                {
                                    "type": "string",
                                    "pattern": "^LINE_PIN\\d{1,2}$"
                                },
                                {
                                    "type": "number",
                                    "multipleOf": 1
                                },


@@ 199,6 203,10 @@
                                "pattern": "^[A-K]\\d{1,2}$"
                            },
                            {
                                "type": "string",
                                "pattern": "^LINE_PIN\\d{1,2}$"
                            },
                            {
                                "type": "number",
                                "multipleOf": 1
                            },


@@ 217,6 225,10 @@
                                "pattern": "^[A-K]\\d{1,2}$"
                            },
                            {
                                "type": "string",
                                "pattern": "^LINE_PIN\\d{1,2}$"
                            },
                            {
                                "type": "number",
                                "multipleOf": 1
                            },


@@ 261,7 273,7 @@
                },
                "pin": {
                    "type": "string",
                    "pattern": "^[A-K]\\d{1,2}$"
                    "pattern": "^([A-K]\\d{1,2}|LINE_PIN\\d{1,2})$"
                },
                "saturation_steps": {
                    "type": "number",

M lib/python/qmk/info.py => lib/python/qmk/info.py +3 -0
@@ 146,6 146,9 @@ def _pin_name(pin):
    elif pin[0] in 'ABCDEFGHIJK' and pin[1].isdigit():
        return pin

    elif pin.startswith('LINE_PIN'):
        return pin

    raise ValueError(f'Invalid pin: {pin}')