mirror of https://github.com/zmkfirmware/zmk.git
79 lines
1.6 KiB
Plaintext
79 lines
1.6 KiB
Plaintext
/*
|
|
* Copyright (c) 2022 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include "zmk_uno.dtsi"
|
|
#include "zmk_uno_split-layouts.dtsi"
|
|
|
|
left_encoder: &encoder {
|
|
status = "disabled";
|
|
};
|
|
|
|
&arduino_serial {
|
|
status = "okay";
|
|
};
|
|
|
|
/ {
|
|
chosen {
|
|
zmk,physical-layout = &split_matrix_physical_layout;
|
|
};
|
|
|
|
wired_split {
|
|
compatible = "zmk,wired-split";
|
|
device = <&arduino_serial>;
|
|
};
|
|
|
|
split_matrix_transform: split_matrix_transform {
|
|
compatible = "zmk,matrix-transform";
|
|
rows = <4>;
|
|
columns = <2>;
|
|
|
|
map = <
|
|
RC(0,0) RC(0,1)
|
|
RC(1,0) RC(1,1)
|
|
|
|
RC(3,0) RC(3,1)
|
|
RC(4,0) RC(4,1)
|
|
>;
|
|
};
|
|
|
|
split_direct_matrix_transform: split_direct_matrix_transform {
|
|
compatible = "zmk,matrix-transform";
|
|
rows = <2>;
|
|
columns = <4>;
|
|
|
|
map = <
|
|
RC(0,0) RC(0,1)
|
|
RC(0,2) RC(0,3)
|
|
|
|
RC(1,0) RC(1,1)
|
|
RC(1,2) RC(1,3)
|
|
>;
|
|
};
|
|
|
|
right_encoder: right_encoder {
|
|
steps = <80>;
|
|
status = "disabled";
|
|
compatible = "alps,ec11";
|
|
a-gpios = <&arduino_header 15 GPIO_PULL_UP>;
|
|
b-gpios = <&arduino_header 14 GPIO_PULL_UP>;
|
|
};
|
|
|
|
sensors: sensors {
|
|
compatible = "zmk,keymap-sensors";
|
|
sensors = <&encoder &right_encoder>;
|
|
triggers-per-rotation = <20>;
|
|
};
|
|
};
|
|
|
|
&split_matrix_physical_layout {
|
|
kscan = <&kscan_matrix>;
|
|
transform = <&split_matrix_transform>;
|
|
};
|
|
|
|
&split_direct_physical_layout {
|
|
kscan = <&kscan_direct>;
|
|
transform = <&split_direct_matrix_transform>;
|
|
}; |