Merge remote-tracking branch 'upstream/main' into battery-report-ble-config-2
This commit is contained in:
commit
b74f58c42e
27 changed files with 138 additions and 73 deletions
|
@ -43,7 +43,7 @@
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
mid_encoder: encoder_mid {
|
||||
|
@ -51,7 +51,7 @@
|
|||
label = "MID_ENCODER";
|
||||
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
right_encoder: encoder_right {
|
||||
|
@ -59,7 +59,7 @@
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
|||
compatible = "zmk,keymap-sensors";
|
||||
status = "disabled";
|
||||
sensors = <>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,7 +35,7 @@
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
|
@ -76,7 +77,7 @@
|
|||
label = "ENCODER_ONE";
|
||||
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -85,7 +86,7 @@
|
|||
label = "ENCODER_TWO";
|
||||
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -94,7 +95,7 @@
|
|||
label = "encoder_3";
|
||||
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
label = "TOP_ENCODER";
|
||||
a-gpios = <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -48,13 +48,14 @@
|
|||
label = "BOTTOM_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&top_encoder &bottom_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -23,20 +23,21 @@
|
|||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
// TODO: RGB node(s)
|
||||
|
|
|
@ -51,12 +51,13 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1 &encoder_2>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
label = "Encoder 2";
|
||||
a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
keymap {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -43,12 +43,13 @@
|
|||
label = "encoder";
|
||||
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
|
@ -43,13 +43,14 @@ RC(3,0) RC(3,1) RC(3,2)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
// TODO: per-key RGB node(s)?
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
keymap {
|
||||
|
|
|
@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ 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(2,10
|
|||
left_encoder: left_encoder {
|
||||
compatible = "alps,ec11";
|
||||
label = "L_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
|
||||
a-gpios = <&pro_micro 4 GPIO_PULL_UP>;
|
||||
|
@ -58,16 +58,17 @@ 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(2,10
|
|||
right_encoder: right_encoder {
|
||||
compatible = "alps,ec11";
|
||||
label = "R_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
|
||||
a-gpios = <&pro_micro 19 GPIO_PULL_UP>;
|
||||
b-gpios = <&pro_micro 18 GPIO_PULL_UP>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7)
|
|||
left_encoder: left_encoder {
|
||||
compatible = "alps,ec11";
|
||||
label = "L_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
|
||||
a-gpios = <&pro_micro 5 GPIO_PULL_UP>;
|
||||
|
@ -44,16 +44,17 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,1) RC(4,10) RC(3,6) RC(3,7)
|
|||
right_encoder: right_encoder {
|
||||
compatible = "alps,ec11";
|
||||
label = "R_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
|
||||
a-gpios = <&pro_micro 18 GPIO_PULL_UP>;
|
||||
b-gpios = <&pro_micro 19 GPIO_PULL_UP>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -28,34 +28,35 @@
|
|||
left_encoder1: left_encoder1 {
|
||||
compatible = "alps,ec11";
|
||||
label = "L_ENCODER1";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
left_encoder2: left_encoder2 {
|
||||
compatible = "alps,ec11";
|
||||
label = "L_ENCODER2";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder1: right_encoder1 {
|
||||
compatible = "alps,ec11";
|
||||
label = "R_ENCODER1";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder2: right_encoder2 {
|
||||
compatible = "alps,ec11";
|
||||
label = "R_ENCODER2";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder1 &right_encoder1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
label = "Top Row Encoder";
|
||||
a-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
|||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
label = "Encoder 2";
|
||||
a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
|||
label = "Encoder 3";
|
||||
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -85,7 +85,7 @@
|
|||
label = "Encoder 4";
|
||||
a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1_top_row>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
keymap {
|
||||
|
|
|
@ -50,7 +50,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -59,13 +59,14 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) R
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. Thi
|
|||
|
||||
Applies to: `compatible = "zmk,battery-nrf-vddh"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml)
|
||||
Definition file: [zmk/app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml)
|
||||
|
||||
| Property | Type | Description |
|
||||
| -------- | ------ | ------------------------- |
|
||||
|
|
|
@ -49,7 +49,7 @@ Using a dedicated thread requires more memory but prevents displays with slow up
|
|||
|
||||
You must also configure the driver for your display. ZMK provides the following display drivers:
|
||||
|
||||
- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/display/Kconfig.il0323)
|
||||
- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/display/Kconfig.il0323)
|
||||
|
||||
Zephyr provides several display drivers as well. Search for the name of your display in [Zephyr's Kconfig options](https://docs.zephyrproject.org/latest/kconfig.html) documentation.
|
||||
|
||||
|
@ -57,7 +57,7 @@ Zephyr provides several display drivers as well. Search for the name of your dis
|
|||
|
||||
See the Devicetree bindings for your display. Here are the bindings for common displays:
|
||||
|
||||
- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/display/gooddisplay%2Cil0323.yaml)
|
||||
- [IL0323](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/display/gooddisplay%2Cil0323.yaml)
|
||||
- [SSD1306 (i2c)](https://docs.zephyrproject.org/latest/build/dts/api/bindings/display/solomon,ssd1306fb-i2c.html)
|
||||
- [SSD1306 (spi)](https://docs.zephyrproject.org/latest/build/dts/api/bindings/display/solomon,ssd1306fb-spi.html)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ See [Configuration Overview](index.md) for instructions on how to change these s
|
|||
|
||||
### Kconfig
|
||||
|
||||
Definition file: [zmk/app/drivers/sensor/ec11/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/sensor/ec11/Kconfig)
|
||||
Definition file: [zmk/app/module/drivers/sensor/ec11/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/sensor/ec11/Kconfig)
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| ------------------------------- | ---- | -------------------------------- | ------- |
|
||||
|
@ -29,13 +29,55 @@ If `CONFIG_EC11` is enabled, exactly one of the following options must be set to
|
|||
|
||||
### Devicetree
|
||||
|
||||
#### Keymap Sensor Config
|
||||
|
||||
For shields/boards that export a `sensors` node configuration label, both global and per-sensor settings can be set by overriding the properties there.
|
||||
|
||||
To override the general settings, update them on the exported `sensors` node, e.g.:
|
||||
|
||||
```
|
||||
&sensors {
|
||||
triggers-per-rotation = <18>;
|
||||
};
|
||||
```
|
||||
|
||||
Per sensor overrides can be added with ordered nested nodes with the correct overrides, e.g.:
|
||||
|
||||
```
|
||||
&sensors {
|
||||
left_config {
|
||||
triggers-per-rotation = <18>;
|
||||
};
|
||||
|
||||
right_config {
|
||||
triggers-per-rotation = <24>;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
:::note
|
||||
|
||||
The names of the child nodes are not important, and are applied in order to the sensors listed in the `sensors` property of the sensors node.
|
||||
|
||||
:::
|
||||
|
||||
Applies to the node and child nodes of: `compatible = "zmk,keymap-sensors"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/zmk,keymap-sensors.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/zmk%2Ckeymap-sensors.yaml)
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ----------------------- | ---- | --------------------------------------------------------------- | ------- |
|
||||
| `triggers-per-rotation` | int | Number of times to trigger the bound behavior per full rotation | |
|
||||
|
||||
#### EC11 Nodes
|
||||
|
||||
Applies to: `compatible = "alps,ec11"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/sensor/alps,ec11.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/sensor/alps%2Cec11.yaml)
|
||||
Definition file: [zmk/app/module/dts/bindings/sensor/alps,ec11.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/alps%2Cec11.yaml)
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ------------ | ---------- | ------------------------------------- | ------- |
|
||||
| `label` | string | Unique label for the node | |
|
||||
| `a-gpios` | GPIO array | GPIO connected to the encoder's A pin | |
|
||||
| `b-gpios` | GPIO array | GPIO connected to the encoder's B pin | |
|
||||
| `resolution` | int | Number of encoder pulses per tick | 1 |
|
||||
| Property | Type | Description | Default |
|
||||
| --------- | ---------- | ---------------------------------------------- | ------- |
|
||||
| `label` | string | Unique label for the node | |
|
||||
| `a-gpios` | GPIO array | GPIO connected to the encoder's A pin | |
|
||||
| `b-gpios` | GPIO array | GPIO connected to the encoder's B pin | |
|
||||
| `steps` | int | Number of encoder pulses per complete rotation | |
|
||||
|
|
|
@ -12,7 +12,7 @@ See [Configuration Overview](index.md) for instructions on how to change these s
|
|||
Definition files:
|
||||
|
||||
- [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig)
|
||||
- [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig)
|
||||
- [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig)
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| -------------------------------------- | ---- | ---------------------------------------------------- | ------- |
|
||||
|
@ -44,7 +44,7 @@ Currently this driver does not honor the `CONFIG_ZMK_KSCAN_DEBOUNCE_*` settings.
|
|||
|
||||
Applies to: `compatible = "zmk,kscan-gpio-demux"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-demux.yaml)
|
||||
Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-demux.yaml)
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ----------------------- | ---------- | -------------------------------- | ------- |
|
||||
|
@ -60,7 +60,7 @@ Keyboard scan driver where each key has a dedicated GPIO.
|
|||
|
||||
### Kconfig
|
||||
|
||||
Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig)
|
||||
Definition file: [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig)
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| --------------------------------- | ---- | ------------------------------------------------ | ------- |
|
||||
|
@ -70,7 +70,7 @@ Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/
|
|||
|
||||
Applies to: `compatible = "zmk,kscan-gpio-direct"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml)
|
||||
Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-direct.yaml)
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- |
|
||||
|
@ -102,7 +102,7 @@ Assuming the switches connect each GPIO pin to the ground, the [GPIO flags](http
|
|||
|
||||
Keyboard scan driver where keys are arranged on a matrix with one GPIO per row and column.
|
||||
|
||||
Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/kscan/Kconfig)
|
||||
Definition file: [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig)
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| ---------------------------------------------- | ----------- | ------------------------------------------------------------------------- | ------- |
|
||||
|
@ -114,7 +114,7 @@ Definition file: [zmk/app/drivers/kscan/Kconfig](https://github.com/zmkfirmware/
|
|||
|
||||
Applies to: `compatible = "zmk,kscan-gpio-matrix"`
|
||||
|
||||
Definition file: [zmk/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/kscan/zmk%2Ckscan-gpio-matrix.yaml)
|
||||
Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-matrix.yaml)
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- |
|
||||
|
@ -284,7 +284,7 @@ Definition file: [zmk/app/dts/bindings/zmk,kscan-mock.yaml](https://github.com/z
|
|||
| `cols` | int | The number of columns in the composite matrix | |
|
||||
| `exit-after` | bool | Exit the program after running all events | false |
|
||||
|
||||
The `events` array should be defined using the macros from [dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/kscan_mock.h).
|
||||
The `events` array should be defined using the macros from [app/module/include/dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/module/include/dt-bindings/zmk/kscan_mock.h).
|
||||
|
||||
## Matrix Transform
|
||||
|
||||
|
|
|
@ -430,31 +430,36 @@ If building locally for split boards, you may need to add these lines to the spe
|
|||
In your device tree file you will need to add the following lines to define the encoder sensor:
|
||||
|
||||
```dts
|
||||
left_encoder: encoder_left {
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <PIN_A (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <PIN_B (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
```
|
||||
|
||||
Here you will have to replace PIN_A and PIN_B with the appropriate pins that your PCB utilizes for the encoder(s). For keyboards that use the Pro Micro or any of the Pro Micro replacements, Sparkfun's [Pro Micro Hookup Guide](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro) has a pinout diagram that can be useful to determine the right pins. Reference either the blue numbers labeled "Arduino" (digital pins) or the green numbers labeled "Analog" (analog pins). For pins that are labeled as both digital and analog, refer to your specific board's .dtsi file to determine how you should refer to that pin.
|
||||
Here you need to replace `PIN_A` and `PIN_B` with the appropriate pins that your PCB utilizes for the encoder(s). See [shield overlays section above](#shield-overlays) on the appropriate node label and pin number to use for GPIOs.
|
||||
|
||||
The `steps` property should corresponded to the documented pulses per rotation for the encoders used on the keyboard, typically found on the datasheet of the component. If users use different encoders when they build, the value can be overridden in their keymap.
|
||||
|
||||
Add additional encoders as necessary by duplicating the above lines, replacing `left` with whatever you would like to call your encoder, and updating the pins. Note that support for peripheral (right) side sensors over BLE is still in progress.
|
||||
|
||||
Once you have defined the encoder sensors, you will have to add them to the list of sensors:
|
||||
|
||||
```dts
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
```
|
||||
|
||||
In this example, a left_encoder and right_encoder are both added. Additional encoders can be added with spaces separating each, and the order they are added here determines the order in which you define their behavior in your keymap.
|
||||
|
||||
In addition, a default value for the number of times the sensors trigger the bound behavior per full rotation is set via the `triggers-per-rotation` property. See [Encoders Config](../config/encoders.md#devicetree) for more details.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value = "overlay">
|
||||
Add the following lines to your overlay file(s) to enable the encoder:
|
||||
|
|
Loading…
Add table
Reference in a new issue