/*
 * Copyright (c) 2025 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <physical_layouts.dtsi>

/ {
    tester_position_map {
        compatible = "zmk,physical-layout-position-map";
        complete;

        pinout_map: pinout_positions {
            physical-layout = <&physical_layout0>;
            positions = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25>;
        };
        inline_map: single_row_positions {
            physical-layout = <&physical_layout1>;
            positions = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25>;
        };
    };

    physical_layout0: physical_layout_0 {
        compatible = "zmk,physical-layout";
        display-name = "Rpi Pico Pinout";

        kscan = <&kscan0>;
        transform = <&matrix_transform0>;

        keys  //                     w   h    x    y     rot    rx    ry
            = <&key_physical_attrs 100 100    0    0       0     0     0>
            , <&key_physical_attrs 100 100    0  100       0     0     0>
            , <&key_physical_attrs 100 100    0  300       0     0     0>
            , <&key_physical_attrs 100 100    0  400       0     0     0>
            , <&key_physical_attrs 100 100    0  500       0     0     0>
            , <&key_physical_attrs 100 100    0  600       0     0     0>
            , <&key_physical_attrs 100 100    0  800       0     0     0>
            , <&key_physical_attrs 100 100    0  900       0     0     0>
            , <&key_physical_attrs 100 100    0 1000       0     0     0>
            , <&key_physical_attrs 100 100    0 1100       0     0     0>
            , <&key_physical_attrs 100 100    0 1300       0     0     0>
            , <&key_physical_attrs 100 100    0 1400       0     0     0>
            , <&key_physical_attrs 100 100    0 1500       0     0     0>
            , <&key_physical_attrs 100 100    0 1600       0     0     0>
            , <&key_physical_attrs 100 100    0 1800       0     0     0>
            , <&key_physical_attrs 100 100    0 1900       0     0     0>
            , <&key_physical_attrs 100 100  600 1900       0     0     0>
            , <&key_physical_attrs 100 100  600 1800       0     0     0>
            , <&key_physical_attrs 100 100  600 1600       0     0     0>
            , <&key_physical_attrs 100 100  600 1500       0     0     0>
            , <&key_physical_attrs 100 100  600 1400       0     0     0>
            , <&key_physical_attrs 100 100  600 1300       0     0     0>
            , <&key_physical_attrs 100 100  600 1100       0     0     0>
            , <&key_physical_attrs 100 100  600  900       0     0     0>
            , <&key_physical_attrs 100 100  600  800       0     0     0>
            , <&key_physical_attrs 100 100  600  600       0     0     0>
            ;
    };

    physical_layout1: physical_layout_1 {
        compatible = "zmk,physical-layout";
        display-name = "Single Row";

        // Single row of eighteen "keys", in ascending "Arduino" order.
        keys  //                     w   h    x    y    rot   rx   ry
            = <&key_physical_attrs 100 100    0    0      0    0    0>
            , <&key_physical_attrs 100 100  100    0      0    0    0>
            , <&key_physical_attrs 100 100  200    0      0    0    0>
            , <&key_physical_attrs 100 100  300    0      0    0    0>
            , <&key_physical_attrs 100 100  400    0      0    0    0>
            , <&key_physical_attrs 100 100  500    0      0    0    0>
            , <&key_physical_attrs 100 100  600    0      0    0    0>
            , <&key_physical_attrs 100 100  700    0      0    0    0>
            , <&key_physical_attrs 100 100  800    0      0    0    0>
            , <&key_physical_attrs 100 100  900    0      0    0    0>
            , <&key_physical_attrs 100 100 1000    0      0    0    0>
            , <&key_physical_attrs 100 100 1100    0      0    0    0>
            , <&key_physical_attrs 100 100 1200    0      0    0    0>
            , <&key_physical_attrs 100 100 1300    0      0    0    0>
            , <&key_physical_attrs 100 100 1400    0      0    0    0>
            , <&key_physical_attrs 100 100 1500    0      0    0    0>
            , <&key_physical_attrs 100 100 1600    0      0    0    0>
            , <&key_physical_attrs 100 100 1700    0      0    0    0>
            , <&key_physical_attrs 100 100 1800    0      0    0    0>
            , <&key_physical_attrs 100 100 1900    0      0    0    0>
            , <&key_physical_attrs 100 100 2000    0      0    0    0>
            , <&key_physical_attrs 100 100 2100    0      0    0    0>
            , <&key_physical_attrs 100 100 2200    0      0    0    0>
            , <&key_physical_attrs 100 100 2300    0      0    0    0>
            , <&key_physical_attrs 100 100 2400    0      0    0    0>
            , <&key_physical_attrs 100 100 2500    0      0    0    0>
            ;
    };
};
