Skip to content

Commit

Permalink
update things
Browse files Browse the repository at this point in the history
  • Loading branch information
onnenon committed Nov 12, 2024
1 parent 9d7b9c6 commit 06d928b
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 72 deletions.
26 changes: 13 additions & 13 deletions boards/shields/hotdog_pad/hotdog_pad-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include <hotdog_pad-layouts.dtsi>
#include <physical_layouts.dtsi>

/ {
physical_layout0: physical_layout_0 {
compatible = "zmk,physical-layout";
display-name = "Default";

keys
= <&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>
;
};
physical_layout0: physical_layout_0 {
compatible = "zmk,physical-layout";
display-name = "Default";
keys
= <&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>
;
};
};
48 changes: 24 additions & 24 deletions boards/shields/hotdog_pad/hotdog_pad.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
#include <dt-bindings/zmk/keys.h>

/ {
keymap {
compatible = "zmk,keymap";

base {
display-name = "Base";
bindings = <
&kp N1
&kp N2
&kp N3
&kp N4
&kp C_MUTE
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};

extra1 {
status = "reserved";
};

extra2 {
status = "reserved";
};
};
keymap {
compatible = "zmk,keymap";
base {
display-name = "Base";
bindings = <
&kp N1
&kp N2
&kp N3
&kp N4
&kp C_MUTE
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
extra1 {
status = "reserved";
};
extra2 {
status = "reserved";
};
};
};
71 changes: 36 additions & 35 deletions boards/shields/hotdog_pad/hotdog_pad.overlay
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
/*
* Copyright (c) 2024 Stephen Onnen
*
* SPDX-License-Identifier: MIT
*/
* Copyright (c) 2024 Stephen Onnen
*
* SPDX-License-Identifier: MIT
*/

/ {
chosen {
zmk,kscan = &kscan0;
zmk,physical-layout = &physical_layout0;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";

input-gpios
= <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};

encoder: encoder {
compatible = "alps,ec11";
a-gpios = <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
b-gpios = <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};

sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&encoder>;
triggers-per-rotation = <20>;
};
#include <hotdog_pad-layouts.dtsi>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,physical-layout = &physical_layout0;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";

input-gpios
= <&xiao_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&xiao_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};

encoder: encoder {
compatible = "alps,ec11";
a-gpios = <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
b-gpios = <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
steps = <80>;
status = "okay";
};

sensors: sensors {
compatible = "zmk,keymap-sensors";
sensors = <&encoder>;
triggers-per-rotation = <20>;
};
};

0 comments on commit 06d928b

Please sign in to comment.