Skip to content

Commit

Permalink
Try soft off
Browse files Browse the repository at this point in the history
  • Loading branch information
awkannan committed Aug 21, 2024
1 parent 34b57c2 commit 3a53364
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/bakeneko60_go.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// | BT 4 | | | | | | | |
// ------------------------------------------------------------------------------------------------
bindings = <
&bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &studio_unlock &studio_unlock
&bt BT_CLR &trans &trans &trans &trans &soft_off &trans &trans &trans &trans &trans &trans &trans &studio_unlock &studio_unlock
&bt BT_SEL 0 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&bt BT_SEL 1 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset
&bt BT_SEL 2 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
Expand Down
19 changes: 19 additions & 0 deletions config/boards/arm/bakeneko60_go/bakeneko60_go.dts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
;
};

keys {
compatible = "gpio-keys";
soft_off_gpio_key: soft_off_gpio_key {
gpios = <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
};
};

wakeup_scan: wakeup_scan {
compatible = "zmk,gpio-key-wakeup-trigger";
trigger = <&soft_off_gpio_key>;
wakeup-source;
extra-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>
};

soft_off_wakers {
compatible = "zmk,soft-off-wakeup-sources";
wakeup-sources = <&wakeup_scan>;
};

leds {
compatible = "gpio-leds";
blue_led: led_0 {
Expand Down
1 change: 1 addition & 0 deletions config/boards/arm/bakeneko60_go/bakeneko60_go_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=10
CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=50

CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_PM_SOFT_OFF=y

# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y

0 comments on commit 3a53364

Please sign in to comment.