zmk_mf68/app/boards/shields/petejohanson_handwire/petejohanson_handwire.overlay
Pete Johanson d35a95c7af Initial working Clueboard California Macropad w/ proton-c fixes
* Basic Clueboard Californai Macropad shield definition.
* New "direct" KSCAN driver that supports non-matrix direct
  wiring for switches, needed for macropad that doesn't have
  a matrix at all.
* Some renames for existing KSCAN GPIO driver to make the implied
  "matrix" part explicit.
2020-06-24 10:14:27 -04:00

44 lines
1 KiB
Text

/ {
chosen {
zmk,kscan = &kscan0;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-composite";
label = "KSCAN_COMP";
rows = <2>;
columns = <4>;
left {
kscan = <&left_hand>;
};
right {
kscan = <&right_hand>;
column-offset = <2>;
};
};
left_hand: kscan_1 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_LEFT";
diode-direction = "row2col";
row-gpios = <&arduino_header 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
col-gpios = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
right_hand: kscan_2 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN_RIGHT";
diode-direction = "row2col";
row-gpios = <&arduino_header 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
col-gpios = <&arduino_header 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>,
<&arduino_header 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};