Skip to content

Commit

Permalink
Merge pull request petejohanson#5 from petejohanson/soft-off-support
Browse files Browse the repository at this point in the history
feat: Add revisions and Technikable 1.1 support
  • Loading branch information
petejohanson authored Mar 27, 2024
2 parents 34ccb1c + 60b1d2e commit 1f70333
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 3 deletions.
3 changes: 3 additions & 0 deletions boards/arm/technikable/revision.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
board_check_revision(FORMAT MAJOR.MINOR.PATCH
DEFAULT_REVISION 1.0.0
VALID_REVISIONS 1.0.0 1.1.0)
4 changes: 3 additions & 1 deletion boards/arm/technikable/technikable.dts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@

kscan: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";

wakeup-source;

debounce-press-ms = <1>;
debounce-release-ms = <5>;

Expand Down
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions boards/arm/technikable/technikable_1_1_0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable soft-off by default
CONFIG_ZMK_PM_SOFT_OFF=y

38 changes: 38 additions & 0 deletions boards/arm/technikable/technikable_1_1_0.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/ {
keys {
compatible = "gpio-keys";
wakeup_key: wakeup_key {
gpios = <&gpio1 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
};

behaviors {
hw_soft_off: hw_soft_off {
compatible = "zmk,behavior-soft-off";
#binding-cells = <0>;
};
};

soft_off_direct_scan: soft_off_direct_scan {
compatible = "zmk,kscan-gpio-direct";
input-keys = <&wakeup_key>;
wakeup-source;
};

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

side_band_behavior_triggers: side_band_behavior_triggers {
compatible = "zmk,kscan-sideband-behaviors";
wakeup-source;
kscan = <&soft_off_direct_scan>;
soft_off {
column = <0>;
row = <0>;
bindings = <&hw_soft_off>;
};
};

};
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
include:
- board: technikable
- board: [email protected]
11 changes: 9 additions & 2 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: petejohanson
url-base: https://github.com/petejohanson
projects:
- name: zmk
remote: zmkfirmware
revision: main
remote: petejohanson
revision: features/soft-off-take-3
# Switch to below to use ZMK main. Will not work with the [email protected] target until
# soft off PR https://github.com/zmkfirmware/zmk/pull/2085/ is merged
#
# remote: zmkfirmware
# revision: main
import: app/west.yml
self:
path: config

0 comments on commit 1f70333

Please sign in to comment.