-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdc51a9
commit 46b5323
Showing
5 changed files
with
66 additions
and
89 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
/ { | ||
chosen { | ||
zmk,matrix-transform = &default_transform; | ||
zmk,battery = &vbatt; | ||
}; | ||
|
||
vbatt: vbatt { | ||
compatible = "zmk,battery-voltage-divider"; | ||
label = "BATTERY"; | ||
io-channels = <&adc 2>; | ||
output-ohms = <2000000>; | ||
full-ohms = <(2000000 +806000)>; | ||
}; | ||
|
||
|
||
default_transform: keymap_transform_0 { | ||
compatible = "zmk,matrix-transform"; | ||
rows = <4>; | ||
columns = <10>; | ||
|
||
map = < | ||
RC(0, 0) RC(0, 1) RC(0, 2) RC(0, 3) RC(0, 4) RC(0, 5) RC(0, 6) RC(0, 7) RC(0, 8) RC(0, 9) | ||
RC(1, 0) RC(1, 1) RC(1, 2) RC(1, 3) RC(1, 4) RC(1, 5) RC(1, 6) RC(1, 7) RC(1, 8) RC(1, 9) | ||
RC(2, 0) RC(2, 1) RC(2, 2) RC(2, 3) RC(2, 4) RC(2, 5) RC(2, 6) RC(2, 7) RC(2, 8) RC(2, 9) | ||
RC(3, 3) RC(3, 4) RC(3, 5) RC(3, 6) | ||
>; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,20 @@ | ||
#include <dt-bindings/zmk/matrix_transform.h> | ||
|
||
/ { | ||
chosen { | ||
zmk,kscan = &kscan; | ||
zmk,matrix_transform = &transform; | ||
zmk,battery = &vbatt; | ||
}; | ||
|
||
vbatt: vbatt { | ||
compatible = "zmk,battery-voltage-divider"; | ||
label = "BATTERY"; | ||
io-channels = <&adc 2>; | ||
output-ohms = <2000000>; | ||
full-ohms = <(2000000 +806000)>; | ||
}; | ||
|
||
kscan: kscan { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
label = "KSCAN"; | ||
diode-direction = "col2row"; | ||
|
||
row-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; | ||
|
||
col-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio1 6 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 20 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 22 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 24 (GPIO_ACTIVE_HIGH)>; | ||
}; | ||
#include "ergoalex.dtsi" | ||
|
||
&kscan0 { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
diode-direction = "col2row"; | ||
row-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; | ||
|
||
col-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio1 6 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 20 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 22 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 24 (GPIO_ACTIVE_HIGH)>; | ||
}; | ||
|
||
transform: matrix_transform { | ||
compatible = "zmk,matrix-transform"; | ||
rows = <4>; | ||
columns = <10>; | ||
|
||
|
||
map = < | ||
RC(0, 0) RC(0, 1) RC(0, 2) RC(0, 3) RC(0, 4) RC(0, 5) RC(0, 6) RC(0, 7) RC(0, 8) RC(0, 9) | ||
RC(1, 0) RC(1, 1) RC(1, 2) RC(1, 3) RC(1, 4) RC(1, 5) RC(1, 6) RC(1, 7) RC(1, 8) RC(1, 9) | ||
RC(2, 0) RC(2, 1) RC(2, 2) RC(2, 3) RC(2, 4) RC(2, 5) RC(2, 6) RC(2, 7) RC(2, 8) RC(2, 9) | ||
RC(3, 3) RC(3, 4) RC(3, 5) RC(3, 6) | ||
>; | ||
}; | ||
}; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,23 @@ | ||
#include <dt-bindings/zmk/matrix_transform.h> | ||
#include "ergoalex.dtsi" | ||
|
||
/ { | ||
chosen { | ||
zmk,kscan = &kscan; | ||
zmk,matrix_transform = &transform; | ||
zmk,battery = &vbatt; | ||
}; | ||
|
||
vbatt: vbatt { | ||
compatible = "zmk,battery-voltage-divider"; | ||
label = "BATTERY"; | ||
io-channels = <&adc 2>; | ||
output-ohms = <2000000>; | ||
full-ohms = <(2000000 +806000)>; | ||
}; | ||
|
||
kscan: kscan { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
label = "KSCAN"; | ||
diode-direction = "col2row"; | ||
|
||
row-gpios = <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; | ||
&default_transform { | ||
col-offset = <5>; | ||
}; | ||
|
||
col-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio1 11 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 9 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 10 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 31 (GPIO_ACTIVE_HIGH)>; | ||
}; | ||
&kscan0 { | ||
compatible = "zmk,kscan-gpio-matrix"; | ||
diode-direction = "col2row"; | ||
row-gpios = <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, | ||
<&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; | ||
|
||
col-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio1 11 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 9 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 10 (GPIO_ACTIVE_HIGH)>, | ||
<&gpio0 31 (GPIO_ACTIVE_HIGH)>; | ||
}; | ||
|
||
transform: matrix_transform { | ||
compatible = "zmk,matrix-transform"; | ||
rows = <4>; | ||
columns = <10>; | ||
|
||
map = < | ||
RC(0, 0) RC(0, 1) RC(0, 2) RC(0, 3) RC(0, 4) RC(0, 5) RC(0, 6) RC(0, 7) RC(0, 8) RC(0, 9) | ||
RC(1, 0) RC(1, 1) RC(1, 2) RC(1, 3) RC(1, 4) RC(1, 5) RC(1, 6) RC(1, 7) RC(1, 8) RC(1, 9) | ||
RC(2, 0) RC(2, 1) RC(2, 2) RC(2, 3) RC(2, 4) RC(2, 5) RC(2, 6) RC(2, 7) RC(2, 8) RC(2, 9) | ||
RC(3, 3) RC(3, 4) RC(3, 5) RC(3, 6) | ||
>; | ||
}; | ||
}; | ||
|