Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
onnenon committed Nov 12, 2024
1 parent cf1aa62 commit f001e76
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boards/shields/hotdog_pad/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if SHIELD_HOTDOG_PAD

config ZMK_KEYBOARD_NAME
default "Coviance Hotdog Macropad"

config ZMK_KSCAN_DIRECT_POLLING
default y

endif
5 changes: 5 additions & 0 deletions boards/shields/hotdog_pad/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Stephen Onnen
# SPDX-License-Identifier: MIT

config SHIELD_HOTDOG_PAD
def_bool $(shields_list_contains,hotdog_pad)
16 changes: 16 additions & 0 deletions boards/shields/hotdog_pad/hotdog_pad-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <physical_layouts.dtsi>

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

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>
;
};
};
5 changes: 5 additions & 0 deletions boards/shields/hotdog_pad/hotdog_pad.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Stephen Onnen
# SPDX-License-Identifier: MIT

CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
21 changes: 21 additions & 0 deletions boards/shields/hotdog_pad/hotdog_pad.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (c) 2024 Stephen Onnen
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>

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

default_layer {
bindings = < &kp N9 & kp N8 & kp N7 & kp N6 & kp N5 > ;

sensor - bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
};
};
32 changes: 32 additions & 0 deletions boards/shields/hotdog_pad/hotdog_pad.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2024 Stephen Onnen
*
* SPDX-License-Identifier: MIT
*/

/ {
chosen {
zmk,kscan = &kscan0;
};

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 10 (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";
};

};
10 changes: 10 additions & 0 deletions boards/shields/hotdog_pad/hotdog_pad.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
file_format: "1"
id: hotdog_pad
name: Hotdog Pad
type: shield
url: https://github.com/onnenon/hotdog_pad
requires: [seeed_xiao]
features:
- keys
- studio
- encoder

0 comments on commit f001e76

Please sign in to comment.