From 9e8ee8684252aecca36c1e6f2403b0a9fd3ebf4f Mon Sep 17 00:00:00 2001 From: Nick Coutsos Date: Sun, 22 Oct 2023 12:05:49 -0400 Subject: [PATCH 01/65] chore(docs): Fix links to relocated files (#1975) --- docs/docs/config/battery.md | 2 +- docs/docs/config/displays.md | 4 ++-- docs/docs/config/encoders.md | 4 ++-- docs/docs/config/kscan.md | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 7b7e9436503..c56a30efd67 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -48,7 +48,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 | | -------- | ------ | ------------------------- | diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index a68bf26a9b9..e22f0da8fbb 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -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) diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index f6bd6de1495..97a0cc38e95 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -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 | | ------------------------------- | ---- | -------------------------------- | ------- | @@ -31,7 +31,7 @@ If `CONFIG_EC11` is enabled, exactly one of the following options must be set to 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 | | ------------ | ---------- | ------------------------------------- | ------- | diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 67c3765298a..00360c46978 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -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 From 8d09809ef0cfb29c4481e1b31327e0866c2fb902 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 18 Oct 2023 01:19:14 +0000 Subject: [PATCH 02/65] fix(docs): Updated encoder config docs. * Update new shield guide for new sensor/encoder settings. * Add DTS section to encoder config docs. Co-authored-by: Cem Aksoylar --- docs/docs/config/encoders.md | 54 +++++++++++++++++++++++++---- docs/docs/development/new-shield.md | 13 ++++--- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index 97a0cc38e95..3044b392943 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -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/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 | | diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index fa30ca38abf..0771122985b 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -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 = ; b-gpios = ; - 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. + Add the following lines to your overlay file(s) to enable the encoder: From 34c8b3f1e30725d2711d5a75cd2da8e60da7b995 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 18 Oct 2023 02:33:03 +0000 Subject: [PATCH 03/65] refactor: Update boards/shields for encoders. * Update existing boards/shields for new `steps` and `triggers-per-rotation` set up. --- app/boards/arm/bdn9/bdn9_rev2.dts | 7 ++++--- app/boards/arm/bt60/bt60.dtsi | 5 +++-- app/boards/arm/ckp/ckp.dtsi | 9 +++++---- app/boards/shields/knob_goblin/knob_goblin.overlay | 7 ++++--- app/boards/shields/kyria/kyria_common.dtsi | 7 ++++--- app/boards/shields/lily58/lily58.dtsi | 5 +++-- app/boards/shields/lotus58/lotus58.dtsi | 7 ++++--- app/boards/shields/murphpad/murphpad.keymap | 1 + app/boards/shields/murphpad/murphpad.overlay | 4 ++-- app/boards/shields/nibble/nibble.keymap | 1 + app/boards/shields/nibble/nibble.overlay | 2 +- app/boards/shields/reviung5/reviung5.overlay | 5 +++-- app/boards/shields/romac_plus/romac_plus.dtsi | 5 +++-- app/boards/shields/snap/snap.dtsi | 4 ++-- app/boards/shields/snap/snap.keymap | 1 + app/boards/shields/sofle/sofle.dtsi | 7 ++++--- .../splitkb_aurora_corne/splitkb_aurora_corne.dtsi | 7 ++++--- .../splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi | 7 ++++--- .../splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi | 11 ++++++----- app/boards/shields/tidbit/tidbit.dtsi | 10 +++++----- app/boards/shields/tidbit/tidbit.keymap | 1 + app/boards/shields/zodiark/zodiark.dtsi | 7 ++++--- 22 files changed, 69 insertions(+), 51 deletions(-) diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index d2d1c65cb8f..1b85067ce13 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -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>; }; }; diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 6e4900af53c..8a270250957 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -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"; }; diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index 6c52d620367..ec2bd6a87b6 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -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"; }; diff --git a/app/boards/shields/knob_goblin/knob_goblin.overlay b/app/boards/shields/knob_goblin/knob_goblin.overlay index d3ba8c5be79..03051ce5820 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.overlay +++ b/app/boards/shields/knob_goblin/knob_goblin.overlay @@ -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>; }; }; diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 2e10cd37df4..1056794d584 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -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) diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index ec520f6bb8a..eb427a581ba 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index e24d75e70d4..8b1c66f98df 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index ccdff9f7a71..74a852a8719 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -48,6 +48,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1 &encoder_2>; + triggers-per-rotation = <20>; }; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index 13905092e64..f175c55e1c0 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -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"; }; diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index 5b90f6c19ae..4cb6f5b021a 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -12,6 +12,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index cd1176401b7..43be6c766fc 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -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"; }; diff --git a/app/boards/shields/reviung5/reviung5.overlay b/app/boards/shields/reviung5/reviung5.overlay index 24b0f582b0e..8b885245485 100644 --- a/app/boards/shields/reviung5/reviung5.overlay +++ b/app/boards/shields/reviung5/reviung5.overlay @@ -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>; }; }; \ No newline at end of file diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 71ec87b2b94..5324174b54f 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -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)? diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index a374ad1768b..7523f35b06c 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -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"; }; diff --git a/app/boards/shields/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index 7c750f9f14c..febaff97bba 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -13,6 +13,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 71dc04d87a1..4917ca321ed 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi index a1b7b64382c..3eefdc6aeed 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi index 908356c757b..06b3ef3955c 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi index ab568a0986d..c5483af5476 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -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>; }; }; diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index fb84c89ed41..c7af200137d 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -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"; }; diff --git a/app/boards/shields/tidbit/tidbit.keymap b/app/boards/shields/tidbit/tidbit.keymap index 2e415bf8f4d..a98a2eaa28e 100644 --- a/app/boards/shields/tidbit/tidbit.keymap +++ b/app/boards/shields/tidbit/tidbit.keymap @@ -17,6 +17,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder_1_top_row>; + triggers-per-rotation = <20>; }; keymap { diff --git a/app/boards/shields/zodiark/zodiark.dtsi b/app/boards/shields/zodiark/zodiark.dtsi index cda0b1a6dae..66ebb7b47f9 100644 --- a/app/boards/shields/zodiark/zodiark.dtsi +++ b/app/boards/shields/zodiark/zodiark.dtsi @@ -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>; }; }; From c2d220fbdf2c9ae6957d080a47545aa28e3ec275 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 8 Nov 2023 22:05:53 +0000 Subject: [PATCH 04/65] refactor(hid): Use proper defines for HID values. * Add report ID defines and use them consistently. * Add defines for main item value flags to avoid magic constants. --- app/include/zmk/hid.h | 51 ++++++++++++++++++++++++++++++++----------- app/src/hid.c | 5 +++-- app/src/hog.c | 4 ++-- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index ab42adaa13e..da6bfa65a68 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -15,13 +15,43 @@ #define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL -#define COLLECTION_REPORT 0x03 +// See https://www.usb.org/sites/default/files/hid1_11.pdf section 6.2.2.4 Main Items + +#define ZMK_HID_MAIN_VAL_DATA (0x00 << 0) +#define ZMK_HID_MAIN_VAL_CONST (0x01 << 0) + +#define ZMK_HID_MAIN_VAL_ARRAY (0x00 << 1) +#define ZMK_HID_MAIN_VAL_VAR (0x01 << 1) + +#define ZMK_HID_MAIN_VAL_ABS (0x00 << 2) +#define ZMK_HID_MAIN_VAL_REL (0x01 << 2) + +#define ZMK_HID_MAIN_VAL_NO_WRAP (0x00 << 3) +#define ZMK_HID_MAIN_VAL_WRAP (0x01 << 3) + +#define ZMK_HID_MAIN_VAL_LIN (0x00 << 4) +#define ZMK_HID_MAIN_VAL_NON_LIN (0x01 << 4) + +#define ZMK_HID_MAIN_VAL_PREFERRED (0x00 << 5) +#define ZMK_HID_MAIN_VAL_NO_PREFERRED (0x01 << 5) + +#define ZMK_HID_MAIN_VAL_NO_NULL (0x00 << 6) +#define ZMK_HID_MAIN_VAL_NULL (0x01 << 6) + +#define ZMK_HID_MAIN_VAL_NON_VOL (0x00 << 7) +#define ZMK_HID_MAIN_VAL_VOL (0x01 << 7) + +#define ZMK_HID_MAIN_VAL_BIT_FIELD (0x00 << 8) +#define ZMK_HID_MAIN_VAL_BUFFERED_BYTES (0x01 << 8) + +#define ZMK_HID_REPORT_ID_KEYBOARD 0x01 +#define ZMK_HID_REPORT_ID_CONSUMER 0x02 static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), HID_USAGE(HID_USAGE_GD_KEYBOARD), HID_COLLECTION(HID_COLLECTION_APPLICATION), - HID_REPORT_ID(0x01), + HID_REPORT_ID(ZMK_HID_REPORT_ID_KEYBOARD), HID_USAGE_PAGE(HID_USAGE_KEY), HID_USAGE_MIN8(HID_USAGE_KEY_KEYBOARD_LEFTCONTROL), HID_USAGE_MAX8(HID_USAGE_KEY_KEYBOARD_RIGHT_GUI), @@ -30,14 +60,12 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_SIZE(0x01), HID_REPORT_COUNT(0x08), - /* INPUT (Data,Var,Abs) */ - HID_INPUT(0x02), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), HID_USAGE_PAGE(HID_USAGE_KEY), HID_REPORT_SIZE(0x08), HID_REPORT_COUNT(0x01), - /* INPUT (Cnst,Var,Abs) */ - HID_INPUT(0x03), + HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), HID_USAGE_PAGE(HID_USAGE_KEY), @@ -48,8 +76,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_MAX8(ZMK_HID_KEYBOARD_NKRO_MAX_USAGE), HID_REPORT_SIZE(0x01), HID_REPORT_COUNT(ZMK_HID_KEYBOARD_NKRO_MAX_USAGE + 1), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x02), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), #elif IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_HKRO) HID_LOGICAL_MIN8(0x00), HID_LOGICAL_MAX16(0xFF, 0x00), @@ -57,8 +84,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_MAX8(0xFF), HID_REPORT_SIZE(0x08), HID_REPORT_COUNT(CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x00), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), #else #error "A proper HID report type must be selected" #endif @@ -67,7 +93,7 @@ static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_CONSUMER), HID_USAGE(HID_USAGE_CONSUMER_CONSUMER_CONTROL), HID_COLLECTION(HID_COLLECTION_APPLICATION), - HID_REPORT_ID(0x02), + HID_REPORT_ID(ZMK_HID_REPORT_ID_CONSUMER), HID_USAGE_PAGE(HID_USAGE_CONSUMER), #if IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC) @@ -86,8 +112,7 @@ static const uint8_t zmk_hid_report_desc[] = { #error "A proper consumer HID report usage range must be selected" #endif HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE), - /* INPUT (Data,Ary,Abs) */ - HID_INPUT(0x00), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), HID_END_COLLECTION, }; diff --git a/app/src/hid.c b/app/src/hid.c index 2a6b5d39da2..58e5824d2e4 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -12,9 +12,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static struct zmk_hid_keyboard_report keyboard_report = { - .report_id = 1, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; + .report_id = ZMK_HID_REPORT_ID_KEYBOARD, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; -static struct zmk_hid_consumer_report consumer_report = {.report_id = 2, .body = {.keys = {0}}}; +static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, + .body = {.keys = {0}}}; // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. diff --git a/app/src/hog.c b/app/src/hog.c index 930714b092a..9ccfd9d2c0e 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -47,12 +47,12 @@ enum { }; static struct hids_report input = { - .id = 0x01, + .id = ZMK_HID_REPORT_ID_KEYBOARD, .type = HIDS_INPUT, }; static struct hids_report consumer_input = { - .id = 0x02, + .id = ZMK_HID_REPORT_ID_CONSUMER, .type = HIDS_INPUT, }; From 5b49bc10cd7251bb9a90c018410abfc557fa0e9c Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 3 Nov 2023 23:20:42 -0700 Subject: [PATCH 05/65] feat(blog): Show all posts on sidebar --- docs/docusaurus.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 701b5b997bb..20e6a75c90f 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -146,6 +146,7 @@ module.exports = { showReadingTime: true, // Please change this to your repo. editUrl: "https://github.com/zmkfirmware/zmk/edit/main/docs/", + blogSidebarCount: "ALL", }, theme: { customCss: [ From b80c0be0cedf42b58be2fc431b2a673ab9760c64 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 3 Nov 2023 23:20:23 -0700 Subject: [PATCH 06/65] feat(blog): Add keymap editor post for spotlight series Co-authored-by: Nick Coutsos --- docs/blog/2023-11-09-keymap-editor.md | 109 ++++++++++++++++++ .../editor-screenshot-dark.png | Bin 0 -> 74997 bytes .../editor-screenshot-light.png | Bin 0 -> 75097 bytes 3 files changed, 109 insertions(+) create mode 100644 docs/blog/2023-11-09-keymap-editor.md create mode 100644 docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png create mode 100644 docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png diff --git a/docs/blog/2023-11-09-keymap-editor.md b/docs/blog/2023-11-09-keymap-editor.md new file mode 100644 index 00000000000..1fe3b86772d --- /dev/null +++ b/docs/blog/2023-11-09-keymap-editor.md @@ -0,0 +1,109 @@ +--- +title: "Community Spotlight Series #1: Keymap Editor" +author: Cem Aksoylar +author_title: Documentation maintainer +author_url: https://github.com/caksoylar +author_image_url: https://avatars.githubusercontent.com/u/7876996 +tags: [keyboards, firmware, community] +--- + +import ThemedImage from '@theme/ThemedImage'; + + + +This blog post is the first in a series of posts where we highlight projects within the ZMK ecosystem that we think are cool and that the users might benefit from knowing about them. We are starting the series with a big one, [Keymap Editor] by [Nick Coutsos](https://github.com/nickcoutsos)! + +In the rest of the post we leave it to Nick himself to introduce the project, detail his goals and motivation in developing such a tool, and talk about the future of the project. Stay tuned for future installments in the series! + +## What is Keymap Editor? + +_[Keymap Editor]_ is a web based graphical editor for ZMK keymaps. It provides a visual way to manage the contents of your keymap and if nothing else offers two critical features: + +1. Automatic formatting of the keymap file, so that bindings arrays remain readable +2. Searchable behaviors, keycodes, commands, etc, so you won't have to remember if it's `LCTL` or `LCTRL` (I just had to double check myself and I guessed wrong, apparently) + +## What can Keymap Editor do? + +- Render [devicetree keymaps](/docs/features/keymaps) using pre-defined, auto-generated, or side-loadable keyboard layouts +- Integrate with a GitHub repo to streamline firmware builds, or FileSystem/Clipboard if you'd still rather build locally +- Edit [combos](/docs/features/combos), [behaviors](/docs/behaviors/key-press), [macros](/docs/behaviors/macros), [conditional layers](/docs/features/conditional-layers) and [rotary encoder bindings](/docs/behaviors/sensor-rotate) +- Manage references: moving a layer or renaming a behavior will look for references throughout your keymap and update them. + +But check back regularly, because I update pretty often. A recent significant achievement was enabling [parameterized macros](/docs/behaviors/macros#parameterized-macros) and tying it in with my existing parameter type resolution so, yeah, you can finally create that reusable macro combining bluetooth profile selection with RGB backlight colour. Or use it for an actual useful thing, even. _(See also: [Using Parameterized Macros in Keymap Editor](https://github.com/nickcoutsos/keymap-editor/wiki/Using-Parameterized-Macros-in-Keymap-Editor))_ + +My goals are, broadly: + +- **Treat code as a first-class entity:** as long as ZMK keymaps are described in devicetree code then an editor needs to produce readable devicetree code. +- **Flexibly support ZMK features:** use of any ZMK keymap feature should theoretically be achievable within the app. In some cases this can mean more initial setup _(See also: [my thoughts on implementing "autoshift"](https://github.com/nickcoutsos/keymap-editor/wiki/Autoshift-using-ZMK-behaviors))_ but having that foundation makes its easier to add shortcuts and niceties — something I do quite often now. +- **Don't get in the way of not-yet-supported features:** If a new ZMK feature is released and the app isn't able to add it natively, you can always edit your keymap file directly. While the app may not _recognize_ the new features, further changes through the app should not break your keymap. + +## History of Keymap Editor + +When I started writing Keymap Editor I had a handwired Dactyl variant running QMK. Manually editing keymap code was fine, but keeping things readable was important to me, and automating that was the best way to ensure consistency. Programmatically modifying source code was beyond me at the time so the first version persisted keymap data in JSON and spat out formatted versions of both the JSON and C keymaps. + +After switching to ZMK I added a few more features, I guess as a pandemic project, and then gradually migrated from generating a templated keymap file to manipulating devicetree syntax directly, and that has made a big difference in adding new ZMK features. + +## Why am I doing this? + +It started out as a useful tool for me. I shared it with the ZMK community and gained a little traction, and then apparently quite a bit of traction — turns out it's useful for a lot of people. + +I'm a software developer because I enjoy building things. Much of my day-to-day work isn't user facing, so seeing how helpful the keymap editor has been for people in the ZMK community is a big motivator to keep improving it. + +## Future plans + +### Runtime updates + +Streamlining the keymap update process is probably top of mind for most users, but that involves a really big _firmware_ feature, and I'm the wrong person to tackle it. + +That said, once there's a protocol I would _absolutely_ be down to integrate it as an additional keymap source. Being able to pull data directly from the keyboard should unlock a lot of possibilities and ease some of the constraints imposed by using devicetree code as a medium. + +### Simplifying behavior use + +I think a lot of people would like to see the concept of behaviors abstracted away for new users and to prompt them with + +- _"When the key is tapped..."_, +- _"When the key is held..."_, +- _"When the key is double-tapped..."_ and so on. + +Users who are less familiar with ZMK's behaviors and how they are composed may find these prompts to be more intuitive, and their answers could be mapped to an appropriate combination of behaviors managed internally by an editor. + +### Uh, what else? + +This has been long enough already, if you're looking for a feature I haven't mentioned don't assume I won't add it. Feel free to make feature requests on the GitHub repo, and I'd be happy to discuss it! + +## About Me And My Keebs + +I like computers and write software. Many in this field enjoy using mechanical +keyboards for their feel or aesthetics, but what piqued my interest was the +Dactyl keyboard. I think, ergonomics aside, I'm more interested in the DIY/maker +aspect than the collecting of keyboards and switches. + +So [I made a Dactyl](https://github.com/nickcoutsos/dactyl-flatpacked/), and +then [I made another Dactyl](https://github.com/nickcoutsos/dactyl-deskmount/) +and I made a third Dactyl that isn't interesting enough to photograph, but now +I'm using ZMK so I left room for 18650 cells. + +That last Dactyl (with MX browns and a cheap blank XDA keycap set) serves me +well the eight or so hours a day I'll spend at my desk, but I also spend a good +deal of time computing on my couch where I'll use... my Macbook's built-in +keyboard. + +In case that's not surprising enough I'll leave you with this: despite all of +the work and testing I've put into the keymap editor project, I've only updated +an actual keymap once in the last year. + +Thank you and good night. + +## More information + +- [Keymap Editor Wiki](https://github.com/nickcoutsos/keymap-editor/wiki) +- [Keymap Editor Discussions](https://github.com/nickcoutsos/keymap-editor/discussions) +- (YouTube video) [Ben Frain's overview of the Keymap Editor](https://www.youtube.com/watch?v=Vy7IoQAe3oU) + +[Keymap Editor]: http://nickcoutsos.github.io/keymap-editor diff --git a/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png b/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..166edf8ae806520abd95ab0eb7889e3b64fcc1c1 GIT binary patch literal 74997 zcmbTd1yEaE_b(iv6t_Z)yB2pRI23pH;!-G0@nFSDad(0hXz^mjp|}QjD+PjEus}<1 zc%Jv2|9s!fow@g(nM`ul-e>QnzqPaWKGE8m%6Qlm*Z=?kPvw<@E&zZ71OU*#Vxl1_ z_2(ts008QZwz|F|DLp5jtR@K+GrO3gtn<&mfB)|8?keaTNY;Du$6Il*3-t64^2=-A z-#>_$bn{577nD{ADr!b2XLk1ua7n7rycGIUT`#3>T=KP=l%A{eNB{TsE+GXST27Ie z#B>T~-fs=fntsSonZKzrKx3_l~dBijGOGK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sCbvIPUVh^Xx^KtDYSU%6p5gGyW$rpMP5=G`>~Adgc2{vTIz~GS1ad>I zzk$W34YWyO*ges09oXq+l-Jmv$d{5tTrMHEC!=RUEnQ-_zQbQ)>`In0S64~&8NpN) zH$LB^J1lo=hokCOhAd;H!9QS5TS+puR(p*j%pzMxW|GdkRQ)n4FYG~dYO@>wrMb-9 z|K#dzWx;yhhh9i(mvXEK!>>Al7sp!~1)>)&liodu2S!f9Zv%H?xhyi1&aK(^P`|{?=nMqsr*AYM6t5QuH35_ zZ4s=Xd*lkQUkbFw?*0YTi%1y{X(2+ zfI6$9f9#vJpOIF$hVX*NZ?C;F0S7B}iog|0QVkW_t?!Wj_48n?Iv|V`@eU=WVP_3hFHdI|+&(7jdi#^;qlUTwj<+@A^6-!UNrcQ; zjKq&DKSfT;bmCYp1o}8;lqmo!&ZClm7UI6-+6{mW_$-zL&yuEh|0@ZdhLvfs&taJw z(85k)wIZ=jUvgt<8 literal 0 HcmV?d00001 diff --git a/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png b/docs/blog/assets/2023-11-09-keymap-editor/editor-screenshot-light.png new file mode 100644 index 0000000000000000000000000000000000000000..cdaae5c799da8f63a5a4d1af865e63441c949049 GIT binary patch literal 75097 zcmbTdby!qg)HggJ3Q8*>jdTeJNHa)xNh1j~OUu{S zx4gXk1bO)O?c3wyXMI-@7uR;i;IghGczAQemp$c78MmGB_-WBIZmh z#>K_i+uL(0rZNPmqK8L?LCVFljkd&mvd{&hQ1rSN7w1qM+%MJr{}luovX3AiFE|r zGht_9amG1n`&;7);_MJMe{R_w)dM@3I9#b+@AnpccDLK+#=KlB@Rh9)O}iyL6-hQpPh(4aCtm;RK+t$v5@?#3V6 z1+%l!V`KgOW8&r`iH(|-{l58K_T#G!-BXz@V=)_urJyh$8yA=Uxx%=F#GYTjhUUtr zBjX1ESWJ{E@-liK7xue@FzOEo%)Ke4EXBUN{NH^n&JGI;Bl%-CF8Cyg@7>E0&yh3a zOHV;I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O8@`> literal 0 HcmV?d00001 From 91aa3378f32f5688329a663fdaba4772e069d548 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 14 Nov 2023 03:04:04 +0900 Subject: [PATCH 07/65] feat(usb): Add boot protocol support * USB boot protocol support * Use a single definition of a boot report, used for regular reports in non-6KRO, and for rollover in all branches. * Handle gaps in the zmk report when producing a boot report in HKRO mode. For .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0 17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6 bytes would not show up the single pressed key. * Disable usb status change and callback on SOF events: SOF events were introduced by the boot protocol changes, and required internally by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the usb status callback. --------- Co-authored-by: Andrew Childs --- app/Kconfig | 6 ++- app/include/zmk/hid.h | 28 +++++++++--- app/include/zmk/usb_hid.h | 6 ++- app/src/endpoints.c | 10 ++--- app/src/hid.c | 92 +++++++++++++++++++++++++++++++++++++++ app/src/usb.c | 14 ++++++ app/src/usb_hid.c | 88 ++++++++++++++++++++++++++++++++++++- 7 files changed, 229 insertions(+), 15 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 0dd9316a2a7..798cb7855d5 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -103,6 +103,11 @@ config USB_NUMOF_EP_WRITE_RETRIES config USB_HID_POLL_INTERVAL_MS default 1 +config ZMK_USB_BOOT + bool "USB Boot Protocol Support" + default y + select USB_HID_BOOT_PROTOCOL + select USB_DEVICE_SOF #ZMK_USB endif @@ -575,4 +580,3 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield" source "Kconfig.zephyr" - diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index da6bfa65a68..afe9210199f 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -116,12 +116,24 @@ static const uint8_t zmk_hid_report_desc[] = { HID_END_COLLECTION, }; -// struct zmk_hid_boot_report -// { -// uint8_t modifiers; -// uint8_t _unused; -// uint8_t keys[6]; -// } __packed; +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +#define HID_ERROR_ROLLOVER 0x1 +#define HID_BOOT_KEY_LEN 6 + +#if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_HKRO) && \ + CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE == HID_BOOT_KEY_LEN +typedef struct zmk_hid_keyboard_report_body zmk_hid_boot_report_t; +#else +struct zmk_hid_boot_report { + zmk_mod_flags_t modifiers; + uint8_t _reserved; + uint8_t keys[HID_BOOT_KEY_LEN]; +} __packed; + +typedef struct zmk_hid_boot_report zmk_hid_boot_report_t; +#endif +#endif struct zmk_hid_keyboard_report_body { zmk_mod_flags_t modifiers; @@ -179,3 +191,7 @@ bool zmk_hid_is_pressed(uint32_t usage); struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(); + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report(); +#endif diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h index 1748835eef2..777f2b48a03 100644 --- a/app/include/zmk/usb_hid.h +++ b/app/include/zmk/usb_hid.h @@ -6,4 +6,8 @@ #pragma once -int zmk_usb_hid_send_report(const uint8_t *report, size_t len); \ No newline at end of file +#include + +int zmk_usb_hid_send_keyboard_report(); +int zmk_usb_hid_send_consumer_report(); +void zmk_usb_hid_set_protocol(uint8_t protocol); diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 138e790fe72..10357d4e02d 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -121,12 +121,10 @@ struct zmk_endpoint_instance zmk_endpoints_selected(void) { } static int send_keyboard_report(void) { - struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); - switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) case ZMK_TRANSPORT_USB: { - int err = zmk_usb_hid_send_report((uint8_t *)keyboard_report, sizeof(*keyboard_report)); + int err = zmk_usb_hid_send_keyboard_report(); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); } @@ -136,6 +134,7 @@ static int send_keyboard_report(void) { #if IS_ENABLED(CONFIG_ZMK_BLE) case ZMK_TRANSPORT_BLE: { + struct zmk_hid_keyboard_report *keyboard_report = zmk_hid_get_keyboard_report(); int err = zmk_hog_send_keyboard_report(&keyboard_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); @@ -150,12 +149,10 @@ static int send_keyboard_report(void) { } static int send_consumer_report(void) { - struct zmk_hid_consumer_report *consumer_report = zmk_hid_get_consumer_report(); - switch (current_instance.transport) { #if IS_ENABLED(CONFIG_ZMK_USB) case ZMK_TRANSPORT_USB: { - int err = zmk_usb_hid_send_report((uint8_t *)consumer_report, sizeof(*consumer_report)); + int err = zmk_usb_hid_send_consumer_report(); if (err) { LOG_ERR("FAILED TO SEND OVER USB: %d", err); } @@ -165,6 +162,7 @@ static int send_consumer_report(void) { #if IS_ENABLED(CONFIG_ZMK_BLE) case ZMK_TRANSPORT_BLE: { + struct zmk_hid_consumer_report *consumer_report = zmk_hid_get_consumer_report(); int err = zmk_hog_send_consumer_report(&consumer_report->body); if (err) { LOG_ERR("FAILED TO SEND OVER HOG: %d", err); diff --git a/app/src/hid.c b/app/src/hid.c index 58e5824d2e4..689a2361e13 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -17,6 +17,13 @@ static struct zmk_hid_keyboard_report keyboard_report = { static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, .body = {.keys = {0}}}; +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +static zmk_hid_boot_report_t boot_report = {.modifiers = 0, ._reserved = 0, .keys = {0}}; +static uint8_t keys_held = 0; + +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. static int explicit_modifier_counts[8] = {0, 0, 0, 0, 0, 0, 0, 0}; @@ -85,15 +92,58 @@ int zmk_hid_unregister_mods(zmk_mod_flags_t modifiers) { return ret; } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + +static zmk_hid_boot_report_t *boot_report_rollover(uint8_t modifiers) { + boot_report.modifiers = modifiers; + for (int i = 0; i < HID_BOOT_KEY_LEN; i++) { + boot_report.keys[i] = HID_ERROR_ROLLOVER; + } + return &boot_report; +} + +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + #if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_NKRO) #define TOGGLE_KEYBOARD(code, val) WRITE_BIT(keyboard_report.body.keys[code / 8], code % 8, val) +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report() { + if (keys_held > HID_BOOT_KEY_LEN) { + return boot_report_rollover(keyboard_report.body.modifiers); + } + + boot_report.modifiers = keyboard_report.body.modifiers; + memset(&boot_report.keys, 0, HID_BOOT_KEY_LEN); + int ix = 0; + uint8_t base_code = 0; + for (int i = 0; i < (ZMK_HID_KEYBOARD_NKRO_MAX_USAGE + 1) / 8; ++i) { + if (ix == keys_held) { + break; + } + if (!keyboard_report.body.keys[i]) { + continue; + } + base_code = i * 8; + for (int j = 0; j < 8; ++j) { + if (keyboard_report.body.keys[i] & BIT(j)) { + boot_report.keys[ix++] = base_code + j; + } + } + } + return &boot_report; +} +#endif + static inline int select_keyboard_usage(zmk_key_t usage) { if (usage > ZMK_HID_KEYBOARD_NKRO_MAX_USAGE) { return -EINVAL; } TOGGLE_KEYBOARD(usage, 1); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + ++keys_held; +#endif return 0; } @@ -102,6 +152,9 @@ static inline int deselect_keyboard_usage(zmk_key_t usage) { return -EINVAL; } TOGGLE_KEYBOARD(usage, 0); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + --keys_held; +#endif return 0; } @@ -125,13 +178,52 @@ static inline bool check_keyboard_usage(zmk_key_t usage) { } \ } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +zmk_hid_boot_report_t *zmk_hid_get_boot_report() { + if (keys_held > HID_BOOT_KEY_LEN) { + return boot_report_rollover(keyboard_report.body.modifiers); + } + +#if CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE != HID_BOOT_KEY_LEN + // Form a boot report from a report of different size. + + boot_report.modifiers = keyboard_report.body.modifiers; + + int out = 0; + for (int i = 0; i < CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE; i++) { + uint8_t key = keyboard_report.body.keys[i]; + if (key) { + boot_report.keys[out++] = key; + if (out == keys_held) { + break; + } + } + } + + while (out < HID_BOOT_KEY_LEN) { + boot_report.keys[out++] = 0; + } + + return &boot_report; +#else + return &keyboard_report.body; +#endif /* CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE != HID_BOOT_KEY_LEN */ +} +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + static inline int select_keyboard_usage(zmk_key_t usage) { TOGGLE_KEYBOARD(0U, usage); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + ++keys_held; +#endif return 0; } static inline int deselect_keyboard_usage(zmk_key_t usage) { TOGGLE_KEYBOARD(usage, 0U); +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + --keys_held; +#endif return 0; } diff --git a/app/src/usb.c b/app/src/usb.c index cf04ef46c8f..9d27900c3c6 100644 --- a/app/src/usb.c +++ b/app/src/usb.c @@ -15,6 +15,8 @@ #include #include +#include + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static enum usb_dc_status_code usb_status = USB_DC_UNKNOWN; @@ -35,6 +37,7 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state() { case USB_DC_CONFIGURED: case USB_DC_RESUME: case USB_DC_CLEAR_HALT: + case USB_DC_SOF: return ZMK_USB_CONN_HID; case USB_DC_DISCONNECTED: @@ -47,6 +50,17 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state() { } void usb_status_cb(enum usb_dc_status_code status, const uint8_t *params) { + // Start-of-frame events are too frequent and noisy to notify, and they're + // not used within ZMK + if (status == USB_DC_SOF) { + return; + } + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (status == USB_DC_RESET) { + zmk_usb_hid_set_protocol(HID_PROTOCOL_REPORT); + } +#endif usb_status = status; k_work_submit(&usb_status_notifier_work); }; diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index f46c70a0a92..c72bb36c9ef 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -23,11 +23,75 @@ static K_SEM_DEFINE(hid_sem, 1, 1); static void in_ready_cb(const struct device *dev) { k_sem_give(&hid_sem); } +#define HID_GET_REPORT_TYPE_MASK 0xff00 +#define HID_GET_REPORT_ID_MASK 0x00ff + +#define HID_REPORT_TYPE_INPUT 0x100 +#define HID_REPORT_TYPE_OUTPUT 0x200 +#define HID_REPORT_TYPE_FEATURE 0x300 + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) +static uint8_t hid_protocol = HID_PROTOCOL_REPORT; + +static void set_proto_cb(const struct device *dev, uint8_t protocol) { hid_protocol = protocol; } + +void zmk_usb_hid_set_protocol(uint8_t protocol) { hid_protocol = protocol; } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + +static uint8_t *get_keyboard_report(size_t *len) { + if (hid_protocol == HID_PROTOCOL_REPORT) { + struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); + *len = sizeof(*report); + return (uint8_t *)report; + } +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); + *len = sizeof(*boot_report); + return (uint8_t *)boot_report; +#endif +} + +static int get_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, + uint8_t **data) { + + /* + * 7.2.1 of the HID v1.11 spec is unclear about handling requests for reports that do not exist + * For requested reports that aren't input reports, return -ENOTSUP like the Zephyr subsys does + */ + if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_INPUT) { + LOG_ERR("Unsupported report type %d requested", (setup->wValue & HID_GET_REPORT_TYPE_MASK) + << 8); + return -ENOTSUP; + } + + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { + case ZMK_HID_REPORT_ID_KEYBOARD: { + *data = get_keyboard_report(len); + break; + } + case ZMK_HID_REPORT_ID_CONSUMER: { + struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); + *data = (uint8_t *)report; + *len = sizeof(*report); + break; + } + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + + return 0; +} + static const struct hid_ops ops = { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + .protocol_change = set_proto_cb, +#endif .int_in_ready = in_ready_cb, + .get_report = get_report_cb, }; -int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { +static int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { switch (zmk_usb_get_status()) { case USB_DC_SUSPEND: return usb_wakeup_request(); @@ -48,6 +112,23 @@ int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { } } +int zmk_usb_hid_send_keyboard_report() { + size_t len; + uint8_t *report = get_keyboard_report(&len); + return zmk_usb_hid_send_report(report, len); +} + +int zmk_usb_hid_send_consumer_report() { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (hid_protocol == HID_PROTOCOL_BOOT) { + return -ENOTSUP; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + + struct zmk_hid_consumer_report *report = zmk_hid_get_consumer_report(); + return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); +} + static int zmk_usb_hid_init(const struct device *_arg) { hid_dev = device_get_binding("HID_0"); if (hid_dev == NULL) { @@ -56,6 +137,11 @@ static int zmk_usb_hid_init(const struct device *_arg) { } usb_hid_register_device(hid_dev, zmk_hid_report_desc, sizeof(zmk_hid_report_desc), &ops); + +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + usb_hid_set_proto_code(hid_dev, HID_BOOT_IFACE_CODE_KEYBOARD); +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + usb_hid_init(hid_dev); return 0; From c1bf35ce1de4b7d99c034300c9a813a0a3d11669 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:40:55 -0800 Subject: [PATCH 08/65] feat(build): Add support for artifact-name in build.yaml --- .github/workflows/build-user-config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index c1a97b4d6e0..5aacadca90c 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,12 +55,14 @@ jobs: - name: Prepare variables shell: sh -x {0} env: + board: ${{ matrix.board }} shield: ${{ matrix.shield }} + artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV - echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-\"${shield:+$shield-}${board}-zmk\"}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 2554b5c88f4d304f311d9f29017ac6fbe948ca7a Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:08:37 -0800 Subject: [PATCH 09/65] fix(docs): Update boards in build examples to common+uf2 ones --- docs/docs/development/build-flash.md | 6 +++--- docs/docs/development/new-shield.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index 94bbcdf93a8..0243983c9d8 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -65,7 +65,7 @@ west build -b planck_rev6 When building for a new board and/or shield after having built one previously, you may need to enable the pristine build option. This option removes all existing files in the build directory before regenerating them, and can be enabled by adding either --pristine or -p to the command: ```sh -west build -p -b proton_c -- -DSHIELD=kyria_left +west build -p -b nice_nano_v2 -- -DSHIELD=kyria_left ``` ### Building For Split Keyboards @@ -77,13 +77,13 @@ For split keyboards, you will have to build and flash each side separately the f By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build every time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by using the `-d` parameter and first building left into `build/left`: ```sh -west build -d build/left -b nice_nano -- -DSHIELD=kyria_left +west build -d build/left -b nice_nano_v2 -- -DSHIELD=kyria_left ``` and then building right into `build/right`: ```sh -west build -d build/right -b nice_nano -- -DSHIELD=kyria_right +west build -d build/right -b nice_nano_v2 -- -DSHIELD=kyria_right ``` This produces `left` and `right` subfolders under the `build` directory and two separate .uf2 files. For future work on a specific half, use the `-d` parameter again to ensure you are building into the correct location. diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 0771122985b..7f6a8644e11 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -493,7 +493,7 @@ Once you've fully created the new keyboard shield definition, you should be able to test with a build command like: ```sh -west build --pristine -b proton_c -- -DSHIELD=my_board +west build --pristine -b nice_nano_v2 -- -DSHIELD=my_board ``` The above build command generates `build/zephyr/zmk.uf2`. If your board From a5c3edd51b46f45a7fdf9ff157f69296d7a9fddb Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:22:05 -0800 Subject: [PATCH 10/65] refactor(docs): Remove local build section in customization --- docs/docs/customization.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/docs/docs/customization.md b/docs/docs/customization.md index 4f75e743a66..a68e8595fa9 100644 --- a/docs/docs/customization.md +++ b/docs/docs/customization.md @@ -11,15 +11,15 @@ This makes flashing ZMK to your keyboard much easier, especially because you don By default, the `zmk-config` folder should contain two files: -- `.conf` -- `.keymap` +- `.conf` +- `.keymap` However, your config folder can also be modified to include a `boards/` directory for keymaps and configurations for multiple boards/shields outside of the default keyboard setting definitions. ## Configuration Changes -The setup script creates a `config/.conf` file that allows you to add additional configuration options to +The setup script creates a `config/.conf` file that allows you to add additional configuration options to control what features and options are built into your firmware. Opening that file with your text editor will allow you to see the various config settings that can be commented/uncommented to modify how your firmware is built. @@ -27,7 +27,7 @@ Refer to the [Configuration](/docs/config) documentation for more details on thi ## Keymap -Once you have the basic user config completed, you can find the keymap file in `config/.keymap` and customize from there. +Once you have the basic user config completed, you can find the keymap file in `config/.keymap` and customize from there. Refer to the [Keymap](features/keymaps.md) documentation to learn more. ## Publishing @@ -39,18 +39,11 @@ GitHub Actions job to build your firmware which you can download once it complet If you need to, a review of [Learn The Basics Of Git In Under 10 Minutes](https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/) will help you get these steps right. ::: -## Building from a local `zmk` fork using `zmk-config` - -[As outlined here](development/build-flash.md), firmware comes in the form of .uf2 files, which can be built locally using the command `west build`. Normally, -`west build` will default to using the in-tree .keymap and .conf files found in your local copy of the `zmk` repository. However, you can append the command, `-DZMK_CONFIG="C:/the/absolute/path/config"` to `west build` in order to use the contents of your `zmk-config` folder instead of the -default keyboard settings. -**Notice that this path should point to the folder labelled `config` within your `zmk-config` folder.** - -For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder on Windows 10 may look something like this: - -```bash -west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" -``` +:::note +It is also possible to build firmware locally on your computer by following the [toolchain setup](development/setup.md) and +[building instructions](development/build-flash.md), which includes pointers to +[building using your `zmk-config` folder](development/build-flash.md#building-from-zmk-config-folder). +::: ## Flashing Your Changes From 7b4b5d4ff20957c3cba0d3e3eb679dd45c3181f5 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:01:31 -0800 Subject: [PATCH 11/65] fix(docs): Fix debouncing driver support note --- docs/docs/features/debouncing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/features/debouncing.md b/docs/docs/features/debouncing.md index cbea7092884..38ded2d7952 100644 --- a/docs/docs/features/debouncing.md +++ b/docs/docs/features/debouncing.md @@ -20,7 +20,7 @@ socket or using some sharp tweezers to bend the contacts back together. ## Debounce Configuration :::note -Currently only the `zmk,kscan-gpio-matrix` driver supports these options. The other drivers have not yet been updated to use the new debouncing code. +Currently the `zmk,kscan-gpio-matrix` and `zmk,kscan-gpio-direct` [drivers](../config/kscan.md) supports these options, while `zmk,kscan-gpio-demux` driver does not. ::: ### Global Options From 964c54139dcc5fca466eb2a6dc72b4092c7152a0 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 13 Nov 2023 11:00:28 -0800 Subject: [PATCH 12/65] fix(usb): Tweak how ZMK_USB gets enabled. * Previous version of multiple overrides of the default value of ZMK_USB were problematic. Move to using board _defconfig files for the defaults for those, along with proper `depends on` for ZMK_USB that accounts for split and split roles. --- app/Kconfig | 13 ++++++++----- app/boards/arm/bdn9/Kconfig.defconfig | 3 --- app/boards/arm/bdn9/bdn9_rev2_defconfig | 1 + app/boards/arm/bluemicro840/Kconfig.defconfig | 6 ------ .../arm/bluemicro840/bluemicro840_v1_defconfig | 3 +++ app/boards/arm/bt60/Kconfig.defconfig | 6 ------ app/boards/arm/bt60/bt60_v1_defconfig | 3 +++ app/boards/arm/bt60/bt60_v1_hs_defconfig | 3 +++ app/boards/arm/ckp/Kconfig.defconfig | 6 ------ app/boards/arm/ckp/bt60_v2_defconfig | 3 +++ app/boards/arm/ckp/bt65_v1_defconfig | 3 +++ app/boards/arm/ckp/bt75_v1_defconfig | 3 +++ app/boards/arm/corneish_zen/Kconfig.defconfig | 6 ------ .../arm/corneish_zen/corneish_zen_v1_left_defconfig | 3 +++ .../corneish_zen/corneish_zen_v1_right_defconfig | 3 +++ .../arm/corneish_zen/corneish_zen_v2_left_defconfig | 3 +++ .../corneish_zen/corneish_zen_v2_right_defconfig | 3 +++ app/boards/arm/dz60rgb/Kconfig.defconfig | 3 --- app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig | 2 ++ app/boards/arm/ferris/Kconfig.defconfig | 3 --- app/boards/arm/kbdfans_tofu65/Kconfig.defconfig | 3 --- .../arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig | 2 ++ app/boards/arm/mikoto/Kconfig.defconfig | 6 ------ app/boards/arm/mikoto/mikoto_520_defconfig | 3 +++ app/boards/arm/nice60/Kconfig.defconfig | 6 ------ app/boards/arm/nice60/nice60_defconfig | 4 ++++ app/boards/arm/nice_nano/Kconfig.defconfig | 6 ------ app/boards/arm/nice_nano/nice_nano_defconfig | 3 +++ app/boards/arm/nice_nano/nice_nano_v2_defconfig | 3 +++ app/boards/arm/nrf52840_m2/Kconfig.defconfig | 6 ------ app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig | 3 +++ app/boards/arm/nrfmicro/Kconfig.defconfig | 6 ------ app/boards/arm/nrfmicro/nrfmicro_11_defconfig | 3 +++ .../arm/nrfmicro/nrfmicro_11_flipped_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig | 3 +++ app/boards/arm/nrfmicro/nrfmicro_13_defconfig | 3 +++ app/boards/arm/pillbug/Kconfig.defconfig | 6 ------ app/boards/arm/pillbug/pillbug_defconfig | 3 +++ app/boards/arm/planck/Kconfig.defconfig | 3 --- app/boards/arm/planck/planck_rev6_defconfig | 2 ++ app/boards/arm/preonic/Kconfig.defconfig | 3 --- app/boards/arm/preonic/preonic_rev3_defconfig | 2 ++ app/boards/arm/proton_c/Kconfig.defconfig | 3 --- app/boards/arm/proton_c/proton_c_defconfig | 1 + app/boards/arm/puchi_ble/Kconfig.defconfig | 6 ------ app/boards/arm/puchi_ble/puchi_ble_v1_defconfig | 3 +++ app/boards/arm/s40nc/Kconfig.defconfig | 6 ------ app/boards/arm/s40nc/s40nc_defconfig | 3 +++ app/boards/shields/nibble/Kconfig.defconfig | 4 ---- app/src/split/bluetooth/Kconfig | 3 --- 50 files changed, 85 insertions(+), 105 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 798cb7855d5..282339e3e40 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -91,10 +91,18 @@ menu "Output Types" config ZMK_USB bool "USB" + depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL)) select USB select USB_DEVICE_STACK select USB_DEVICE_HID +config ZMK_USB_BOOT + bool "USB Boot Protocol Support" + default y + depends on ZMK_USB + select USB_HID_BOOT_PROTOCOL + select USB_DEVICE_SOF + if ZMK_USB config USB_NUMOF_EP_WRITE_RETRIES @@ -103,11 +111,6 @@ config USB_NUMOF_EP_WRITE_RETRIES config USB_HID_POLL_INTERVAL_MS default 1 -config ZMK_USB_BOOT - bool "USB Boot Protocol Support" - default y - select USB_HID_BOOT_PROTOCOL - select USB_DEVICE_SOF #ZMK_USB endif diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/arm/bdn9/Kconfig.defconfig index d1c82811d28..96b7fe55329 100644 --- a/app/boards/arm/bdn9/Kconfig.defconfig +++ b/app/boards/arm/bdn9/Kconfig.defconfig @@ -11,9 +11,6 @@ config BOARD config ZMK_KEYBOARD_NAME default "BDN9 Rev2" -config ZMK_USB - default y - config ZMK_RGB_UNDERGLOW select SPI select WS2812_STRIP diff --git a/app/boards/arm/bdn9/bdn9_rev2_defconfig b/app/boards/arm/bdn9/bdn9_rev2_defconfig index 24dddb932d5..05087eeb4c6 100644 --- a/app/boards/arm/bdn9/bdn9_rev2_defconfig +++ b/app/boards/arm/bdn9/bdn9_rev2_defconfig @@ -23,3 +23,4 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024 # clock configuration CONFIG_CLOCK_CONTROL=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/arm/bluemicro840/Kconfig.defconfig index 732805ae199..ff61ec92f81 100644 --- a/app/boards/arm/bluemicro840/Kconfig.defconfig +++ b/app/boards/arm/bluemicro840/Kconfig.defconfig @@ -18,10 +18,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig index 99d51a94334..3e13e77d0b5 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/bt60/Kconfig.defconfig b/app/boards/arm/bt60/Kconfig.defconfig index e7cf1a48cff..c44901bd8d4 100644 --- a/app/boards/arm/bt60/Kconfig.defconfig +++ b/app/boards/arm/bt60/Kconfig.defconfig @@ -19,12 +19,6 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config ZMK_KEYBOARD_NAME default "BT60" diff --git a/app/boards/arm/bt60/bt60_v1_defconfig b/app/boards/arm/bt60/bt60_v1_defconfig index 813dcecea5a..04adb8a3cd8 100644 --- a/app/boards/arm/bt60/bt60_v1_defconfig +++ b/app/boards/arm/bt60/bt60_v1_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/bt60/bt60_v1_hs_defconfig b/app/boards/arm/bt60/bt60_v1_hs_defconfig index f2327fd3f42..f16d82ac41d 100644 --- a/app/boards/arm/bt60/bt60_v1_hs_defconfig +++ b/app/boards/arm/bt60/bt60_v1_hs_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/ckp/Kconfig.defconfig b/app/boards/arm/ckp/Kconfig.defconfig index d5bf4ded1eb..376d4619fde 100644 --- a/app/boards/arm/ckp/Kconfig.defconfig +++ b/app/boards/arm/ckp/Kconfig.defconfig @@ -25,10 +25,4 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1 diff --git a/app/boards/arm/ckp/bt60_v2_defconfig b/app/boards/arm/ckp/bt60_v2_defconfig index f6dc7e09a68..fd1ae985995 100644 --- a/app/boards/arm/ckp/bt60_v2_defconfig +++ b/app/boards/arm/ckp/bt60_v2_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/ckp/bt65_v1_defconfig b/app/boards/arm/ckp/bt65_v1_defconfig index e40ae2dbb54..be5f17eb54f 100644 --- a/app/boards/arm/ckp/bt65_v1_defconfig +++ b/app/boards/arm/ckp/bt65_v1_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/ckp/bt75_v1_defconfig b/app/boards/arm/ckp/bt75_v1_defconfig index 510d6994dc1..b4d85338aec 100644 --- a/app/boards/arm/ckp/bt75_v1_defconfig +++ b/app/boards/arm/ckp/bt75_v1_defconfig @@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y CONFIG_SPI=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/corneish_zen/Kconfig.defconfig b/app/boards/arm/corneish_zen/Kconfig.defconfig index feab3eca773..f3cc959edd0 100644 --- a/app/boards/arm/corneish_zen/Kconfig.defconfig +++ b/app/boards/arm/corneish_zen/Kconfig.defconfig @@ -25,12 +25,6 @@ config ZMK_SPLIT config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - if USB config USB_NRFX diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig index a71ac680bb6..d738255601b 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig @@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig index f099392ff6a..5284159d83f 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_right_defconfig @@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig index 3b7b4d9e276..29a5f878ac2 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig @@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig index b361b08d9a0..506aa67e1b1 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right_defconfig @@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + # enable display drivers CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 diff --git a/app/boards/arm/dz60rgb/Kconfig.defconfig b/app/boards/arm/dz60rgb/Kconfig.defconfig index 2e30e3d048d..6e0592569de 100644 --- a/app/boards/arm/dz60rgb/Kconfig.defconfig +++ b/app/boards/arm/dz60rgb/Kconfig.defconfig @@ -8,7 +8,4 @@ if BOARD_DZ60RGB_REV1 config ZMK_KEYBOARD_NAME default "DZ60RGB Rev 1" -config ZMK_USB - default y - endif # BOARD_DZ60RGB_REV1 diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig index 33840f966ef..53bc0e11034 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1_defconfig @@ -25,3 +25,5 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9 CONFIG_CLOCK_STM32_AHB_PRESCALER=1 CONFIG_CLOCK_STM32_APB1_PRESCALER=2 CONFIG_CLOCK_STM32_APB2_PRESCALER=1 + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/ferris/Kconfig.defconfig b/app/boards/arm/ferris/Kconfig.defconfig index 7cf43bcb9e6..420ea01fab9 100644 --- a/app/boards/arm/ferris/Kconfig.defconfig +++ b/app/boards/arm/ferris/Kconfig.defconfig @@ -11,9 +11,6 @@ config BOARD config ZMK_KEYBOARD_NAME default "Ferris rev 0.2" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig index 993d51423b5..0444f510105 100644 --- a/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig +++ b/app/boards/arm/kbdfans_tofu65/Kconfig.defconfig @@ -9,7 +9,4 @@ config ZMK_KEYBOARD_NAME config RP2_FLASH_W25Q080 default y -config ZMK_USB - default y - endif # BOARD_KBDFANS_TOFU65_V2 diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig index cf546683452..57014acf37a 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2_defconfig @@ -18,3 +18,5 @@ CONFIG_USE_DT_CODE_PARTITION=y # Output UF2 by default, native bootloader supports it. CONFIG_BUILD_OUTPUT_UF2=y + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/mikoto/Kconfig.defconfig b/app/boards/arm/mikoto/Kconfig.defconfig index 8c7746dbb8e..8117cc87329 100644 --- a/app/boards/arm/mikoto/Kconfig.defconfig +++ b/app/boards/arm/mikoto/Kconfig.defconfig @@ -21,12 +21,6 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/mikoto/mikoto_520_defconfig b/app/boards/arm/mikoto/mikoto_520_defconfig index c755633e4cf..354fa56aa34 100644 --- a/app/boards/arm/mikoto/mikoto_520_defconfig +++ b/app/boards/arm/mikoto/mikoto_520_defconfig @@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice60/Kconfig.defconfig b/app/boards/arm/nice60/Kconfig.defconfig index f3347df9c6e..76818e87b0f 100644 --- a/app/boards/arm/nice60/Kconfig.defconfig +++ b/app/boards/arm/nice60/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NICE60 diff --git a/app/boards/arm/nice60/nice60_defconfig b/app/boards/arm/nice60/nice60_defconfig index 48936a04704..fabcb7eddf4 100644 --- a/app/boards/arm/nice60/nice60_defconfig +++ b/app/boards/arm/nice60/nice60_defconfig @@ -28,3 +28,7 @@ CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 + + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice_nano/Kconfig.defconfig b/app/boards/arm/nice_nano/Kconfig.defconfig index ada59dd9f2e..63102a571f9 100644 --- a/app/boards/arm/nice_nano/Kconfig.defconfig +++ b/app/boards/arm/nice_nano/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2 diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/arm/nice_nano/nice_nano_defconfig index a837b7d2875..6b7fcab252d 100644 --- a/app/boards/arm/nice_nano/nice_nano_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_defconfig @@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nice_nano/nice_nano_v2_defconfig b/app/boards/arm/nice_nano/nice_nano_v2_defconfig index 667cf71aca2..6b5044e5ef0 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2_defconfig +++ b/app/boards/arm/nice_nano/nice_nano_v2_defconfig @@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/arm/nrf52840_m2/Kconfig.defconfig index 50a049bb926..a5227fc0a10 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig index b7671ba9f12..93eef9e6ef8 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig @@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig index 7d752ac6ee6..659e9c5c173 100644 --- a/app/boards/arm/nrfmicro/Kconfig.defconfig +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -18,12 +18,6 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig index b51929b0c8f..5ba4d6e1478 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig index 335a2d75b12..31cbfc9ae75 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig index 4af1ff86a7c..f459f35636a 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig index 43ba40e2dc3..9ffb2766a66 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig +++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig @@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/pillbug/Kconfig.defconfig b/app/boards/arm/pillbug/Kconfig.defconfig index 8657f8aea30..48427ed3ec2 100644 --- a/app/boards/arm/pillbug/Kconfig.defconfig +++ b/app/boards/arm/pillbug/Kconfig.defconfig @@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_PILLBUG diff --git a/app/boards/arm/pillbug/pillbug_defconfig b/app/boards/arm/pillbug/pillbug_defconfig index 9781cf995cc..9ec72c417ef 100644 --- a/app/boards/arm/pillbug/pillbug_defconfig +++ b/app/boards/arm/pillbug/pillbug_defconfig @@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/planck/Kconfig.defconfig b/app/boards/arm/planck/Kconfig.defconfig index d1304da0588..69dea84ce54 100644 --- a/app/boards/arm/planck/Kconfig.defconfig +++ b/app/boards/arm/planck/Kconfig.defconfig @@ -8,9 +8,6 @@ if BOARD_PLANCK_REV6 config ZMK_KEYBOARD_NAME default "Planck V6" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/planck/planck_rev6_defconfig b/app/boards/arm/planck/planck_rev6_defconfig index a78ea45de88..74050f3d9c1 100644 --- a/app/boards/arm/planck/planck_rev6_defconfig +++ b/app/boards/arm/planck/planck_rev6_defconfig @@ -15,3 +15,5 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +CONFIG_ZMK_USB=y diff --git a/app/boards/arm/preonic/Kconfig.defconfig b/app/boards/arm/preonic/Kconfig.defconfig index 186c88bc5e3..86b2e3d0ef4 100644 --- a/app/boards/arm/preonic/Kconfig.defconfig +++ b/app/boards/arm/preonic/Kconfig.defconfig @@ -8,9 +8,6 @@ if BOARD_PREONIC_REV3 config ZMK_KEYBOARD_NAME default "Preonic V3" -config ZMK_USB - default y - config ZMK_KSCAN_MATRIX_POLLING default y diff --git a/app/boards/arm/preonic/preonic_rev3_defconfig b/app/boards/arm/preonic/preonic_rev3_defconfig index ab19d10f6f8..e063827a4e2 100644 --- a/app/boards/arm/preonic/preonic_rev3_defconfig +++ b/app/boards/arm/preonic/preonic_rev3_defconfig @@ -13,3 +13,5 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/proton_c/Kconfig.defconfig b/app/boards/arm/proton_c/Kconfig.defconfig index f5089119c13..eed4b830442 100644 --- a/app/boards/arm/proton_c/Kconfig.defconfig +++ b/app/boards/arm/proton_c/Kconfig.defconfig @@ -8,7 +8,4 @@ if BOARD_QMK_PROTON_C config BOARD default "proton_c" -config ZMK_USB - default y - endif # BOARD_QMK_PROTON_C diff --git a/app/boards/arm/proton_c/proton_c_defconfig b/app/boards/arm/proton_c/proton_c_defconfig index 32e1ade9604..c552bf15df9 100644 --- a/app/boards/arm/proton_c/proton_c_defconfig +++ b/app/boards/arm/proton_c/proton_c_defconfig @@ -17,3 +17,4 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y +CONFIG_ZMK_USB=y \ No newline at end of file diff --git a/app/boards/arm/puchi_ble/Kconfig.defconfig b/app/boards/arm/puchi_ble/Kconfig.defconfig index c4fca8e1f31..3533104b2a5 100644 --- a/app/boards/arm/puchi_ble/Kconfig.defconfig +++ b/app/boards/arm/puchi_ble/Kconfig.defconfig @@ -16,12 +16,6 @@ endif # USB_DEVICE_STACK config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - config PINMUX default y diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig index 1adb9217c8a..ab197df0a80 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig +++ b/app/boards/arm/puchi_ble/puchi_ble_v1_defconfig @@ -25,3 +25,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_CLOCK_CONTROL_NRF=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/arm/s40nc/Kconfig.defconfig b/app/boards/arm/s40nc/Kconfig.defconfig index 11e62cf54c5..f892f392d5c 100644 --- a/app/boards/arm/s40nc/Kconfig.defconfig +++ b/app/boards/arm/s40nc/Kconfig.defconfig @@ -19,10 +19,4 @@ endif # USB config BT_CTLR default BT -config ZMK_BLE - default y - -config ZMK_USB - default y - endif # BOARD_S40NC diff --git a/app/boards/arm/s40nc/s40nc_defconfig b/app/boards/arm/s40nc/s40nc_defconfig index 31972781db1..b523ceb80b7 100644 --- a/app/boards/arm/s40nc/s40nc_defconfig +++ b/app/boards/arm/s40nc/s40nc_defconfig @@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y + +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y \ No newline at end of file diff --git a/app/boards/shields/nibble/Kconfig.defconfig b/app/boards/shields/nibble/Kconfig.defconfig index 31ac7cfe7dd..19bddec77b8 100644 --- a/app/boards/shields/nibble/Kconfig.defconfig +++ b/app/boards/shields/nibble/Kconfig.defconfig @@ -6,10 +6,6 @@ if SHIELD_NIBBLE config ZMK_KEYBOARD_NAME default "NIBBLE" -config ZMK_USB - default y - - if ZMK_DISPLAY config I2C diff --git a/app/src/split/bluetooth/Kconfig b/app/src/split/bluetooth/Kconfig index 5919010ba31..858e7308fef 100644 --- a/app/src/split/bluetooth/Kconfig +++ b/app/src/split/bluetooth/Kconfig @@ -62,9 +62,6 @@ config ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE int "Max number of key position state events to queue to send to the central" default 10 -config ZMK_USB - default n - config BT_MAX_PAIRED default 1 From afe65ead9c0f1418fa34bfa93325d0cce33c6c2c Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Mon, 13 Nov 2023 16:50:00 -0500 Subject: [PATCH 13/65] Revert "feat(build): Add support for artifact-name in build.yaml" This reverts commit c1bf35ce1de4b7d99c034300c9a813a0a3d11669. --- .github/workflows/build-user-config.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 5aacadca90c..c1a97b4d6e0 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,14 +55,12 @@ jobs: - name: Prepare variables shell: sh -x {0} env: - board: ${{ matrix.board }} shield: ${{ matrix.shield }} - artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV - echo "artifact_name=${artifact_name:-\"${shield:+$shield-}${board}-zmk\"}" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV + echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 2a1904e184c5802a50c13f2d0ceca63df7c1b7df Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 14 Nov 2023 16:08:58 +0900 Subject: [PATCH 14/65] feat(boards): Add Glove80 to boards * Add board definition for MoErgo Glove80 --- app/boards/arm/glove80/CMakeLists.txt | 3 + app/boards/arm/glove80/Kconfig | 8 ++ app/boards/arm/glove80/Kconfig.board | 10 ++ app/boards/arm/glove80/Kconfig.defconfig | 65 ++++++++++ app/boards/arm/glove80/board.cmake | 6 + app/boards/arm/glove80/glove80.dtsi | 107 ++++++++++++++++ app/boards/arm/glove80/glove80.keymap | 114 ++++++++++++++++++ app/boards/arm/glove80/glove80.yaml | 19 +++ app/boards/arm/glove80/glove80.zmk.yml | 16 +++ .../arm/glove80/glove80_lh-pinctrl.dtsi | 47 ++++++++ app/boards/arm/glove80/glove80_lh.dts | 101 ++++++++++++++++ app/boards/arm/glove80/glove80_lh.keymap | 7 ++ app/boards/arm/glove80/glove80_lh_defconfig | 92 ++++++++++++++ .../arm/glove80/glove80_rh-pinctrl.dtsi | 48 ++++++++ app/boards/arm/glove80/glove80_rh.dts | 108 +++++++++++++++++ app/boards/arm/glove80/glove80_rh.keymap | 7 ++ app/boards/arm/glove80/glove80_rh_defconfig | 89 ++++++++++++++ app/boards/arm/glove80/readme.md | 13 ++ app/boards/arm/glove80/usb_serial_number.c | 67 ++++++++++ 19 files changed, 927 insertions(+) create mode 100644 app/boards/arm/glove80/CMakeLists.txt create mode 100644 app/boards/arm/glove80/Kconfig create mode 100644 app/boards/arm/glove80/Kconfig.board create mode 100644 app/boards/arm/glove80/Kconfig.defconfig create mode 100644 app/boards/arm/glove80/board.cmake create mode 100644 app/boards/arm/glove80/glove80.dtsi create mode 100644 app/boards/arm/glove80/glove80.keymap create mode 100644 app/boards/arm/glove80/glove80.yaml create mode 100644 app/boards/arm/glove80/glove80.zmk.yml create mode 100644 app/boards/arm/glove80/glove80_lh-pinctrl.dtsi create mode 100644 app/boards/arm/glove80/glove80_lh.dts create mode 100644 app/boards/arm/glove80/glove80_lh.keymap create mode 100644 app/boards/arm/glove80/glove80_lh_defconfig create mode 100644 app/boards/arm/glove80/glove80_rh-pinctrl.dtsi create mode 100644 app/boards/arm/glove80/glove80_rh.dts create mode 100644 app/boards/arm/glove80/glove80_rh.keymap create mode 100644 app/boards/arm/glove80/glove80_rh_defconfig create mode 100644 app/boards/arm/glove80/readme.md create mode 100644 app/boards/arm/glove80/usb_serial_number.c diff --git a/app/boards/arm/glove80/CMakeLists.txt b/app/boards/arm/glove80/CMakeLists.txt new file mode 100644 index 00000000000..3eb2cd276ea --- /dev/null +++ b/app/boards/arm/glove80/CMakeLists.txt @@ -0,0 +1,3 @@ +zephyr_library() +zephyr_library_sources(usb_serial_number.c) +zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) diff --git a/app/boards/arm/glove80/Kconfig b/app/boards/arm/glove80/Kconfig new file mode 100644 index 00000000000..f1c12e7e314 --- /dev/null +++ b/app/boards/arm/glove80/Kconfig @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_GLOVE80_LH || BOARD_GLOVE80_RH) diff --git a/app/boards/arm/glove80/Kconfig.board b/app/boards/arm/glove80/Kconfig.board new file mode 100644 index 00000000000..f689103710f --- /dev/null +++ b/app/boards/arm/glove80/Kconfig.board @@ -0,0 +1,10 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_GLOVE80_LH + bool "Glove80 LH" + depends on SOC_NRF52840_QIAA + +config BOARD_GLOVE80_RH + bool "Glove80 RH" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/glove80/Kconfig.defconfig b/app/boards/arm/glove80/Kconfig.defconfig new file mode 100644 index 00000000000..e1c452a5444 --- /dev/null +++ b/app/boards/arm/glove80/Kconfig.defconfig @@ -0,0 +1,65 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if BOARD_GLOVE80_LH + +config BOARD + default "glove80 lh" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif # BOARD_GLOVE80_LH + +if BOARD_GLOVE80_RH + +config BOARD + default "glove80 rh" + +endif # BOARD_GLOVE80_RH + +if BOARD_GLOVE80_LH || BOARD_GLOVE80_RH + +config ZMK_SPLIT + default y + +config BT_CTLR + default BT + +config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS + default 5 + +config PINCTRL + default y + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +if ZMK_BACKLIGHT + +config PWM + default y + +config LED_PWM + default y + +endif # ZMK_BACKLIGHT + +if ZMK_RGB_UNDERGLOW + +config SPI + default y + +config WS2812_STRIP + default y + +endif # ZMK_RGB_UNDERGLOW + +endif # BOARD_GLOVE80_LH || BOARD_GLOVE80_RH diff --git a/app/boards/arm/glove80/board.cmake b/app/boards/arm/glove80/board.cmake new file mode 100644 index 00000000000..36030db7b10 --- /dev/null +++ b/app/boards/arm/glove80/board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/arm/glove80/glove80.dtsi new file mode 100644 index 00000000000..f3f58cf7b42 --- /dev/null +++ b/app/boards/arm/glove80/glove80.dtsi @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(0,6) RC(1,6) RC(2,6) RC(2,7) RC(1,7) RC(0,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(3,6) RC(4,6) RC(5,6) RC(5,7) RC(4,7) RC(3,7) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + debounce-press-ms = <4>; + debounce-release-ms = <20>; + }; + +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + label = "softdevice"; + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + label = "storage"; + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80.keymap b/app/boards/arm/glove80/glove80.keymap new file mode 100644 index 00000000000..6c920ca1dcd --- /dev/null +++ b/app/boards/arm/glove80/glove80.keymap @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +// layers +#define DEFAULT 0 +#define LOWER 1 +#define MAGIC 2 + +/ { + behaviors { + // For the "layer" key, it'd nice to be able to use it as either a shift or a toggle. + // Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to + layer_td: tap_dance_0 { + compatible = "zmk,behavior-tap-dance"; + label = "LAYER_TAP_DANCE"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&mo LOWER>, <&to LOWER>; + }; + }; + + macros { + bt_0: bt_profile_macro_0 { + label = "BT_0"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 0>; + }; + + bt_1: bt_profile_macro_1 { + label = "BT_1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 1>; + }; + + bt_2: bt_profile_macro_2 { + label = "BT_2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 2>; + }; + + bt_3: bt_profile_macro_3 { + label = "BT_3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <&out OUT_BLE>, + <&bt BT_SEL 3>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + // | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | \ | + // | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | + // | ` | Z | X | C | V | B | LSHFT | LCTRL | LOWER | | LGUI | RCTRL | RSHFT | N | M | , | . | / | PGUP | + // | MAGIC | HOME| END | LEFT | RIGHT| | BSPC | DEL | LALT | | RALT | RET | SPACE | | UP | DOWN | [ | ] | PGDN | + + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LCTRL &layer_td &kp LGUI &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP + &mo MAGIC &kp HOME &kp END &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp LALT &kp RALT &kp RET &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN + >; + }; + + lower_layer { + bindings = < + &kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK + &trans &none &none &none &none &kp HOME &kp LPAR &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp PSCRN + &trans &none &none &kp UP &none &kp END &kp RPAR &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SLCK + &trans &none &kp LEFT &kp DOWN &kp RIGHT &kp PG_UP &kp PRCNT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none + &trans &kp K_CMENU &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to DEFAULT &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans + &trans &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans + >; + }; + + magic_layer { + bindings = < + &bt BT_CLR &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &none &none &none + &none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none + &bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader + &sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset + &none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &none + >; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80.yaml b/app/boards/arm/glove80/glove80.yaml new file mode 100644 index 00000000000..90a5e13307f --- /dev/null +++ b/app/boards/arm/glove80/glove80.yaml @@ -0,0 +1,19 @@ +identifier: glove80 +name: Glove80 +url: https://www.moergo.com/ +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog + - gpio + - i2c + - spi diff --git a/app/boards/arm/glove80/glove80.zmk.yml b/app/boards/arm/glove80/glove80.zmk.yml new file mode 100644 index 00000000000..ca70b7d6acf --- /dev/null +++ b/app/boards/arm/glove80/glove80.zmk.yml @@ -0,0 +1,16 @@ +file_format: "1" +id: glove80 +name: Glove80 +type: board +arch: arm +url: https://www.moergo.com/ +features: + - keys + - underglow + - backlight +outputs: + - usb + - ble +siblings: + - glove80_lh + - glove80_rh diff --git a/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi b/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi new file mode 100644 index 00000000000..3dbf3d7e1a1 --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh-pinctrl.dtsi @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; // WS2812_VEXT_DATA + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm0_default: pwm0_default { + group1 { + psels = ; // rear LED + }; + }; + + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + bias-pull-down; + }; + }; + + uart0_default: uart0_default { + group1 { + psels = , // EXT1 + ; // EXT2 + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/arm/glove80/glove80_lh.dts new file mode 100644 index 00000000000..ed40e0d2d1e --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh.dts @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.dtsi" +#include "glove80_lh-pinctrl.dtsi" + +#include + +/ { + model = "glove80_lh"; + compatible = "glove80_lh"; + + chosen { + zmk,underglow = &led_strip; + zmk,backlight = &back_led_backlight; + zmk,battery = &vbatt; + }; + + back_led_backlight: pwmleds { + compatible = "pwm-leds"; + label = "BACK LED"; + pwm_led_0 { + pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; + label = "Back LED configured as backlight"; + }; + }; + + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ + init-delay-ms = <100>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + label = "BATTERY"; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812C-2020"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <40>; /* 40 keys have underglow at the moment */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&kscan0 { + row-gpios + = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW1 + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW2 + , <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW3 + , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW4 + , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW5 + , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // LH ROW6 + ; + col-gpios + = <&gpio1 8 GPIO_ACTIVE_HIGH> // LH COL6 + , <&gpio1 4 GPIO_ACTIVE_HIGH> // LH COL5 + , <&gpio1 6 GPIO_ACTIVE_HIGH> // LH COL4 + , <&gpio1 7 GPIO_ACTIVE_HIGH> // LH COL3 + , <&gpio1 5 GPIO_ACTIVE_HIGH> // LH COL2 + , <&gpio1 3 GPIO_ACTIVE_HIGH> // LH COL1 + , <&gpio1 1 GPIO_ACTIVE_HIGH> // LH Thumb + ; +}; diff --git a/app/boards/arm/glove80/glove80_lh.keymap b/app/boards/arm/glove80/glove80_lh.keymap new file mode 100644 index 00000000000..dd4c2d6a01f --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh.keymap @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.keymap" diff --git a/app/boards/arm/glove80/glove80_lh_defconfig b/app/boards/arm/glove80/glove80_lh_defconfig new file mode 100644 index 00000000000..a93f27cd8f2 --- /dev/null +++ b/app/boards/arm/glove80/glove80_lh_defconfig @@ -0,0 +1,92 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_GLOVE80_LH=y + +# Enable both USB and BLE +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Keyboard IDs +CONFIG_ZMK_KEYBOARD_NAME="Glove80 Left" +CONFIG_USB_DEVICE_PID=0x27db +CONFIG_USB_DEVICE_VID=0x16c0 +CONFIG_USB_DEVICE_MANUFACTURER="MoErgo" +CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF" + +CONFIG_BT_DIS_PNP_PID=0x27db +CONFIG_BT_DIS_PNP_VID=0x16c0 +CONFIG_BT_DIS_MANUF="MoErgo" +CONFIG_BT_DIS_MODEL="Glove80" + +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# Work-around for Windows bug with battery notifications +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable GPIO +CONFIG_GPIO=y + +# Build configurations +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9807B007" +CONFIG_USE_DT_CODE_PARTITION=y + +# Flash configuration +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y + +# Enable RGB underglow +CONFIG_ZMK_RGB_UNDERGLOW=y + +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4 + +# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring +# BRT_MAX above 80% will draw additional current and can potentially damage your +# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80. +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80 + +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285 +CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16 + +# The power LED is implemented as a backlight +# For now, the power LED is acting as a "USB connected" indicator +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_ON_START=y +CONFIG_ZMK_BACKLIGHT_BRT_START=5 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y + +# The full two-byte consumer report space has compatibility issues with some +# operating systems, most notably macOS. Use the more basic single-byte usage +# space. +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +# Turn on debugging to disable optimization. Debug messages can result in larger +# stacks, so enable stack protection and particularly a larger BLE peripheral stack. +# CONFIG_DEBUG=y +# CONFIG_DEBUG_THREAD_INFO=y +# CONFIG_EXCEPTION_STACK_TRACE=y +# CONFIG_HW_STACK_PROTECTION=y +# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300 + +# Log via USB or Segger RTT +CONFIG_ZMK_USB_LOGGING=n +CONFIG_ZMK_RTT_LOGGING=n diff --git a/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi b/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi new file mode 100644 index 00000000000..454a2621051 --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh-pinctrl.dtsi @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; // WS2812_VEXT_DATA + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm0_default: pwm0_default { + group1 { + psels = ; // Rear LED + }; + }; + + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + bias-pull-down; + }; + }; + + uart0_default: uart0_default { + group1 { + psels = , // EXT1 + ; // EXT2 + }; + }; + + uart0_sleep: uart0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + +}; diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts new file mode 100644 index 00000000000..288f63688ca --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include "glove80.dtsi" +#include "glove80_rh-pinctrl.dtsi" + +#include + +/ { + model = "glove80_rh"; + compatible = "glove80_rh"; + + chosen { + zmk,underglow = &led_strip; + zmk,backlight = &back_led_backlight; + zmk,battery = &vbatt; + }; + + back_led_backlight: pwmleds { + compatible = "pwm-leds"; + label = "BACK LED"; + pwm_led_0 { + pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; + label = "Back LED configured as backlight"; + }; + }; + + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ + init-delay-ms = <100>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + label = "BATTERY"; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812C-2020"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <40>; /* 40 keys have underglow at the moment */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + + +&uart0 { + compatible = "nordic,nrf-uarte"; + pinctrl-0 = <&uart0_default>; + pinctrl-1 = <&uart0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +/* For right hand, the columns are offset by 7 */ +&default_transform { + col-offset = <7>; +}; + +&kscan0 { + row-gpios + = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW1 + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW2 + , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW3 + , <&gpio1 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW4 + , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW5 + , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // RH ROW6 + ; + col-gpios + = <&gpio1 6 GPIO_ACTIVE_HIGH> // RH Thumb + , <&gpio1 4 GPIO_ACTIVE_HIGH> // RH COL1 + , <&gpio0 2 GPIO_ACTIVE_HIGH> // RH COL2 + , <&gpio1 7 GPIO_ACTIVE_HIGH> // RH COL3 + , <&gpio1 5 GPIO_ACTIVE_HIGH> // RH COL4 + , <&gpio1 3 GPIO_ACTIVE_HIGH> // RH COL5 + , <&gpio1 1 GPIO_ACTIVE_HIGH> // RH COL6 + ; +}; diff --git a/app/boards/arm/glove80/glove80_rh.keymap b/app/boards/arm/glove80/glove80_rh.keymap new file mode 100644 index 00000000000..dd4c2d6a01f --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh.keymap @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "glove80.keymap" diff --git a/app/boards/arm/glove80/glove80_rh_defconfig b/app/boards/arm/glove80/glove80_rh_defconfig new file mode 100644 index 00000000000..ef29d682a54 --- /dev/null +++ b/app/boards/arm/glove80/glove80_rh_defconfig @@ -0,0 +1,89 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_GLOVE80_RH=y + +# Enable both USB and BLE +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + +# Keyboard IDs +CONFIG_ZMK_KEYBOARD_NAME="Glove80 Right" +CONFIG_USB_DEVICE_PID=0x27d9 +CONFIG_USB_DEVICE_VID=0x16c0 +CONFIG_USB_DEVICE_MANUFACTURER="MoErgo" +CONFIG_USB_DEVICE_SN="moergo.com:GLV80-0123456789ABCDEF" + +CONFIG_BT_DIS_PNP_PID=0x27d9 +CONFIG_BT_DIS_PNP_VID=0x16c0 +CONFIG_BT_DIS_MANUF="MoErgo" +CONFIG_BT_DIS_MODEL="Glove80 Right" + +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# Enable GPIO +CONFIG_GPIO=y + +# Build configurations +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0x9808B007" +CONFIG_USE_DT_CODE_PARTITION=y + +# Flash configuration +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y + +# Enable RGB underglow +CONFIG_ZMK_RGB_UNDERGLOW=y + +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=4 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MIN=4 + +# DO NOT CHANGE CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX TO ABOVE 80. Configuring +# BRT_MAX above 80% will draw additional current and can potentially damage your +# computer. WARRANTY IS VOID IF BRT_MAX SET ABOVE 80. +CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=80 + +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=285 +CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=75 +CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=16 + +# The power LED is implemented as a backlight +# For now, the power LED is acting as a "USB connected" indicator +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_ON_START=y +CONFIG_ZMK_BACKLIGHT_BRT_START=5 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=y + +# The full two-byte consumer report space has compatibility issues with some +# operating systems, most notably macOS. Use the more basic single-byte usage +# space. +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +# Turn on debugging to disable optimization. Debug messages can result in larger +# stacks, so enable stack protection and particularly a larger BLE peripheral stack. +# CONFIG_DEBUG=y +# CONFIG_DEBUG_THREAD_INFO=y +# CONFIG_EXCEPTION_STACK_TRACE=y +# CONFIG_HW_STACK_PROTECTION=y +# CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=1300 + +# Log via USB or Segger RTT +CONFIG_ZMK_USB_LOGGING=n +CONFIG_ZMK_RTT_LOGGING=n diff --git a/app/boards/arm/glove80/readme.md b/app/boards/arm/glove80/readme.md new file mode 100644 index 00000000000..2c770376116 --- /dev/null +++ b/app/boards/arm/glove80/readme.md @@ -0,0 +1,13 @@ +## MoErgo Glove80 + +This board definition provides ZMK support for the [MoErgo Glove80](https://www.moergo.com) +keyboard. + +MoErgo additionally offers a customized version of ZMK which adds additional functionality such as +RGB status indicators, available on GitHub at [moergo-sc/zmk](https://github.com/moergo-sc/zmk). The +MoErgo customized ZMK fork is regularly updated to include the latest changes from mainline ZMK, but +will not always be completely up-to-date. MoErgo also offers an online layout configurator and +firmware builder application using the customized fork at [my.glove80.com](https://my.glove80.com). + +While mainline ZMK is expected to work well with Glove80, MoErgo only provides support for use of +their customized fork. Likewise, the ZMK community cannot directly provide support for MoErgo's fork. diff --git a/app/boards/arm/glove80/usb_serial_number.c b/app/boards/arm/glove80/usb_serial_number.c new file mode 100644 index 00000000000..44d7ee20363 --- /dev/null +++ b/app/boards/arm/glove80/usb_serial_number.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include "usb_descriptor.h" + +#define LOG_LEVEL CONFIG_USB_DEVICE_LOG_LEVEL +#include +LOG_MODULE_DECLARE(usb_descriptor); + +int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize); + +uint8_t *usb_update_sn_string_descriptor(void) { + /* + * nrf52840 hwinfo returns a 64-bit hardware id. Glove80 uses this as a + * serial number, encoded as base16 into the last 16 characters of the + * CONFIG_USB_DEVICE_SN template. If insufficient template space is + * available, instead return the static serial number string. + */ + const uint8_t template_len = sizeof(CONFIG_USB_DEVICE_SN); + const uint8_t sn_len = 16; + + if (template_len < sn_len + 1) { + LOG_DBG("Serial number template too short"); + return CONFIG_USB_DEVICE_SN; + } + + static uint8_t serial[sizeof(CONFIG_USB_DEVICE_SN)]; + strncpy(serial, CONFIG_USB_DEVICE_SN, template_len); + + uint8_t hwid[8]; + memset(hwid, 0, sizeof(hwid)); + uint8_t hwlen = hwinfo_get_device_id(hwid, sizeof(hwid)); + + if (hwlen > 0) { + const uint8_t offset = template_len - sn_len - 1; + LOG_HEXDUMP_DBG(&hwid, sn_len, "Serial Number"); + base16_encode(hwid, hwlen, serial + offset, sn_len + 1); + } + + return serial; +} + +int base16_encode(const uint8_t *data, int length, uint8_t *result, int bufSize) { + const char hex[] = "0123456789ABCDEF"; + + int i = 0; + while (i < bufSize && i < length * 2) { + uint8_t nibble; + if (i % 2 == 0) { + nibble = data[i / 2] >> 4; + } else { + nibble = data[i / 2] & 0xF; + } + result[i] = hex[nibble]; + ++i; + } + if (i < bufSize) { + result[i] = '\0'; + } + return i; +} From f6716f869a0fd20ac9520e2808dc4183742436a5 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 14 Nov 2023 07:03:25 +0000 Subject: [PATCH 15/65] fix(usb): Build with ZMK_USB_BOOT disabled. * Invert the logic so `get_keyboard_report` is sane when `ZMK_USB_BOOT` is disabled. --- app/src/usb_hid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index c72bb36c9ef..d2a52cf24ab 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -39,16 +39,16 @@ void zmk_usb_hid_set_protocol(uint8_t protocol) { hid_protocol = protocol; } #endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ static uint8_t *get_keyboard_report(size_t *len) { - if (hid_protocol == HID_PROTOCOL_REPORT) { - struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); - *len = sizeof(*report); - return (uint8_t *)report; - } #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) - zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); - *len = sizeof(*boot_report); - return (uint8_t *)boot_report; + if (hid_protocol != HID_PROTOCOL_REPORT) { + zmk_hid_boot_report_t *boot_report = zmk_hid_get_boot_report(); + *len = sizeof(*boot_report); + return (uint8_t *)boot_report; + } #endif + struct zmk_hid_keyboard_report *report = zmk_hid_get_keyboard_report(); + *len = sizeof(*report); + return (uint8_t *)report; } static int get_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, From 3027b2a6e8f2896f7e08d5a502be50ad21f32d7f Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 14 Nov 2023 07:50:48 +0000 Subject: [PATCH 16/65] chore(usb): Don't enable ZMK_USB_ROOT by default. * Some initial reports of crashes with this code enabled, so disabling by default for now pending further investigation. --- app/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 282339e3e40..072795e317b 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -98,7 +98,6 @@ config ZMK_USB config ZMK_USB_BOOT bool "USB Boot Protocol Support" - default y depends on ZMK_USB select USB_HID_BOOT_PROTOCOL select USB_DEVICE_SOF From 8776911da5005d42cd0bdf108b23deca16d7ec82 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:03:30 +0000 Subject: [PATCH 17/65] feat(ble): Allow disabling BLE BAS reporting The battery reporting has been known to cause macOS computers to wakeup repeatedly. In some cases (e.g. display or custom lighting implementation) one might want to collect battery SOC without broadcasting over BLE * Update docs/docs/config/battery.md Co-authored-by: Cem Aksoylar --- app/Kconfig | 2 +- app/src/battery.c | 4 ++-- docs/docs/config/battery.md | 6 ++++++ docs/docs/config/system.md | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 072795e317b..1b3eb6def6b 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -321,7 +321,7 @@ config ZMK_BATTERY_REPORTING bool "Battery level detection/reporting" default n select SENSOR - select BT_BAS if ZMK_BLE + imply BT_BAS if ZMK_BLE config ZMK_IDLE_TIMEOUT int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)" diff --git a/app/src/battery.c b/app/src/battery.c index 87a25e08a2d..c6466272082 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -51,7 +51,7 @@ static int zmk_battery_update(const struct device *battery) { if (last_state_of_charge != state_of_charge.val1) { last_state_of_charge = state_of_charge.val1; - +#if IS_ENABLED(CONFIG_BT_BAS) LOG_DBG("Setting BAS GATT battery level to %d.", last_state_of_charge); rc = bt_bas_set_battery_level(last_state_of_charge); @@ -60,7 +60,7 @@ static int zmk_battery_update(const struct device *battery) { LOG_WRN("Failed to set BAS GATT battery level (err %d)", rc); return rc; } - +#endif rc = ZMK_EVENT_RAISE(new_zmk_battery_state_changed( (struct zmk_battery_state_changed){.state_of_charge = last_state_of_charge})); } diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index c56a30efd67..8d65a00a039 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -22,6 +22,12 @@ While `CONFIG_ZMK_BATTERY_REPORTING` is disabled by default it is implied by `CO ::: +:::note BLE reporting on MacOS + +On macOS the BLE battery reporting packets can cause the computer to wakeup from sleep. To prevent this, the battery _reporting_ service can be disabled by setting `CONFIG_BT_BAS=n`. This setting is independent of battery _monitoring_, for instance the battery level can still be indicated on a display. + +::: + ### Devicetree Applies to: [`/chosen` node](https://docs.zephyrproject.org/latest/guides/dts/intro.html#aliases-and-chosen-nodes) diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 25d51940afb..b9dd580de0c 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -66,6 +66,7 @@ for more information on configuring Bluetooth. | Config | Type | Description | Default | | ------------------------------------------- | ---- | --------------------------------------------------------------------- | ------- | | `CONFIG_BT` | bool | Enable Bluetooth support | | +| `CONFIG_BT_BAS` | bool | Enable the Bluetooth BAS (battery reporting service) | y | | `CONFIG_BT_MAX_CONN` | int | Maximum number of simultaneous Bluetooth connections | 5 | | `CONFIG_BT_MAX_PAIRED` | int | Maximum number of paired Bluetooth devices | 5 | | `CONFIG_ZMK_BLE` | bool | Enable ZMK as a Bluetooth keyboard | | From d7d9eed317b3f788370a8728afa449c5e525f2ca Mon Sep 17 00:00:00 2001 From: Alexander Krikun Date: Tue, 27 Apr 2021 18:24:11 +0300 Subject: [PATCH 18/65] feat(mouse): Initial mouse keys support. * Add HID report/descriptor for a new report with mouse buttons, and x/y/wheel deltas. * New mouse key press behavior for press/release of mouse keys. * Add constants for HID main item values (e.g. data/array/absolute) * Define and use constants for our HID report IDs. --- app/CMakeLists.txt | 3 + app/Kconfig | 13 +++ app/Kconfig.behaviors | 5 ++ app/dts/behaviors.dtsi | 3 +- app/dts/behaviors/mouse_key_press.dtsi | 9 +++ .../zmk,behavior-mouse-key-press.yaml | 5 ++ app/include/dt-bindings/zmk/hid_usage_pages.h | 1 + app/include/dt-bindings/zmk/mouse.h | 24 ++++++ app/include/zmk/endpoints.h | 4 + .../zmk/events/mouse_button_state_changed.h | 26 ++++++ app/include/zmk/hid.h | 66 +++++++++++++++ app/include/zmk/hog.h | 4 + app/include/zmk/mouse.h | 12 +++ app/include/zmk/usb_hid.h | 3 + app/src/behaviors/behavior_mouse_key_press.c | 48 +++++++++++ app/src/endpoints.c | 33 ++++++++ app/src/events/mouse_button_state_changed.c | 9 +++ app/src/hid.c | 81 +++++++++++++++++++ app/src/hog.c | 80 ++++++++++++++++++ app/src/mouse.c | 43 ++++++++++ app/src/usb_hid.c | 13 +++ app/tests/mouse-keys/mkp/events.patterns | 1 + .../mouse-keys/mkp/keycode_events.snapshot | 10 +++ app/tests/mouse-keys/mkp/native_posix.keymap | 28 +++++++ .../mouse-keys/mkp/native_posix_64.keymap | 28 +++++++ docs/docs/behaviors/mouse-emulation.md | 66 +++++++++++++++ docs/sidebars.js | 1 + 27 files changed, 618 insertions(+), 1 deletion(-) create mode 100644 app/dts/behaviors/mouse_key_press.dtsi create mode 100644 app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml create mode 100644 app/include/dt-bindings/zmk/mouse.h create mode 100644 app/include/zmk/events/mouse_button_state_changed.h create mode 100644 app/include/zmk/mouse.h create mode 100644 app/src/behaviors/behavior_mouse_key_press.c create mode 100644 app/src/events/mouse_button_state_changed.c create mode 100644 app/src/mouse.c create mode 100644 app/tests/mouse-keys/mkp/events.patterns create mode 100644 app/tests/mouse-keys/mkp/keycode_events.snapshot create mode 100644 app/tests/mouse-keys/mkp/native_posix.keymap create mode 100644 app/tests/mouse-keys/mkp/native_posix_64.keymap create mode 100644 docs/docs/behaviors/mouse-emulation.md diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 793f386dbe3..0891364b437 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -31,12 +31,14 @@ target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c) target_sources(app PRIVATE src/events/activity_state_changed.c) target_sources(app PRIVATE src/events/position_state_changed.c) target_sources(app PRIVATE src/events/sensor_event.c) +target_sources(app PRIVATE src/events/mouse_button_state_changed.c) target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c) target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c) target_sources(app PRIVATE src/behaviors/behavior_reset.c) target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c) if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/hid.c) + target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c) target_sources(app PRIVATE src/behaviors/behavior_key_press.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c) target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c) @@ -54,6 +56,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c) target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c) + target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c) target_sources(app PRIVATE src/combo.c) target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c) target_sources(app PRIVATE src/behavior_queue.c) diff --git a/app/Kconfig b/app/Kconfig index 1b3eb6def6b..f92f0ae3b86 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -156,6 +156,10 @@ config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE int "Max number of consumer HID reports to queue for sending over BLE" default 5 +config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE + int "Max number of mouse HID reports to queue for sending over BLE" + default 20 + config ZMK_BLE_CLEAR_BONDS_ON_START bool "Configuration that clears all bond information from the keyboard on startup." default n @@ -315,6 +319,15 @@ endif #Display/LED Options endmenu +menu "Mouse Options" + +config ZMK_MOUSE + bool "Enable ZMK mouse emulation" + default n + +#Mouse Options +endmenu + menu "Power Management" config ZMK_BATTERY_REPORTING diff --git a/app/Kconfig.behaviors b/app/Kconfig.behaviors index 9e4a82b06e7..11bc8c5900f 100644 --- a/app/Kconfig.behaviors +++ b/app/Kconfig.behaviors @@ -6,6 +6,11 @@ config ZMK_BEHAVIOR_KEY_TOGGLE default y depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED +config ZMK_BEHAVIOR_MOUSE_KEY_PRESS + bool + default y + depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED + imply ZMK_MOUSE config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON bool diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi index b3502cbbc13..23f2fee2806 100644 --- a/app/dts/behaviors.dtsi +++ b/app/dts/behaviors.dtsi @@ -18,4 +18,5 @@ #include #include #include -#include \ No newline at end of file +#include +#include diff --git a/app/dts/behaviors/mouse_key_press.dtsi b/app/dts/behaviors/mouse_key_press.dtsi new file mode 100644 index 00000000000..9cc16e81e75 --- /dev/null +++ b/app/dts/behaviors/mouse_key_press.dtsi @@ -0,0 +1,9 @@ +/ { + behaviors { + /omit-if-no-ref/ mkp: behavior_mouse_key_press { + compatible = "zmk,behavior-mouse-key-press"; + label = "MOUSE_KEY_PRESS"; + #binding-cells = <1>; + }; + }; +}; diff --git a/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml new file mode 100644 index 00000000000..8540916b72a --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-mouse-key-press.yaml @@ -0,0 +1,5 @@ +description: Mouse key press/release behavior + +compatible: "zmk,behavior-mouse-key-press" + +include: one_param.yaml diff --git a/app/include/dt-bindings/zmk/hid_usage_pages.h b/app/include/dt-bindings/zmk/hid_usage_pages.h index 2ccdba5540f..7fa54fd88b9 100644 --- a/app/include/dt-bindings/zmk/hid_usage_pages.h +++ b/app/include/dt-bindings/zmk/hid_usage_pages.h @@ -26,6 +26,7 @@ #define HID_USAGE_GDV (0x06) // Generic Device Controls #define HID_USAGE_KEY (0x07) // Keyboard/Keypad #define HID_USAGE_LED (0x08) // LED +#define HID_USAGE_BUTTON (0x09) // Button #define HID_USAGE_TELEPHONY (0x0B) // Telephony Device #define HID_USAGE_CONSUMER (0x0C) // Consumer #define HID_USAGE_DIGITIZERS (0x0D) // Digitizers diff --git a/app/include/dt-bindings/zmk/mouse.h b/app/include/dt-bindings/zmk/mouse.h new file mode 100644 index 00000000000..582518aff7e --- /dev/null +++ b/app/include/dt-bindings/zmk/mouse.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ +#pragma once + +#include + +/* Mouse press behavior */ +/* Left click */ +#define MB1 BIT(0) +#define LCLK (MB1) + +/* Right click */ +#define MB2 BIT(1) +#define RCLK (MB2) + +/* Middle click */ +#define MB3 BIT(2) +#define MCLK (MB3) + +#define MB4 BIT(3) +#define MB5 BIT(4) diff --git a/app/include/zmk/endpoints.h b/app/include/zmk/endpoints.h index c5964ff8535..70240183e36 100644 --- a/app/include/zmk/endpoints.h +++ b/app/include/zmk/endpoints.h @@ -69,3 +69,7 @@ int zmk_endpoints_toggle_transport(void); struct zmk_endpoint_instance zmk_endpoints_selected(void); int zmk_endpoints_send_report(uint16_t usage_page); + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_endpoints_send_mouse_report(); +#endif // IS_ENABLE(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/events/mouse_button_state_changed.h b/app/include/zmk/events/mouse_button_state_changed.h new file mode 100644 index 00000000000..9382789e56f --- /dev/null +++ b/app/include/zmk/events/mouse_button_state_changed.h @@ -0,0 +1,26 @@ + +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +struct zmk_mouse_button_state_changed { + zmk_mouse_button_t buttons; + bool state; + int64_t timestamp; +}; + +ZMK_EVENT_DECLARE(zmk_mouse_button_state_changed); + +static inline struct zmk_mouse_button_state_changed_event * +zmk_mouse_button_state_changed_from_encoded(uint32_t encoded, bool pressed, int64_t timestamp) { + return new_zmk_mouse_button_state_changed((struct zmk_mouse_button_state_changed){ + .buttons = ZMK_HID_USAGE_ID(encoded), .state = pressed, .timestamp = timestamp}); +} diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index afe9210199f..aeaa69d8d08 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -10,10 +10,15 @@ #include #include +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +#include +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + #include #include #define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL +#define ZMK_HID_MOUSE_NUM_BUTTONS 0x05 // See https://www.usb.org/sites/default/files/hid1_11.pdf section 6.2.2.4 Main Items @@ -46,6 +51,7 @@ #define ZMK_HID_REPORT_ID_KEYBOARD 0x01 #define ZMK_HID_REPORT_ID_CONSUMER 0x02 +#define ZMK_HID_REPORT_ID_MOUSE 0x03 static const uint8_t zmk_hid_report_desc[] = { HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), @@ -114,6 +120,39 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE), HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_ARRAY | ZMK_HID_MAIN_VAL_ABS), HID_END_COLLECTION, + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + HID_USAGE_PAGE(HID_USAGE_GD), + HID_USAGE(HID_USAGE_GD_MOUSE), + HID_COLLECTION(HID_COLLECTION_APPLICATION), + HID_REPORT_ID(ZMK_HID_REPORT_ID_MOUSE), + HID_USAGE(HID_USAGE_GD_POINTER), + HID_COLLECTION(HID_COLLECTION_PHYSICAL), + HID_USAGE_PAGE(HID_USAGE_BUTTON), + HID_USAGE_MIN8(0x1), + HID_USAGE_MAX8(ZMK_HID_MOUSE_NUM_BUTTONS), + HID_LOGICAL_MIN8(0x00), + HID_LOGICAL_MAX8(0x01), + HID_REPORT_SIZE(0x01), + HID_REPORT_COUNT(0x5), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + // Constant padding for the last 3 bits. + HID_REPORT_SIZE(0x03), + HID_REPORT_COUNT(0x01), + HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + // Some OSes ignore pointer devices without X/Y data. + HID_USAGE_PAGE(HID_USAGE_GEN_DESKTOP), + HID_USAGE(HID_USAGE_GD_X), + HID_USAGE(HID_USAGE_GD_Y), + HID_USAGE(HID_USAGE_GD_WHEEL), + HID_LOGICAL_MIN8(-0x7F), + HID_LOGICAL_MAX8(0x7F), + HID_REPORT_SIZE(0x08), + HID_REPORT_COUNT(0x03), + HID_INPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_REL), + HID_END_COLLECTION, + HID_END_COLLECTION, +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) }; #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) @@ -163,6 +202,21 @@ struct zmk_hid_consumer_report { struct zmk_hid_consumer_report_body body; } __packed; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +struct zmk_hid_mouse_report_body { + zmk_mouse_button_flags_t buttons; + int8_t d_x; + int8_t d_y; + int8_t d_wheel; +} __packed; + +struct zmk_hid_mouse_report { + uint8_t report_id; + struct zmk_hid_mouse_report_body body; +} __packed; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + zmk_mod_flags_t zmk_hid_get_explicit_mods(); int zmk_hid_register_mod(zmk_mod_t modifier); int zmk_hid_unregister_mod(zmk_mod_t modifier); @@ -189,9 +243,21 @@ int zmk_hid_press(uint32_t usage); int zmk_hid_release(uint32_t usage); bool zmk_hid_is_pressed(uint32_t usage); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_hid_mouse_button_press(zmk_mouse_button_t button); +int zmk_hid_mouse_button_release(zmk_mouse_button_t button); +int zmk_hid_mouse_buttons_press(zmk_mouse_button_flags_t buttons); +int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons); +void zmk_hid_mouse_clear(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report(); struct zmk_hid_consumer_report *zmk_hid_get_consumer_report(); #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) zmk_hid_boot_report_t *zmk_hid_get_boot_report(); #endif + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +struct zmk_hid_mouse_report *zmk_hid_get_mouse_report(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/hog.h b/app/include/zmk/hog.h index 7523fb661ad..b4e45d9186d 100644 --- a/app/include/zmk/hog.h +++ b/app/include/zmk/hog.h @@ -13,3 +13,7 @@ int zmk_hog_init(); int zmk_hog_send_keyboard_report(struct zmk_hid_keyboard_report_body *body); int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *body); + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *body); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/include/zmk/mouse.h b/app/include/zmk/mouse.h new file mode 100644 index 00000000000..d873f15689a --- /dev/null +++ b/app/include/zmk/mouse.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include + +typedef uint8_t zmk_mouse_button_flags_t; +typedef uint16_t zmk_mouse_button_t; diff --git a/app/include/zmk/usb_hid.h b/app/include/zmk/usb_hid.h index 777f2b48a03..f9091778501 100644 --- a/app/include/zmk/usb_hid.h +++ b/app/include/zmk/usb_hid.h @@ -10,4 +10,7 @@ int zmk_usb_hid_send_keyboard_report(); int zmk_usb_hid_send_consumer_report(); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_usb_hid_send_mouse_report(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) void zmk_usb_hid_set_protocol(uint8_t protocol); diff --git a/app/src/behaviors/behavior_mouse_key_press.c b/app/src/behaviors/behavior_mouse_key_press.c new file mode 100644 index 00000000000..6718155768c --- /dev/null +++ b/app/src/behaviors/behavior_mouse_key_press.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#define DT_DRV_COMPAT zmk_behavior_mouse_key_press + +#include +#include +#include + +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + +static int behavior_mouse_key_press_init(const struct device *dev) { return 0; }; + +static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + + return ZMK_EVENT_RAISE( + zmk_mouse_button_state_changed_from_encoded(binding->param1, true, event.timestamp)); +} + +static int on_keymap_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { + LOG_DBG("position %d keycode 0x%02X", event.position, binding->param1); + return ZMK_EVENT_RAISE( + zmk_mouse_button_state_changed_from_encoded(binding->param1, false, event.timestamp)); +} + +static const struct behavior_driver_api behavior_mouse_key_press_driver_api = { + .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; + +#define MKP_INST(n) \ + DEVICE_DT_INST_DEFINE(n, behavior_mouse_key_press_init, NULL, NULL, NULL, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_mouse_key_press_driver_api); + +DT_INST_FOREACH_STATUS_OKAY(MKP_INST) + +#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 10357d4e02d..098e04e2776 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -191,6 +191,36 @@ int zmk_endpoints_send_report(uint16_t usage_page) { return -ENOTSUP; } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_endpoints_send_mouse_report() { + switch (current_instance.transport) { +#if IS_ENABLED(CONFIG_ZMK_USB) + case ZMK_TRANSPORT_USB: { + int err = zmk_usb_hid_send_mouse_report(); + if (err) { + LOG_ERR("FAILED TO SEND OVER USB: %d", err); + } + return err; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB) */ + +#if IS_ENABLED(CONFIG_ZMK_BLE) + case ZMK_TRANSPORT_BLE: { + struct zmk_hid_mouse_report *mouse_report = zmk_hid_get_mouse_report(); + int err = zmk_hog_send_mouse_report(&mouse_report->body); + if (err) { + LOG_ERR("FAILED TO SEND OVER HOG: %d", err); + } + return err; + } +#endif /* IS_ENABLED(CONFIG_ZMK_BLE) */ + } + + LOG_ERR("Unsupported endpoint transport %d", current_instance.transport); + return -ENOTSUP; +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + #if IS_ENABLED(CONFIG_SETTINGS) static int endpoints_handle_set(const char *name, size_t len, settings_read_cb read_cb, @@ -295,6 +325,9 @@ static int zmk_endpoints_init(const struct device *_arg) { static void disconnect_current_endpoint() { zmk_hid_keyboard_clear(); zmk_hid_consumer_clear(); +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + zmk_hid_mouse_clear(); +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) zmk_endpoints_send_report(HID_USAGE_KEY); zmk_endpoints_send_report(HID_USAGE_CONSUMER); diff --git a/app/src/events/mouse_button_state_changed.c b/app/src/events/mouse_button_state_changed.c new file mode 100644 index 00000000000..419a7ce956d --- /dev/null +++ b/app/src/events/mouse_button_state_changed.c @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +ZMK_EVENT_IMPL(zmk_mouse_button_state_changed); diff --git a/app/src/hid.c b/app/src/hid.c index 689a2361e13..1ea2afb1621 100644 --- a/app/src/hid.c +++ b/app/src/hid.c @@ -12,6 +12,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static struct zmk_hid_keyboard_report keyboard_report = { + .report_id = ZMK_HID_REPORT_ID_KEYBOARD, .body = {.modifiers = 0, ._reserved = 0, .keys = {0}}}; static struct zmk_hid_consumer_report consumer_report = {.report_id = ZMK_HID_REPORT_ID_CONSUMER, @@ -24,6 +25,13 @@ static uint8_t keys_held = 0; #endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +static struct zmk_hid_mouse_report mouse_report = {.report_id = ZMK_HID_REPORT_ID_MOUSE, + .body = {.buttons = 0}}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + // Keep track of how often a modifier was pressed. // Only release the modifier if the count is 0. static int explicit_modifier_counts[8] = {0, 0, 0, 0, 0, 0, 0, 0}; @@ -357,6 +365,71 @@ bool zmk_hid_is_pressed(uint32_t usage) { return false; } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +// Keep track of how often a button was pressed. +// Only release the button if the count is 0. +static int explicit_button_counts[5] = {0, 0, 0, 0, 0}; +static zmk_mod_flags_t explicit_buttons = 0; + +#define SET_MOUSE_BUTTONS(btns) \ + { \ + mouse_report.body.buttons = btns; \ + LOG_DBG("Mouse buttons set to 0x%02X", mouse_report.body.buttons); \ + } + +int zmk_hid_mouse_button_press(zmk_mouse_button_t button) { + if (button >= ZMK_HID_MOUSE_NUM_BUTTONS) { + return -EINVAL; + } + + explicit_button_counts[button]++; + LOG_DBG("Button %d count %d", button, explicit_button_counts[button]); + WRITE_BIT(explicit_buttons, button, true); + SET_MOUSE_BUTTONS(explicit_buttons); + return 0; +} + +int zmk_hid_mouse_button_release(zmk_mouse_button_t button) { + if (button >= ZMK_HID_MOUSE_NUM_BUTTONS) { + return -EINVAL; + } + + if (explicit_button_counts[button] <= 0) { + LOG_ERR("Tried to release button %d too often", button); + return -EINVAL; + } + explicit_button_counts[button]--; + LOG_DBG("Button %d count: %d", button, explicit_button_counts[button]); + if (explicit_button_counts[button] == 0) { + LOG_DBG("Button %d released", button); + WRITE_BIT(explicit_buttons, button, false); + } + SET_MOUSE_BUTTONS(explicit_buttons); + return 0; +} + +int zmk_hid_mouse_buttons_press(zmk_mouse_button_flags_t buttons) { + for (zmk_mouse_button_t i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if (buttons & BIT(i)) { + zmk_hid_mouse_button_press(i); + } + } + return 0; +} + +int zmk_hid_mouse_buttons_release(zmk_mouse_button_flags_t buttons) { + for (zmk_mouse_button_t i = 0; i < ZMK_HID_MOUSE_NUM_BUTTONS; i++) { + if (buttons & BIT(i)) { + zmk_hid_mouse_button_release(i); + } + } + return 0; +} +void zmk_hid_mouse_clear() { memset(&mouse_report.body, 0, sizeof(mouse_report.body)); } + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report() { return &keyboard_report; } @@ -364,3 +437,11 @@ struct zmk_hid_keyboard_report *zmk_hid_get_keyboard_report() { struct zmk_hid_consumer_report *zmk_hid_get_consumer_report() { return &consumer_report; } + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +struct zmk_hid_mouse_report *zmk_hid_get_mouse_report() { + return &mouse_report; +} + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) diff --git a/app/src/hog.c b/app/src/hog.c index 9ccfd9d2c0e..89a903cb967 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -56,6 +56,15 @@ static struct hids_report consumer_input = { .type = HIDS_INPUT, }; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +static struct hids_report mouse_input = { + .id = ZMK_HID_REPORT_ID_MOUSE, + .type = HIDS_INPUT, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + static bool host_requests_notification = false; static uint8_t ctrl_point; // static uint8_t proto_mode; @@ -93,6 +102,15 @@ static ssize_t read_hids_consumer_input_report(struct bt_conn *conn, sizeof(struct zmk_hid_consumer_report_body)); } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +static ssize_t read_hids_mouse_input_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, + void *buf, uint16_t len, uint16_t offset) { + struct zmk_hid_mouse_report_body *report_body = &zmk_hid_get_mouse_report()->body; + return bt_gatt_attr_read(conn, attr, buf, len, offset, report_body, + sizeof(struct zmk_hid_mouse_report_body)); +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + // static ssize_t write_proto_mode(struct bt_conn *conn, // const struct bt_gatt_attr *attr, // const void *buf, uint16_t len, uint16_t offset, @@ -139,6 +157,15 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &consumer_input), + +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, + BT_GATT_PERM_READ_ENCRYPT, read_hids_mouse_input_report, NULL, NULL), + BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &mouse_input), +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_CTRL_POINT, BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE, NULL, write_ctrl_point, &ctrl_point)); @@ -261,6 +288,59 @@ int zmk_hog_send_consumer_report(struct zmk_hid_consumer_report_body *report) { return 0; }; +#if IS_ENABLED(CONFIG_ZMK_MOUSE) + +K_MSGQ_DEFINE(zmk_hog_mouse_msgq, sizeof(struct zmk_hid_mouse_report_body), + CONFIG_ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE, 4); + +void send_mouse_report_callback(struct k_work *work) { + struct zmk_hid_mouse_report_body report; + while (k_msgq_get(&zmk_hog_mouse_msgq, &report, K_NO_WAIT) == 0) { + struct bt_conn *conn = destination_connection(); + if (conn == NULL) { + return; + } + + struct bt_gatt_notify_params notify_params = { + .attr = &hog_svc.attrs[13], + .data = &report, + .len = sizeof(report), + }; + + int err = bt_gatt_notify_cb(conn, ¬ify_params); + if (err) { + LOG_DBG("Error notifying %d", err); + } + + bt_conn_unref(conn); + } +}; + +int zmk_hog_send_mouse_report(struct zmk_hid_mouse_report_body *report) { + struct bt_conn *conn = destination_connection(); + if (conn == NULL) { + return 1; + } + + struct bt_gatt_notify_params notify_params = { + .attr = &hog_svc.attrs[13], + .data = report, + .len = sizeof(*report), + }; + + int err = bt_gatt_notify_cb(conn, ¬ify_params); + if (err) { + LOG_DBG("Error notifying %d", err); + return err; + } + + bt_conn_unref(conn); + + return 0; +}; + +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + int zmk_hog_init(const struct device *_arg) { static const struct k_work_queue_config queue_config = {.name = "HID Over GATT Send Work"}; k_work_queue_start(&hog_work_q, hog_q_stack, K_THREAD_STACK_SIZEOF(hog_q_stack), diff --git a/app/src/mouse.c b/app/src/mouse.c new file mode 100644 index 00000000000..c1b9ac0261e --- /dev/null +++ b/app/src/mouse.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#include +#include +#include +#include + +static void listener_mouse_button_pressed(const struct zmk_mouse_button_state_changed *ev) { + LOG_DBG("buttons: 0x%02X", ev->buttons); + zmk_hid_mouse_buttons_press(ev->buttons); + zmk_endpoints_send_mouse_report(); +} + +static void listener_mouse_button_released(const struct zmk_mouse_button_state_changed *ev) { + LOG_DBG("buttons: 0x%02X", ev->buttons); + zmk_hid_mouse_buttons_release(ev->buttons); + zmk_endpoints_send_mouse_report(); +} + +int mouse_listener(const zmk_event_t *eh) { + const struct zmk_mouse_button_state_changed *mbt_ev = as_zmk_mouse_button_state_changed(eh); + if (mbt_ev) { + if (mbt_ev->state) { + listener_mouse_button_pressed(mbt_ev); + } else { + listener_mouse_button_released(mbt_ev); + } + return 0; + } + return 0; +} + +ZMK_LISTENER(mouse_listener, mouse_listener); +ZMK_SUBSCRIPTION(mouse_listener, zmk_mouse_button_state_changed); diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index d2a52cf24ab..fd58c14bf4a 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -129,6 +129,19 @@ int zmk_usb_hid_send_consumer_report() { return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); } +#if IS_ENABLED(CONFIG_ZMK_MOUSE) +int zmk_usb_hid_send_mouse_report() { +#if IS_ENABLED(CONFIG_ZMK_USB_BOOT) + if (hid_protocol == HID_PROTOCOL_BOOT) { + return -ENOTSUP; + } +#endif /* IS_ENABLED(CONFIG_ZMK_USB_BOOT) */ + + struct zmk_hid_mouse_report *report = zmk_hid_get_mouse_report(); + return zmk_usb_hid_send_report((uint8_t *)report, sizeof(*report)); +} +#endif // IS_ENABLED(CONFIG_ZMK_MOUSE) + static int zmk_usb_hid_init(const struct device *_arg) { hid_dev = device_get_binding("HID_0"); if (hid_dev == NULL) { diff --git a/app/tests/mouse-keys/mkp/events.patterns b/app/tests/mouse-keys/mkp/events.patterns new file mode 100644 index 00000000000..2599345c2d7 --- /dev/null +++ b/app/tests/mouse-keys/mkp/events.patterns @@ -0,0 +1 @@ +s/.*zmk_hid_mouse_button_//p diff --git a/app/tests/mouse-keys/mkp/keycode_events.snapshot b/app/tests/mouse-keys/mkp/keycode_events.snapshot new file mode 100644 index 00000000000..ab58cc9575e --- /dev/null +++ b/app/tests/mouse-keys/mkp/keycode_events.snapshot @@ -0,0 +1,10 @@ +press: Button 0 count 1 +press: Mouse buttons set to 0x01 +press: Button 1 count 1 +press: Mouse buttons set to 0x03 +release: Button 1 count: 0 +release: Button 1 released +release: Mouse buttons set to 0x01 +release: Button 0 count: 0 +release: Button 0 released +release: Mouse buttons set to 0x00 diff --git a/app/tests/mouse-keys/mkp/native_posix.keymap b/app/tests/mouse-keys/mkp/native_posix.keymap new file mode 100644 index 00000000000..04316eb34bb --- /dev/null +++ b/app/tests/mouse-keys/mkp/native_posix.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &none + &none &mkp RCLK + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS (0,0,100) + ZMK_MOCK_PRESS (1,1,100) + ZMK_MOCK_RELEASE(1,1, 10) + ZMK_MOCK_RELEASE(0,0, 10) + >; +}; diff --git a/app/tests/mouse-keys/mkp/native_posix_64.keymap b/app/tests/mouse-keys/mkp/native_posix_64.keymap new file mode 100644 index 00000000000..04316eb34bb --- /dev/null +++ b/app/tests/mouse-keys/mkp/native_posix_64.keymap @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &mkp LCLK &none + &none &mkp RCLK + >; + }; + }; +}; + + +&kscan { + events = < + ZMK_MOCK_PRESS (0,0,100) + ZMK_MOCK_PRESS (1,1,100) + ZMK_MOCK_RELEASE(1,1, 10) + ZMK_MOCK_RELEASE(0,0, 10) + >; +}; diff --git a/docs/docs/behaviors/mouse-emulation.md b/docs/docs/behaviors/mouse-emulation.md new file mode 100644 index 00000000000..9ed0dd8e07b --- /dev/null +++ b/docs/docs/behaviors/mouse-emulation.md @@ -0,0 +1,66 @@ +--- +title: Mouse Emulation Behaviors +sidebar_label: Mouse Emulation +--- + +## Summary + +Mouse emulation behaviors send mouse events. Currently, only mouse button presses are supported, but movement +and scroll action support is planned for the future. + +Whenever the Mouse Emulation feature is turned on or off, the HID protocol used to communicate events to hosts changes. Unfortunately, those changes are not always detected automatically, and might require re-pairing your keyboard to your devices to work over bluetooth. If mouse behaviors are still not recognized by your device after doing that, you can try [these troubleshooting steps](../features/bluetooth.md#windows-connected-but-not-working). + +## Configuration Option + +This feature can be enabled or disabled explicitly via a config option: + +``` +CONFIG_ZMK_MOUSE=y +``` + +If you use the mouse key press behavior in your keymap, the feature will automatically be enabled for you. + +## Mouse Button Defines + +To make it easier to encode the HID mouse button numeric values, include +the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header +provided by ZMK near the top: + +``` +#include +``` + +## Mouse Button Press + +This behavior can press/release up to 5 mouse buttons. + +### Behavior Binding + +- Reference: `&mkp` +- Parameter: A `uint8` with bits 0 through 4 each referring to a button. + +The following defines can be passed for the parameter: + +| Define | Action | +| :------------ | :------------- | +| `MB1`, `LCLK` | Left click | +| `MB2`, `RCLK` | Right click | +| `MB3`, `MCLK` | Middle click | +| `MB4` | Mouse button 4 | +| `MB5` | Mouse button 5 | + +Mouse buttons 4 and 5 typically map to "back" and "forward" actions in most applications. + +### Examples + +The following will send a left click press when the binding is triggered: + +``` +&mkp LCLK +``` + +This example will send press of the fourth mouse button when the binding is triggered: + +``` +&mkp MB4 +``` diff --git a/docs/sidebars.js b/docs/sidebars.js index 43f17b4193f..19b0ad7e68c 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -36,6 +36,7 @@ module.exports = { "behaviors/caps-word", "behaviors/key-repeat", "behaviors/sensor-rotate", + "behaviors/mouse-emulation", "behaviors/reset", "behaviors/bluetooth", "behaviors/outputs", From 0a4b1a6533f434e6bdb7f7f5c336aa3096a90ad7 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Tue, 21 Nov 2023 05:00:10 +0900 Subject: [PATCH 19/65] feat(ble): add behavior to disconnect from BLE profile Adds new functionality and a behavior to disconnect an active BLE connection. The motivation for this is that for some devices like phones, the presence of an active BLE connection results in the onscreen keyboard being selected. --- app/include/dt-bindings/zmk/bt.h | 2 ++ app/include/zmk/ble.h | 1 + app/src/behaviors/behavior_bt.c | 2 ++ app/src/ble.c | 21 +++++++++++++++++++++ docs/docs/behaviors/bluetooth.md | 21 +++++++++++++++------ 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/app/include/dt-bindings/zmk/bt.h b/app/include/dt-bindings/zmk/bt.h index 8ca10606942..7af89ddb011 100644 --- a/app/include/dt-bindings/zmk/bt.h +++ b/app/include/dt-bindings/zmk/bt.h @@ -9,6 +9,7 @@ #define BT_PRV_CMD 2 #define BT_SEL_CMD 3 // #define BT_FULL_RESET_CMD 4 +#define BT_DISC_CMD 5 /* Note: Some future commands will include additional parameters, so we @@ -19,3 +20,4 @@ defines these aliases up front. #define BT_NXT BT_NXT_CMD 0 #define BT_PRV BT_PRV_CMD 0 #define BT_SEL BT_SEL_CMD +#define BT_DISC BT_DISC_CMD diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 435fde49654..92fd595fbcb 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -24,6 +24,7 @@ int zmk_ble_clear_bonds(); int zmk_ble_prof_next(); int zmk_ble_prof_prev(); int zmk_ble_prof_select(uint8_t index); +int zmk_ble_prof_disconnect(uint8_t index); int zmk_ble_active_profile_index(); bt_addr_le_t *zmk_ble_active_profile_addr(); diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index 6d44b5f5e9f..bf98532ce93 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -31,6 +31,8 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, return zmk_ble_prof_prev(); case BT_SEL_CMD: return zmk_ble_prof_select(binding->param2); + case BT_DISC_CMD: + return zmk_ble_prof_disconnect(binding->param2); default: LOG_ERR("Unknown BT command: %d", binding->param1); } diff --git a/app/src/ble.c b/app/src/ble.c index 483bc9d79c1..8c991c54b80 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -271,6 +271,27 @@ int zmk_ble_prof_prev() { ZMK_BLE_PROFILE_COUNT); }; +int zmk_ble_prof_disconnect(uint8_t index) { + if (index >= ZMK_BLE_PROFILE_COUNT) + return -ERANGE; + + bt_addr_le_t *addr = &profiles[index].peer; + struct bt_conn *conn; + int result; + + if (!bt_addr_le_cmp(addr, BT_ADDR_LE_ANY)) { + return -ENODEV; + } else if ((conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, addr)) == NULL) { + return -ENODEV; + } + + result = bt_conn_disconnect(conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); + LOG_DBG("Disconnected from profile %d: %d", index, result); + + bt_conn_unref(conn); + return result; +} + bt_addr_le_t *zmk_ble_active_profile_addr() { return &profiles[active_profile].peer; } char *zmk_ble_active_profile_name() { return profiles[active_profile].name; } diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index 1d461722f5c..ef1cc4666f1 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -13,6 +13,13 @@ computer/laptop/keyboard should receive the keyboard input; many of the commands When pairing to a host device ZMK saves bond information to the selected profile. It will not replace this when you initiate pairing with another device. To pair with a new device select an unused profile with `BT_SEL`, `BT_NXT` or `BT_PRV` bindings, or by clearing an existing profile using `BT_CLR`. A ZMK device may show as "connected" on multiple hosts at the same time. This is working as intended, and only the host associated with the active profile will receive keystrokes. + +An _inactive_ connected profile can be explicitly disconnected using the `BT_DISC` behavior. This can be helpful in +cases when host devices behave differently when a bluetooth keyboard is connected, for example by hiding their on-screen +keyboard. Note that at present the active bluetooth profile will immediately reconnect if disconnected. This is true +even if OUT_USB is selected. To remain disconnected, another bluetooth profile must be first selected using (e.g.) +`BT_SEL`. + ::: ## Bluetooth Command Defines @@ -28,12 +35,14 @@ This will allow you to reference the actions defined in this header such as `BT_ Here is a table describing the command for each define: -| Define | Action | -| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | -| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | -| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | -| `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +| Define | Action | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | +| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | +| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | +| `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | +| `BT_DISC` | Disconnect from the 0-indexed profile by number, if it's currently connected and inactive. Please note: this definition must include a number as an | +| | argument in the keymap to work correctly. eg. `BT_DISC 0` | :::note Selected profile persistence The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. From f77e38f2b980a2d8491523b1c89b11edc740021e Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Thu, 23 Nov 2023 21:02:22 -0800 Subject: [PATCH 20/65] chore: Update devcontainer.json The format has changed slightly. --- .devcontainer/devcontainer.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 04a42c4d5ef..efa8c229d9a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,9 +13,13 @@ "type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules", "type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools" ], - "extensions": ["ms-vscode.cpptools"], - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "customizations": { + "vscode": { + "extensions": ["ms-vscode.cpptools"], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + } + } }, "forwardPorts": [3000] } From a3f30ee799598a95fc91befc4cb42385644b7e0a Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 10 Nov 2023 22:40:55 -0800 Subject: [PATCH 21/65] feat(build): Add support for artifact-name in build.yaml, correctly --- .github/workflows/build-user-config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index c1a97b4d6e0..7373c9ff4c5 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -55,12 +55,14 @@ jobs: - name: Prepare variables shell: sh -x {0} env: + board: ${{ matrix.board }} shield: ${{ matrix.shield }} + artifact_name: ${{ matrix.artifact-name }} run: | echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV - echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV - echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV + echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV + echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV - name: Checkout uses: actions/checkout@v3 From 84b93350b8be30d2b5a5b8f4e07fa86ce2bb1fe7 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:12:33 +0000 Subject: [PATCH 22/65] feat(docs): Document adding USB logging to a standalone board (#2039) Currently this is only documented in the zephyr 3.0 upgrade blog. This explicitly documents it as well as when it doesn't need to be applied (i.e. when a mcu board is already in use). --- docs/docs/development/usb-logging.md | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index e50e78241a6..6a8f8564b04 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -83,3 +83,32 @@ You should see tio printing `Disconnected` or `Connected` when you disconnect or From there, you should see the various log messages from ZMK and Zephyr, depending on which systems you have set to what log levels. + +## Adding USB Logging to a Board + +Standard boards such as the nice!nano and Seeeduino XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. + +To add USB logging to a board you need to define the USB CDC ACM device that the serial output gets piped to, as well as adding the console in the `chosen` node inside `.dts`. + +Inside the USB device (`&usbd`), add the CDC ACM node: + +```dts +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; +``` + +Then you can add the `zephyr,console` binding in the `chosen` node: + +```dts +/ { + chosen { + ... + zephyr,console = &cdc_acm_uart; + }; + ... +}; +``` From 6276e973d52863878933ac90d2b6a4a922e51fb3 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:24:22 +0000 Subject: [PATCH 23/65] feat(ble): Only update BAS when active Subscribes to the activity changing event, will stop the battery work timer when in idle or deep sleep, restart when board goes active --- app/src/battery.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/src/battery.c b/app/src/battery.c index c6466272082..e76797ef997 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -18,6 +18,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include +#include #include static uint8_t last_state_of_charge = 0; @@ -84,6 +86,10 @@ static void zmk_battery_timer(struct k_timer *timer) { K_TIMER_DEFINE(battery_timer, zmk_battery_timer, NULL); +static void zmk_battery_start_reporting() { + k_timer_start(&battery_timer, K_NO_WAIT, K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); +} + static int zmk_battery_init(const struct device *_arg) { #if !DT_HAS_CHOSEN(zmk_battery) battery = device_get_binding("BATTERY"); @@ -100,9 +106,30 @@ static int zmk_battery_init(const struct device *_arg) { return -ENODEV; } - k_timer_start(&battery_timer, K_NO_WAIT, K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL)); - + zmk_battery_start_reporting(); return 0; } +static int battery_event_listener(const zmk_event_t *eh) { + + if (as_zmk_activity_state_changed(eh)) { + switch (zmk_activity_get_state()) { + case ZMK_ACTIVITY_ACTIVE: + zmk_battery_start_reporting(); + return 0; + case ZMK_ACTIVITY_IDLE: + case ZMK_ACTIVITY_SLEEP: + k_timer_stop(&battery_timer); + return 0; + default: + break; + } + } + return -ENOTSUP; +} + +ZMK_LISTENER(battery, battery_event_listener); + +ZMK_SUBSCRIPTION(battery, zmk_activity_state_changed); + SYS_INIT(zmk_battery_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); From 4e55c5f6e912ca02eebaf402137beb37fa1d3d8e Mon Sep 17 00:00:00 2001 From: Alessandro Bortolin Date: Tue, 6 Sep 2022 12:29:07 +0000 Subject: [PATCH 24/65] feat: handle LED indicators report --- app/CMakeLists.txt | 3 + app/Kconfig | 6 ++ app/include/zmk/ble.h | 1 + .../zmk/events/hid_indicators_changed.h | 16 +++++ app/include/zmk/hid.h | 30 +++++++++ app/include/zmk/hid_indicators.h | 19 ++++++ app/include/zmk/hid_indicators_types.h | 9 +++ app/src/ble.c | 9 +++ app/src/events/hid_indicators_changed.c | 10 +++ app/src/hid_indicators.c | 63 +++++++++++++++++++ app/src/hog.c | 53 +++++++++++++++- app/src/usb_hid.c | 35 +++++++++++ docs/docs/config/system.md | 30 ++++----- 13 files changed, 269 insertions(+), 15 deletions(-) create mode 100644 app/include/zmk/events/hid_indicators_changed.h create mode 100644 app/include/zmk/hid_indicators.h create mode 100644 app/include/zmk/hid_indicators_types.h create mode 100644 app/src/events/hid_indicators_changed.c create mode 100644 app/src/hid_indicators.c diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 0891364b437..41892915f13 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -68,6 +68,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) target_sources(app PRIVATE src/events/layer_state_changed.c) target_sources(app PRIVATE src/events/modifiers_state_changed.c) target_sources(app PRIVATE src/events/keycode_state_changed.c) + target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c) if (CONFIG_ZMK_BLE) target_sources(app PRIVATE src/events/ble_active_profile_changed.c) @@ -83,6 +84,8 @@ target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_bac target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c) target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c) +target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c) + target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c) add_subdirectory(src/split) diff --git a/app/Kconfig b/app/Kconfig index f92f0ae3b86..58825fa53cd 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -87,6 +87,12 @@ config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC endchoice +config ZMK_HID_INDICATORS + bool "HID Indicators" + help + Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock, + Kata, and Compose. + menu "Output Types" config ZMK_USB diff --git a/app/include/zmk/ble.h b/app/include/zmk/ble.h index 92fd595fbcb..4323d0980e4 100644 --- a/app/include/zmk/ble.h +++ b/app/include/zmk/ble.h @@ -27,6 +27,7 @@ int zmk_ble_prof_select(uint8_t index); int zmk_ble_prof_disconnect(uint8_t index); int zmk_ble_active_profile_index(); +int zmk_ble_profile_index(const bt_addr_le_t *addr); bt_addr_le_t *zmk_ble_active_profile_addr(); bool zmk_ble_active_profile_is_open(); bool zmk_ble_active_profile_is_connected(); diff --git a/app/include/zmk/events/hid_indicators_changed.h b/app/include/zmk/events/hid_indicators_changed.h new file mode 100644 index 00000000000..2c3ba088269 --- /dev/null +++ b/app/include/zmk/events/hid_indicators_changed.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include + +struct zmk_hid_indicators_changed { + zmk_hid_indicators indicators; +}; + +ZMK_EVENT_DECLARE(zmk_hid_indicators_changed); diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index aeaa69d8d08..3f7e61bcd45 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -50,6 +50,7 @@ #define ZMK_HID_MAIN_VAL_BUFFERED_BYTES (0x01 << 8) #define ZMK_HID_REPORT_ID_KEYBOARD 0x01 +#define ZMK_HID_REPORT_ID_LEDS 0x01 #define ZMK_HID_REPORT_ID_CONSUMER 0x02 #define ZMK_HID_REPORT_ID_MOUSE 0x03 @@ -73,6 +74,22 @@ static const uint8_t zmk_hid_report_desc[] = { HID_REPORT_COUNT(0x01), HID_INPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + + HID_USAGE_PAGE(HID_USAGE_LED), + HID_USAGE_MIN8(HID_USAGE_LED_NUM_LOCK), + HID_USAGE_MAX8(HID_USAGE_LED_KANA), + HID_REPORT_SIZE(0x01), + HID_REPORT_COUNT(0x05), + HID_OUTPUT(ZMK_HID_MAIN_VAL_DATA | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + + HID_USAGE_PAGE(HID_USAGE_LED), + HID_REPORT_SIZE(0x03), + HID_REPORT_COUNT(0x01), + HID_OUTPUT(ZMK_HID_MAIN_VAL_CONST | ZMK_HID_MAIN_VAL_VAR | ZMK_HID_MAIN_VAL_ABS), + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + HID_USAGE_PAGE(HID_USAGE_KEY), #if IS_ENABLED(CONFIG_ZMK_HID_REPORT_TYPE_NKRO) @@ -189,6 +206,19 @@ struct zmk_hid_keyboard_report { struct zmk_hid_keyboard_report_body body; } __packed; +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + +struct zmk_hid_led_report_body { + uint8_t leds; +} __packed; + +struct zmk_hid_led_report { + uint8_t report_id; + struct zmk_hid_led_report_body body; +} __packed; + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + struct zmk_hid_consumer_report_body { #if IS_ENABLED(CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC) uint8_t keys[CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE]; diff --git a/app/include/zmk/hid_indicators.h b/app/include/zmk/hid_indicators.h new file mode 100644 index 00000000000..69cee13dba2 --- /dev/null +++ b/app/include/zmk/hid_indicators.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +#include +#include +#include + +zmk_hid_indicators zmk_hid_indicators_get_current_profile(void); +zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); +void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, + struct zmk_endpoint_instance endpoint); + +void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, + struct zmk_endpoint_instance endpoint); diff --git a/app/include/zmk/hid_indicators_types.h b/app/include/zmk/hid_indicators_types.h new file mode 100644 index 00000000000..aa1504f6bdb --- /dev/null +++ b/app/include/zmk/hid_indicators_types.h @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#pragma once + +typedef uint8_t zmk_hid_indicators; diff --git a/app/src/ble.c b/app/src/ble.c index 8c991c54b80..fdbde81dabd 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -224,6 +224,15 @@ int zmk_ble_clear_bonds() { int zmk_ble_active_profile_index() { return active_profile; } +int zmk_ble_profile_index(const bt_addr_le_t *addr) { + for (int i = 0; i < ZMK_BLE_PROFILE_COUNT; i++) { + if (bt_addr_le_cmp(addr, &profiles[i].peer) == 0) { + return i; + } + } + return -ENODEV; +} + #if IS_ENABLED(CONFIG_SETTINGS) static void ble_save_profile_work(struct k_work *work) { settings_save_one("ble/active_profile", &active_profile, sizeof(active_profile)); diff --git a/app/src/events/hid_indicators_changed.c b/app/src/events/hid_indicators_changed.c new file mode 100644 index 00000000000..ded368354d0 --- /dev/null +++ b/app/src/events/hid_indicators_changed.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +ZMK_EVENT_IMPL(zmk_hid_indicators_changed); diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c new file mode 100644 index 00000000000..db769146a2e --- /dev/null +++ b/app/src/hid_indicators.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +static zmk_hid_indicators hid_indicators[ZMK_ENDPOINT_COUNT]; + +zmk_hid_indicators zmk_hid_indicators_get_current_profile(void) { + return zmk_hid_indicators_get_profile(zmk_endpoints_selected()); +} + +zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { + int profile = zmk_endpoint_instance_to_index(endpoint); + return hid_indicators[profile]; +} + +static void raise_led_changed_event(struct k_work *_work) { + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){ + .indicators = zmk_hid_indicators_get_current_profile()})); +} + +static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); + +void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, + struct zmk_endpoint_instance endpoint) { + int profile = zmk_endpoint_instance_to_index(endpoint); + + // This write is not happening on the main thread. To prevent potential data races, every + // operation involving hid_indicators must be atomic. Currently, each function either reads + // or writes only one entry at a time, so it is safe to do these operations without a lock. + hid_indicators[profile] = indicators; + + k_work_submit(&led_changed_work); +} + +void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, + struct zmk_endpoint_instance endpoint) { + uint8_t indicators = report->leds; + zmk_hid_indicators_set_profile(indicators, endpoint); + + LOG_DBG("Update HID indicators: endpoint=%d, indicators=%x", endpoint.transport, indicators); +} + +static int profile_listener(const zmk_event_t *eh) { + raise_led_changed_event(NULL); + return 0; +} + +static ZMK_LISTENER(profile_listener, profile_listener); +static ZMK_SUBSCRIPTION(profile_listener, zmk_endpoint_changed); diff --git a/app/src/hog.c b/app/src/hog.c index 89a903cb967..1baf00b53b5 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -15,8 +15,12 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include +#include #include #include +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) enum { HIDS_REMOTE_WAKE = BIT(0), @@ -51,6 +55,15 @@ static struct hids_report input = { .type = HIDS_INPUT, }; +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + +static struct hids_report led_indicators = { + .id = ZMK_HID_REPORT_ID_LEDS, + .type = HIDS_OUTPUT, +}; + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + static struct hids_report consumer_input = { .id = ZMK_HID_REPORT_ID_CONSUMER, .type = HIDS_INPUT, @@ -94,6 +107,34 @@ static ssize_t read_hids_input_report(struct bt_conn *conn, const struct bt_gatt sizeof(struct zmk_hid_keyboard_report_body)); } +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +static ssize_t write_hids_leds_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + if (offset != 0) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + if (len != sizeof(struct zmk_hid_led_report_body)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); + } + + struct zmk_hid_led_report_body *report = (struct zmk_hid_led_report_body *)buf; + int profile = zmk_ble_profile_index(bt_conn_get_dst(conn)); + if (profile < 0) { + return BT_GATT_ERR(BT_ATT_ERR_UNLIKELY); + } + + struct zmk_endpoint_instance endpoint = {.transport = ZMK_TRANSPORT_BLE, + .ble = { + .profile_index = profile, + }}; + zmk_hid_indicators_process_report(report, endpoint); + + return len; +} + +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + static ssize_t read_hids_consumer_input_report(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { @@ -152,6 +193,7 @@ BT_GATT_SERVICE_DEFINE( BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, NULL, &input), + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, read_hids_consumer_input_report, NULL, NULL), BT_GATT_CCC(input_ccc_changed, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), @@ -166,6 +208,15 @@ BT_GATT_SERVICE_DEFINE( NULL, &mouse_input), #endif // IS_ENABLED(CONFIG_ZMK_MOUSE) +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, + BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, + BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT, NULL, + write_hids_leds_report, NULL), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &led_indicators), +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_CTRL_POINT, BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE, NULL, write_ctrl_point, &ctrl_point)); @@ -251,7 +302,7 @@ void send_consumer_report_callback(struct k_work *work) { } struct bt_gatt_notify_params notify_params = { - .attr = &hog_svc.attrs[10], + .attr = &hog_svc.attrs[9], .data = &report, .len = sizeof(report), }; diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index fd58c14bf4a..3412314086f 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -13,6 +13,9 @@ #include #include #include +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -83,12 +86,44 @@ static int get_report_cb(const struct device *dev, struct usb_setup_packet *setu return 0; } +static int set_report_cb(const struct device *dev, struct usb_setup_packet *setup, int32_t *len, + uint8_t **data) { + if ((setup->wValue & HID_GET_REPORT_TYPE_MASK) != HID_REPORT_TYPE_OUTPUT) { + LOG_ERR("Unsupported report type %d requested", + (setup->wValue & HID_GET_REPORT_TYPE_MASK) >> 8); + return -ENOTSUP; + } + + switch (setup->wValue & HID_GET_REPORT_ID_MASK) { +#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + case ZMK_HID_REPORT_ID_LEDS: + if (*len != sizeof(struct zmk_hid_led_report)) { + LOG_ERR("LED set report is malformed: length=%d", *len); + return -EINVAL; + } else { + struct zmk_hid_led_report *report = (struct zmk_hid_led_report *)*data; + struct zmk_endpoint_instance endpoint = { + .transport = ZMK_TRANSPORT_USB, + }; + zmk_hid_indicators_process_report(&report->body, endpoint); + } + break; +#endif // IS_ENABLED(CONFIG_ZMK_HID_INDICATORS) + default: + LOG_ERR("Invalid report ID %d requested", setup->wValue & HID_GET_REPORT_ID_MASK); + return -EINVAL; + } + + return 0; +} + static const struct hid_ops ops = { #if IS_ENABLED(CONFIG_ZMK_USB_BOOT) .protocol_change = set_proto_cb, #endif .int_in_ready = in_ready_cb, .get_report = get_report_cb, + .set_report = set_report_cb, }; static int zmk_usb_hid_send_report(const uint8_t *report, size_t len) { diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index b9dd580de0c..6e834c678b9 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -22,9 +22,10 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ ### HID -| Config | Type | Description | Default | -| ------------------------------------- | ---- | ------------------------------------------------- | ------- | -| `CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE` | int | Number of consumer keys simultaneously reportable | 6 | +| Config | Type | Description | Default | +| ------------------------------------- | ---- | -------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_HID_INDICATORS` | bool | Enable reciept of HID/LED indicator state from connected hosts | n | +| `CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE` | int | Number of consumer keys simultaneously reportable | 6 | Exactly zero or one of the following options may be set to `y`. The first is used if none are set. @@ -91,14 +92,15 @@ Note that `CONFIG_BT_MAX_CONN` and `CONFIG_BT_MAX_PAIRED` should be set to the s Following split keyboard settings are defined in [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/Kconfig) (generic) and [zmk/app/src/split/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/src/split/bluetooth/Kconfig) (bluetooth). -| Config | Type | Description | Default | -| ----------------------------------------------------- | ---- | ----------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | -| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | -| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | -| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | -| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | +| Config | Type | Description | Default | +| ----------------------------------------------------- | ---- | ------------------------------------------------------------------------ | ------- | +| `CONFIG_ZMK_SPLIT` | bool | Enable split keyboard support | n | +| `CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS` | bool | Enable split keyboard support for passing indicator state to peripherals | n | +| `CONFIG_ZMK_SPLIT_BLE` | bool | Use BLE to communicate between split keyboard halves | y | +| `CONFIG_ZMK_SPLIT_ROLE_CENTRAL` | bool | `y` for central device, `n` for peripheral | | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue when received from peripherals | 5 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE` | int | Stack size of the BLE split central write thread | 512 | +| `CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_QUEUE_SIZE` | int | Max number of behavior run events to queue to send to the peripheral(s) | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE` | int | Stack size of the BLE split peripheral notify thread | 650 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY` | int | Priority of the BLE split peripheral notify thread | 5 | +| `CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE` | int | Max number of key state events to queue to send to the central | 10 | From d9bb0d7d0e05c547d1138c48746a72660d2bf326 Mon Sep 17 00:00:00 2001 From: Alessandro Bortolin Date: Sun, 27 Nov 2022 18:11:43 +0100 Subject: [PATCH 25/65] feat: LED indicators on peripheral side --- app/include/zmk/split/bluetooth/central.h | 12 ++++- app/include/zmk/split/bluetooth/uuid.h | 1 + app/src/hid_indicators.c | 10 +++- app/src/split/Kconfig | 6 +++ app/src/split/bluetooth/central.c | 56 ++++++++++++++++++++++- app/src/split/bluetooth/service.c | 38 +++++++++++++++ 6 files changed, 119 insertions(+), 4 deletions(-) diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h index 443d9b1b489..d38b51e88cd 100644 --- a/app/include/zmk/split/bluetooth/central.h +++ b/app/include/zmk/split/bluetooth/central.h @@ -4,5 +4,15 @@ #include #include +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, - struct zmk_behavior_binding_event event, bool state); \ No newline at end of file + struct zmk_behavior_binding_event event, bool state); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators); + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) diff --git a/app/include/zmk/split/bluetooth/uuid.h b/app/include/zmk/split/bluetooth/uuid.h index c38131dd83e..dccdfc804c5 100644 --- a/app/include/zmk/split/bluetooth/uuid.h +++ b/app/include/zmk/split/bluetooth/uuid.h @@ -17,3 +17,4 @@ #define ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000001) #define ZMK_SPLIT_BT_CHAR_RUN_BEHAVIOR_UUID ZMK_BT_SPLIT_UUID(0x00000002) #define ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID ZMK_BT_SPLIT_UUID(0x00000003) +#define ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID ZMK_BT_SPLIT_UUID(0x00000004) diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c index db769146a2e..45cac96a04c 100644 --- a/app/src/hid_indicators.c +++ b/app/src/hid_indicators.c @@ -28,8 +28,14 @@ zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance e } static void raise_led_changed_event(struct k_work *_work) { - ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){ - .indicators = zmk_hid_indicators_get_current_profile()})); + zmk_hid_indicators indicators = zmk_hid_indicators_get_current_profile(); + + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( + (struct zmk_hid_indicators_changed){.indicators = indicators})); + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) && IS_ENABLED(CONFIG_ZMK_SPLIT_BLE) + zmk_split_bt_update_hid_indicator(indicators); +#endif } static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); diff --git a/app/src/split/Kconfig b/app/src/split/Kconfig index dbe5f092644..1134937056f 100644 --- a/app/src/split/Kconfig +++ b/app/src/split/Kconfig @@ -20,6 +20,12 @@ config ZMK_SPLIT_BLE endchoice +config ZMK_SPLIT_PERIPHERAL_HID_INDICATORS + bool "Peripheral HID Indicators" + depends on ZMK_HID_INDICATORS + help + Enable propogating the HID (LED) Indicator state to the split peripheral(s). + #ZMK_SPLIT endif diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 860e89a5f3e..d39309d2f76 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -27,6 +27,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include static int start_scanning(void); @@ -46,6 +47,9 @@ struct peripheral_slot { struct bt_gatt_subscribe_params sensor_subscribe_params; struct bt_gatt_discover_params sub_discover_params; uint16_t run_behavior_handle; +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + uint16_t update_hid_indicators; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) uint8_t position_state[POSITION_STATE_DATA_LEN]; uint8_t changed_positions[POSITION_STATE_DATA_LEN]; }; @@ -131,6 +135,9 @@ int release_peripheral_slot(int index) { // Clean up previously discovered handles; slot->subscribe_params.value_handle = 0; slot->run_behavior_handle = 0; +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + slot->update_hid_indicators = 0; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) return 0; } @@ -329,13 +336,23 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn, slot->discover_params.uuid = NULL; slot->discover_params.start_handle = attr->handle + 2; slot->run_behavior_handle = bt_gatt_attr_value_handle(attr); +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + } else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid, + BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID))) { + LOG_DBG("Found update HID indicators handle"); + slot->update_hid_indicators = bt_gatt_attr_value_handle(attr); +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) } - bool subscribed = slot->run_behavior_handle && slot->subscribe_params.value_handle; + bool subscribed = (slot->run_behavior_handle && slot->subscribe_params.value_handle); #if ZMK_KEYMAP_HAS_SENSORS subscribed = subscribed && slot->sensor_subscribe_params.value_handle; #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + subscribed = subscribed && slot->update_hid_indicators; +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + return subscribed ? BT_GATT_ITER_STOP : BT_GATT_ITER_CONTINUE; } @@ -685,6 +702,43 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi return split_bt_invoke_behavior_payload(wrapper); } +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +static zmk_hid_indicators hid_indicators = 0; + +static void split_central_update_indicators_callback(struct k_work *work) { + zmk_hid_indicators indicators = hid_indicators; + for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { + if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { + continue; + } + + if (peripherals[i].update_hid_indicators == 0) { + // It appears that sometimes the peripheral is considered connected + // before the GATT characteristics have been discovered. If this is + // the case, the update_hid_indicators handle will not yet be set. + continue; + } + + int err = bt_gatt_write_without_response(peripherals[i].conn, + peripherals[i].update_hid_indicators, &indicators, + sizeof(indicators), true); + + if (err) { + LOG_ERR("Failed to write HID indicator characteristic (err %d)", err); + } + } +} + +static K_WORK_DEFINE(split_central_update_indicators, split_central_update_indicators_callback); + +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators) { + hid_indicators = indicators; + return k_work_submit_to_queue(&split_central_split_run_q, &split_central_update_indicators); +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + int zmk_split_bt_central_init(const struct device *_arg) { k_work_queue_start(&split_central_split_run_q, split_central_split_run_q_stack, K_THREAD_STACK_SIZEOF(split_central_split_run_q_stack), diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index 620df53e11c..f9d8bab0de4 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -21,6 +21,11 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include + +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) +#include +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + #include #include @@ -105,6 +110,34 @@ static void split_svc_pos_state_ccc(const struct bt_gatt_attr *attr, uint16_t va LOG_DBG("value %d", value); } +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + +static zmk_hid_indicators hid_indicators = 0; + +static void split_svc_update_indicators_callback(struct k_work *work) { + LOG_DBG("Raising HID indicators changed event: %x", hid_indicators); + ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( + (struct zmk_hid_indicators_changed){.indicators = hid_indicators})); +} + +static K_WORK_DEFINE(split_svc_update_indicators_work, split_svc_update_indicators_callback); + +static ssize_t split_svc_update_indicators(struct bt_conn *conn, const struct bt_gatt_attr *attr, + const void *buf, uint16_t len, uint16_t offset, + uint8_t flags) { + if (offset + len > sizeof(zmk_hid_indicators)) { + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); + } + + memcpy((uint8_t *)&hid_indicators + offset, buf, len); + + k_work_submit(&split_svc_update_indicators_work); + + return len; +} + +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + BT_GATT_SERVICE_DEFINE( split_svc, BT_GATT_PRIMARY_SERVICE(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID)), BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID), @@ -122,6 +155,11 @@ BT_GATT_SERVICE_DEFINE( split_svc_sensor_state, NULL, &last_sensor_event), BT_GATT_CCC(split_svc_sensor_state_ccc, BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT), #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) + BT_GATT_CHARACTERISTIC(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID), + BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE_ENCRYPT, NULL, + split_svc_update_indicators, NULL), +#endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) ); K_THREAD_STACK_DEFINE(service_q_stack, CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE); From 817ce8764fcb9ad89d3cb8464d18c07b7169ed25 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 27 Nov 2023 23:48:13 +0000 Subject: [PATCH 26/65] refactor: Move to `zmk_hid_indicators_t` type. --- app/include/zmk/events/hid_indicators_changed.h | 2 +- app/include/zmk/hid_indicators.h | 6 +++--- app/include/zmk/hid_indicators_types.h | 2 +- app/include/zmk/split/bluetooth/central.h | 2 +- app/src/hid_indicators.c | 14 +++++++------- app/src/split/bluetooth/central.c | 6 +++--- app/src/split/bluetooth/service.c | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/include/zmk/events/hid_indicators_changed.h b/app/include/zmk/events/hid_indicators_changed.h index 2c3ba088269..b1fba797559 100644 --- a/app/include/zmk/events/hid_indicators_changed.h +++ b/app/include/zmk/events/hid_indicators_changed.h @@ -10,7 +10,7 @@ #include struct zmk_hid_indicators_changed { - zmk_hid_indicators indicators; + zmk_hid_indicators_t indicators; }; ZMK_EVENT_DECLARE(zmk_hid_indicators_changed); diff --git a/app/include/zmk/hid_indicators.h b/app/include/zmk/hid_indicators.h index 69cee13dba2..7c7b89f53ce 100644 --- a/app/include/zmk/hid_indicators.h +++ b/app/include/zmk/hid_indicators.h @@ -10,9 +10,9 @@ #include #include -zmk_hid_indicators zmk_hid_indicators_get_current_profile(void); -zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); -void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, +zmk_hid_indicators_t zmk_hid_indicators_get_current_profile(void); +zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint); +void zmk_hid_indicators_set_profile(zmk_hid_indicators_t indicators, struct zmk_endpoint_instance endpoint); void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, diff --git a/app/include/zmk/hid_indicators_types.h b/app/include/zmk/hid_indicators_types.h index aa1504f6bdb..43bcf3c5bb2 100644 --- a/app/include/zmk/hid_indicators_types.h +++ b/app/include/zmk/hid_indicators_types.h @@ -6,4 +6,4 @@ #pragma once -typedef uint8_t zmk_hid_indicators; +typedef uint8_t zmk_hid_indicators_t; diff --git a/app/include/zmk/split/bluetooth/central.h b/app/include/zmk/split/bluetooth/central.h index d38b51e88cd..4706b3aa831 100644 --- a/app/include/zmk/split/bluetooth/central.h +++ b/app/include/zmk/split/bluetooth/central.h @@ -13,6 +13,6 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators); +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) diff --git a/app/src/hid_indicators.c b/app/src/hid_indicators.c index 45cac96a04c..50b2fbcc9ba 100644 --- a/app/src/hid_indicators.c +++ b/app/src/hid_indicators.c @@ -16,19 +16,19 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); -static zmk_hid_indicators hid_indicators[ZMK_ENDPOINT_COUNT]; +static zmk_hid_indicators_t hid_indicators[ZMK_ENDPOINT_COUNT]; -zmk_hid_indicators zmk_hid_indicators_get_current_profile(void) { +zmk_hid_indicators_t zmk_hid_indicators_get_current_profile(void) { return zmk_hid_indicators_get_profile(zmk_endpoints_selected()); } -zmk_hid_indicators zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { - int profile = zmk_endpoint_instance_to_index(endpoint); +zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance endpoint) { + const int profile = zmk_endpoint_instance_to_index(endpoint); return hid_indicators[profile]; } static void raise_led_changed_event(struct k_work *_work) { - zmk_hid_indicators indicators = zmk_hid_indicators_get_current_profile(); + const zmk_hid_indicators_t indicators = zmk_hid_indicators_get_current_profile(); ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed( (struct zmk_hid_indicators_changed){.indicators = indicators})); @@ -40,7 +40,7 @@ static void raise_led_changed_event(struct k_work *_work) { static K_WORK_DEFINE(led_changed_work, raise_led_changed_event); -void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, +void zmk_hid_indicators_set_profile(zmk_hid_indicators_t indicators, struct zmk_endpoint_instance endpoint) { int profile = zmk_endpoint_instance_to_index(endpoint); @@ -54,7 +54,7 @@ void zmk_hid_indicators_set_profile(zmk_hid_indicators indicators, void zmk_hid_indicators_process_report(struct zmk_hid_led_report_body *report, struct zmk_endpoint_instance endpoint) { - uint8_t indicators = report->leds; + const zmk_hid_indicators_t indicators = (zmk_hid_indicators_t)report->leds; zmk_hid_indicators_set_profile(indicators, endpoint); LOG_DBG("Update HID indicators: endpoint=%d, indicators=%x", endpoint.transport, indicators); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index d39309d2f76..6f3b78ab883 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -704,10 +704,10 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -static zmk_hid_indicators hid_indicators = 0; +static zmk_hid_indicators_t hid_indicators = 0; static void split_central_update_indicators_callback(struct k_work *work) { - zmk_hid_indicators indicators = hid_indicators; + zmk_hid_indicators_t indicators = hid_indicators; for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) { if (peripherals[i].state != PERIPHERAL_SLOT_STATE_CONNECTED) { continue; @@ -732,7 +732,7 @@ static void split_central_update_indicators_callback(struct k_work *work) { static K_WORK_DEFINE(split_central_update_indicators, split_central_update_indicators_callback); -int zmk_split_bt_update_hid_indicator(zmk_hid_indicators indicators) { +int zmk_split_bt_update_hid_indicator(zmk_hid_indicators_t indicators) { hid_indicators = indicators; return k_work_submit_to_queue(&split_central_split_run_q, &split_central_update_indicators); } diff --git a/app/src/split/bluetooth/service.c b/app/src/split/bluetooth/service.c index f9d8bab0de4..0072cf8c835 100644 --- a/app/src/split/bluetooth/service.c +++ b/app/src/split/bluetooth/service.c @@ -112,7 +112,7 @@ static void split_svc_pos_state_ccc(const struct bt_gatt_attr *attr, uint16_t va #if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) -static zmk_hid_indicators hid_indicators = 0; +static zmk_hid_indicators_t hid_indicators = 0; static void split_svc_update_indicators_callback(struct k_work *work) { LOG_DBG("Raising HID indicators changed event: %x", hid_indicators); @@ -125,7 +125,7 @@ static K_WORK_DEFINE(split_svc_update_indicators_work, split_svc_update_indicato static ssize_t split_svc_update_indicators(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags) { - if (offset + len > sizeof(zmk_hid_indicators)) { + if (offset + len > sizeof(zmk_hid_indicators_t)) { return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); } From 69f7bfb40911d4bbf9af0910d956a092d5fb9159 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Tue, 28 Nov 2023 00:09:58 +0000 Subject: [PATCH 27/65] feat(boards): Kinesis Advantage 360 pro Add the Kinesis Advantage 360 Pro board definition. --- app/boards/arm/adv360pro/Kconfig | 7 + app/boards/arm/adv360pro/Kconfig.board | 12 ++ app/boards/arm/adv360pro/Kconfig.defconfig | 55 ++++++ app/boards/arm/adv360pro/README.md | 7 + .../arm/adv360pro/adv360pro-pinctrl.dtsi | 30 ++++ app/boards/arm/adv360pro/adv360pro.dtsi | 163 ++++++++++++++++++ app/boards/arm/adv360pro/adv360pro.keymap | 48 ++++++ app/boards/arm/adv360pro/adv360pro.yaml | 19 ++ app/boards/arm/adv360pro/adv360pro.zmk.yml | 16 ++ app/boards/arm/adv360pro/adv360pro_left.dts | 36 ++++ .../arm/adv360pro/adv360pro_left_defconfig | 55 ++++++ app/boards/arm/adv360pro/adv360pro_right.dts | 40 +++++ .../arm/adv360pro/adv360pro_right_defconfig | 54 ++++++ app/boards/arm/adv360pro/board.cmake | 8 + 14 files changed, 550 insertions(+) create mode 100644 app/boards/arm/adv360pro/Kconfig create mode 100644 app/boards/arm/adv360pro/Kconfig.board create mode 100644 app/boards/arm/adv360pro/Kconfig.defconfig create mode 100755 app/boards/arm/adv360pro/README.md create mode 100644 app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi create mode 100644 app/boards/arm/adv360pro/adv360pro.dtsi create mode 100644 app/boards/arm/adv360pro/adv360pro.keymap create mode 100644 app/boards/arm/adv360pro/adv360pro.yaml create mode 100644 app/boards/arm/adv360pro/adv360pro.zmk.yml create mode 100644 app/boards/arm/adv360pro/adv360pro_left.dts create mode 100644 app/boards/arm/adv360pro/adv360pro_left_defconfig create mode 100644 app/boards/arm/adv360pro/adv360pro_right.dts create mode 100644 app/boards/arm/adv360pro/adv360pro_right_defconfig create mode 100644 app/boards/arm/adv360pro/board.cmake diff --git a/app/boards/arm/adv360pro/Kconfig b/app/boards/arm/adv360pro/Kconfig new file mode 100644 index 00000000000..1840851c2bb --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/Kconfig.board b/app/boards/arm/adv360pro/Kconfig.board new file mode 100644 index 00000000000..51ebaec0791 --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig.board @@ -0,0 +1,12 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +config BOARD_ADV360PRO_LEFT + bool "adv360pro_left" + depends on SOC_NRF52840_QIAA + +config BOARD_ADV360PRO_RIGHT + bool "adv360pro_right" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/adv360pro/Kconfig.defconfig b/app/boards/arm/adv360pro/Kconfig.defconfig new file mode 100644 index 00000000000..0c4abacfbfa --- /dev/null +++ b/app/boards/arm/adv360pro/Kconfig.defconfig @@ -0,0 +1,55 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +if BOARD_ADV360PRO_LEFT + +config ZMK_KEYBOARD_NAME + default "Adv360 Pro" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # BOARD_ADV360PRO_LEFT + +if BOARD_ADV360PRO_RIGHT + +config ZMK_KEYBOARD_NAME + default "Adv360 Pro rt" + +endif # BOARD_ADV360PRO_RIGHT + + +if BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT + +config BOARD + default "adv360pro" + +config ZMK_SPLIT + default y + +config SPI + bool + default y + +config BT_CTLR + default BT + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +endif # USB + +config ZMK_BATTERY_VOLTAGE_DIVIDER + default y + +config SPI + default y + +endif # BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT diff --git a/app/boards/arm/adv360pro/README.md b/app/boards/arm/adv360pro/README.md new file mode 100755 index 00000000000..89fa1da5152 --- /dev/null +++ b/app/boards/arm/adv360pro/README.md @@ -0,0 +1,7 @@ +# Kinesis Advantage 360 Professional + +This board definition provides upstream support for the [Kinesis Advantage 360 Professional](https://kinesis-ergo.com/keyboards/advantage360/) + +Kinesis offer a specific [custom configuration](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/) for the 360 Pro that references [a customised version of ZMK](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) with Advantage 360 Pro specific functionality and changes over base ZMK. The Kinesis fork is regularly updated to bring the latest updates and changes from base ZMK however will not always be completely up to date, some features such as new keycodes will not be immediately available on the 360 Pro after they are implemented in base ZMK. + +When using this board definition some of the more advanced features (the indicator RGB leds) will not work, and Kinesis cannot provide customer service for usage of base ZMK. Likewise the ZMK community cannot provide support for either the Kinesis keymap editor, nor any usage of the Kinesis custom fork. diff --git a/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi b/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi new file mode 100644 index 00000000000..7dafcdcecf4 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * SPDX-License-Identifier: MIT + */ + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/arm/adv360pro/adv360pro.dtsi new file mode 100644 index 00000000000..85ff5d1cfd1 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.dtsi @@ -0,0 +1,163 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +/dts-v1/; +#include + +#include +#include + +#include "adv360pro-pinctrl.dtsi" + +/ { + model = "Adv360 Pro"; + compatible = "kinesis,adv360pro"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; + zmk,kscan = &kscan0; + zmk,backlight = &backlight; + zmk,battery = &vbatt; + zmk,matrix_transform = &default_transform; + zmk,underglow = &led_strip; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <20>; + rows = <5>; + + + map = < + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19) + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19) + + >; + }; + ext-power { + compatible = "zmk,ext-power-generic"; + label = "EXT_POWER"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + io-channels = <&adc 2>; + output-ohms = <100000>; + full-ohms = <(100000 + 100000)>; + }; + + backlight: pwmleds { + compatible = "pwm-leds"; + pwm_led_0 { + pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>; + }; + }; + +}; + +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + label = "softdevice"; + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000c6000>; + }; + + /* + * The flash starting at 0x000ec000 and ending at + * 0x000f3fff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@ec000 { + label = "storage"; + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <3>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro.keymap b/app/boards/arm/adv360pro/adv360pro.keymap new file mode 100644 index 00000000000..999781e437f --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.keymap @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT + &mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2 + >; + }; + keypad { + bindings = < + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT + &mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &mo 2 + >; + }; + fn { + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &mo 3 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + mod { + bindings = < + &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none + &none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bt BT_CLR &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none + >; + }; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro.yaml b/app/boards/arm/adv360pro/adv360pro.yaml new file mode 100644 index 00000000000..2d555d4e20c --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.yaml @@ -0,0 +1,19 @@ +identifier: adv360pro +name: Advantage 360 Pro +type: keyboard +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - gpio + - i2c + - counter + - spi + - usb_device + - nvs + - can + - kscan + - ble + - pwm diff --git a/app/boards/arm/adv360pro/adv360pro.zmk.yml b/app/boards/arm/adv360pro/adv360pro.zmk.yml new file mode 100644 index 00000000000..7d4a4b44495 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro.zmk.yml @@ -0,0 +1,16 @@ +file_format: "1" +id: adv360pro +name: Advantage 360 Pro +type: board +url: https://kinesis-ergo.com/keyboards/advantage360 +arch: arm +features: + - keys + - underglow + - backlight +outputs: + - usb + - ble +siblings: + - adv360pro_left + - adv360pro_right diff --git a/app/boards/arm/adv360pro/adv360pro_left.dts b/app/boards/arm/adv360pro/adv360pro_left.dts new file mode 100644 index 00000000000..6ef5f59071b --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_left.dts @@ -0,0 +1,36 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "adv360pro.dtsi" + +/{ + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + col-gpios + = <&gpio0 25 GPIO_ACTIVE_HIGH> + , <&gpio0 11 GPIO_ACTIVE_HIGH> + , <&gpio0 2 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + , <&gpio0 29 GPIO_ACTIVE_HIGH> + , <&gpio0 30 GPIO_ACTIVE_HIGH> + , <&gpio0 31 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + ; + }; +}; diff --git a/app/boards/arm/adv360pro/adv360pro_left_defconfig b/app/boards/arm/adv360pro/adv360pro_left_defconfig new file mode 100644 index 00000000000..6eb5a8d042a --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_left_defconfig @@ -0,0 +1,55 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_ADV360PRO_LEFT=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI for LEDS +CONFIG_PINCTRL=y +CONFIG_SPI=y +CONFIG_SPI_NRFX=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y + +#RGB leds config +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 +CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +#Backlighting configuration +CONFIG_PWM=y +CONFIG_LED_PWM=y +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_BRT_START=20 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y + +#Misc configuration +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/adv360pro/adv360pro_right.dts b/app/boards/arm/adv360pro/adv360pro_right.dts new file mode 100644 index 00000000000..97d846f855c --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_right.dts @@ -0,0 +1,40 @@ +/* +* +* Copyright (c) 2023 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include "adv360pro.dtsi" + +/{ + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + col-gpios + = <&gpio0 12 GPIO_ACTIVE_HIGH> + , <&gpio1 9 GPIO_ACTIVE_HIGH> + , <&gpio0 7 GPIO_ACTIVE_HIGH> + , <&gpio1 11 GPIO_ACTIVE_HIGH> + , <&gpio1 10 GPIO_ACTIVE_HIGH> + , <&gpio1 13 GPIO_ACTIVE_HIGH> + , <&gpio1 15 GPIO_ACTIVE_HIGH> + , <&gpio0 3 GPIO_ACTIVE_HIGH> + , <&gpio0 2 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + ; + }; +}; + +&default_transform { + col-offset = <10>; +}; diff --git a/app/boards/arm/adv360pro/adv360pro_right_defconfig b/app/boards/arm/adv360pro/adv360pro_right_defconfig new file mode 100644 index 00000000000..b5174549ea4 --- /dev/null +++ b/app/boards/arm/adv360pro/adv360pro_right_defconfig @@ -0,0 +1,54 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_ADV360PRO_RIGHT=y + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI for LEDS +CONFIG_PINCTRL=y +CONFIG_SPI=y +CONFIG_SPI_NRFX=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +# Enable 32kHz crystal +CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y + +#RGB leds config +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 +CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y + +#Backlighting configuration +CONFIG_PWM=y +CONFIG_LED_PWM=y +CONFIG_ZMK_BACKLIGHT=y +CONFIG_ZMK_BACKLIGHT_BRT_START=20 +CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y + +#Misc configuration +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_ZMK_BLE=y diff --git a/app/boards/arm/adv360pro/board.cmake b/app/boards/arm/adv360pro/board.cmake new file mode 100644 index 00000000000..6d62a8a16bf --- /dev/null +++ b/app/boards/arm/adv360pro/board.cmake @@ -0,0 +1,8 @@ +# +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") + +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) From 744f70c80c84cc0e471db41c3834a4030b4743dc Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 1 Dec 2023 23:39:31 +0000 Subject: [PATCH 28/65] feat(bt): Add support for unauth overwrite * Properly handle the user enabling the `CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE` Zephyr flag and handle re-pairing to an existing taken profile from the same address. --- app/src/ble.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index fdbde81dabd..501d4752ba4 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -551,13 +551,19 @@ static void auth_cancel(struct bt_conn *conn) { LOG_DBG("Pairing cancelled: %s", addr); } +static bool pairing_allowed_for_current_profile(struct bt_conn *conn) { + return zmk_ble_active_profile_is_open() || + (IS_ENABLED(CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE) && + bt_addr_le_cmp(zmk_ble_active_profile_addr(), bt_conn_get_dst(conn)) == 0); +} + static enum bt_security_err auth_pairing_accept(struct bt_conn *conn, const struct bt_conn_pairing_feat *const feat) { struct bt_conn_info info; bt_conn_get_info(conn, &info); LOG_DBG("role %d, open? %s", info.role, zmk_ble_active_profile_is_open() ? "yes" : "no"); - if (info.role == BT_CONN_ROLE_PERIPHERAL && !zmk_ble_active_profile_is_open()) { + if (info.role == BT_CONN_ROLE_PERIPHERAL && !pairing_allowed_for_current_profile(conn)) { LOG_WRN("Rejecting pairing request to taken profile %d", active_profile); return BT_SECURITY_ERR_PAIR_NOT_ALLOWED; } @@ -578,7 +584,7 @@ static void auth_pairing_complete(struct bt_conn *conn, bool bonded) { return; } - if (!zmk_ble_active_profile_is_open()) { + if (!pairing_allowed_for_current_profile(conn)) { LOG_ERR("Pairing completed but current profile is not open: %s", addr); bt_unpair(BT_ID_DEFAULT, dst); return; From 329d6474ee4eed9791d53f9dcfc6dd0ec6401701 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 30 Nov 2023 06:48:35 +0000 Subject: [PATCH 29/65] feat(ble): Make it possible to use BT_GATT_AUTO_SEC_REQ * Only upgrade security of new connections if BT_GATT_AUTO_SEC_REQ is not enabled. --- app/src/ble.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/ble.c b/app/src/ble.c index 501d4752ba4..b29a098b0b9 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -445,9 +445,11 @@ static void connected(struct bt_conn *conn, uint8_t err) { LOG_DBG("Connected %s", addr); +#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) if (bt_conn_set_security(conn, BT_SECURITY_L2)) { LOG_ERR("Failed to set security"); } +#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) update_advertising(); From 3fad4dba07c22cfbe6e54512cd2052da3aca4f10 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 1 Dec 2023 23:33:29 +0000 Subject: [PATCH 30/65] fix(bt): Passkey entry pairing fixes. * Don't propogate any key press events while in the middle of passkey entry, avoid funky state on hosts. * Handle passkey on release, not press, to ensure key *releases* are not accidentally sent, especially the Enter release at the very end of passkey entry, which can trigger cancel in the dialog if the keyboard is connected via USB to the same host. --- app/src/ble.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/ble.c b/app/src/ble.c index b29a098b0b9..a6e63cb51ee 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -704,9 +704,9 @@ static int zmk_ble_handle_key_user(struct zmk_keycode_state_changed *event) { return ZMK_EV_EVENT_BUBBLE; } - if (!event->state) { - LOG_DBG("Key released, ignoring"); - return ZMK_EV_EVENT_BUBBLE; + if (event->state) { + LOG_DBG("Key press, ignoring"); + return ZMK_EV_EVENT_HANDLED; } if (key == HID_USAGE_KEY_KEYBOARD_ESCAPE) { @@ -736,7 +736,7 @@ static int zmk_ble_handle_key_user(struct zmk_keycode_state_changed *event) { zmk_ble_numeric_usage_to_value(key, HID_USAGE_KEY_KEYPAD_1_AND_END, HID_USAGE_KEY_KEYPAD_0_AND_INSERT, &val))) { LOG_DBG("Key not a number, ignoring"); - return ZMK_EV_EVENT_BUBBLE; + return ZMK_EV_EVENT_HANDLED; } if (ring_buf_space_get(&passkey_entries) <= 0) { From da15564d0e7069e5f262e5d8351f1622b08a1118 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 12 Jul 2023 23:00:05 -0700 Subject: [PATCH 31/65] feat(bluetooth): Build on ARCH_POSIX. --- app/Kconfig | 6 +++--- app/src/ble.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 58825fa53cd..32ec435593b 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -127,9 +127,9 @@ menuconfig ZMK_BLE select BT_SMP_APP_PAIRING_ACCEPT select BT_PERIPHERAL select BT_DIS - select BT_SETTINGS - select SETTINGS - imply ZMK_BATTERY_REPORTING + imply BT_SETTINGS if !ARCH_POSIX + imply SETTINGS if !ARCH_POSIX + imply ZMK_BATTERY_REPORTING if !ARCH_POSIX if ZMK_BLE diff --git a/app/src/ble.c b/app/src/ble.c index a6e63cb51ee..a5f973a42cf 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -106,7 +106,9 @@ void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { memcpy(&profiles[index].peer, addr, sizeof(bt_addr_le_t)); sprintf(setting_name, "ble/profiles/%d", index); LOG_DBG("Setting profile addr for %s to %s", setting_name, addr_str); +#if IS_ENABLED(CONFIG_SETTINGS) settings_save_one(setting_name, &profiles[index], sizeof(struct zmk_ble_profile)); +#endif k_work_submit(&raise_profile_changed_event_work); } From 693530c2f1e7f8f59355b67878a7ed2c10f2b2bd Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 20 Jun 2023 09:31:55 -0700 Subject: [PATCH 32/65] feat(bluetooth): Initial nRF52 BSIM based test support. Co-authored-by: Cem Aksoylar --- .github/workflows/ble-test.yml | 78 ++++ .github/workflows/test.yml | 2 +- app/boards/native_posix_64.overlay | 10 + app/boards/nrf52_bsim.conf | 4 + app/boards/nrf52_bsim.overlay | 17 + app/run-ble-test.sh | 101 +++++ app/tests/ble/central/CMakeLists.txt | 10 + app/tests/ble/central/prj.conf | 9 + app/tests/ble/central/src/main.c | 369 ++++++++++++++++++ .../centrals.txt | 2 + .../events.patterns | 2 + .../nrf52_bsim.keymap | 25 ++ .../snapshot.log | 33 ++ .../bond-to-cleared-profile/centrals.txt | 2 + .../bond-to-cleared-profile/events.patterns | 2 + .../bond-to-cleared-profile/nrf52_bsim.keymap | 25 ++ .../bond-to-cleared-profile/snapshot.log | 33 ++ .../centrals.txt | 1 + .../events.patterns | 1 + .../nrf52_bsim.keymap | 25 ++ .../snapshot.log | 26 ++ .../dont-bond-to-taken-profile/centrals.txt | 2 + .../events.patterns | 2 + .../nrf52_bsim.keymap | 25 ++ .../dont-bond-to-taken-profile/snapshot.log | 23 ++ .../centrals.txt | 2 + .../events.patterns | 2 + .../nrf52_bsim.keymap | 27 ++ .../snapshot.log | 42 ++ .../centrals.txt | 1 + .../events.patterns | 1 + .../nrf52_bsim.keymap | 25 ++ .../snapshot.log | 35 ++ app/west.yml | 91 +++++ 34 files changed, 1054 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ble-test.yml create mode 100644 app/boards/nrf52_bsim.conf create mode 100644 app/boards/nrf52_bsim.overlay create mode 100755 app/run-ble-test.sh create mode 100644 app/tests/ble/central/CMakeLists.txt create mode 100644 app/tests/ble/central/prj.conf create mode 100644 app/tests/ble/central/src/main.c create mode 100644 app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt create mode 100644 app/tests/ble/profiles/bond-clear-then-bond-second-client/events.patterns create mode 100644 app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log create mode 100644 app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt create mode 100644 app/tests/ble/profiles/bond-to-cleared-profile/events.patterns create mode 100644 app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log create mode 100644 app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt create mode 100644 app/tests/ble/profiles/connnect-and-output-to-selection/events.patterns create mode 100644 app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log create mode 100644 app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt create mode 100644 app/tests/ble/profiles/dont-bond-to-taken-profile/events.patterns create mode 100644 app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log create mode 100644 app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt create mode 100644 app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/events.patterns create mode 100644 app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log create mode 100644 app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt create mode 100644 app/tests/ble/profiles/reconnect-then-output-to-selection/events.patterns create mode 100644 app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap create mode 100644 app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log diff --git a/.github/workflows/ble-test.yml b/.github/workflows/ble-test.yml new file mode 100644 index 00000000000..3bc8a718077 --- /dev/null +++ b/.github/workflows/ble-test.yml @@ -0,0 +1,78 @@ +name: BLE Tests + +on: + push: + paths: + - ".github/workflows/ble-test.yml" + - "app/tests/ble/**" + - "app/src/**" + - "app/run-ble-test.sh" + pull_request: + paths: + - ".github/workflows/ble-test.yml" + - "app/tests/ble/**" + - "app/src/**" + - "app/run-ble-test.sh" + +jobs: + collect-tests: + outputs: + test-dirs: ${{ steps.test-dirs.outputs.test-dirs }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Find test directories + id: test-dirs + run: | + cd app/tests/ble + export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]') + echo "::set-output name=test-dirs::${TESTS}" + run-tests: + needs: collect-tests + strategy: + matrix: + test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }} + runs-on: ubuntu-latest + container: + image: docker.io/zmkfirmware/zmk-build-arm:3.2 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Cache west modules + uses: actions/cache@v3.0.2 + env: + cache-name: cache-zephyr-modules + with: + path: | + modules/ + tools/ + zephyr/ + bootloader/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l app + - name: Enable babblesim group filter + run: west config manifest.group-filter -- +babblesim + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build BabbleSim components + working-directory: tools/bsim + run: make everything + - name: Test ${{ matrix.test }} + working-directory: app + run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components/" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim/" ./run-ble-test.sh tests/ble/${{ matrix.test }} + - name: Archive artifacts + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: "log-files" + path: app/build/**/*.log diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8a9d2209e4..ec63081279b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: id: test-dirs run: | cd app/tests/ - export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]') + export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]') echo "::set-output name=test-dirs::${TESTS}" run-tests: needs: collect-tests diff --git a/app/boards/native_posix_64.overlay b/app/boards/native_posix_64.overlay index f8a8f700348..74d6b7d8708 100644 --- a/app/boards/native_posix_64.overlay +++ b/app/boards/native_posix_64.overlay @@ -4,6 +4,7 @@ / { chosen { + zephyr,console = &uart0; zmk,kscan = &kscan; }; @@ -15,4 +16,13 @@ columns = <2>; exit-after; }; + + uart0: uart { + status = "okay"; + compatible = "zephyr,native-posix-uart"; + /* Dummy current-speed entry to comply with serial + * DTS binding + */ + current-speed = <0>; + }; }; diff --git a/app/boards/nrf52_bsim.conf b/app/boards/nrf52_bsim.conf new file mode 100644 index 00000000000..526f3bc7d7e --- /dev/null +++ b/app/boards/nrf52_bsim.conf @@ -0,0 +1,4 @@ +CONFIG_ZMK_BLE=y +CONFIG_LOG=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_ZMK_LOG_LEVEL_DBG=y diff --git a/app/boards/nrf52_bsim.overlay b/app/boards/nrf52_bsim.overlay new file mode 100644 index 00000000000..482b048604a --- /dev/null +++ b/app/boards/nrf52_bsim.overlay @@ -0,0 +1,17 @@ +#include +#include +#include + +/ { + chosen { + zmk,kscan = &kscan; + }; + + kscan: kscan { + compatible = "zmk,kscan-mock"; + label = "KSCAN_MOCK"; + + rows = <2>; + columns = <2>; + }; +}; diff --git a/app/run-ble-test.sh b/app/run-ble-test.sh new file mode 100755 index 00000000000..f6e4f0cc048 --- /dev/null +++ b/app/run-ble-test.sh @@ -0,0 +1,101 @@ +#!/bin/bash + +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if [ -z "$1" ]; then + echo "Usage: ./run-ble-test.sh " + exit 1 +fi + +path=$1 +if [ "$path" = "all" ]; then + path="tests" +fi + +if [ -z "${BSIM_OUT_PATH}" ]; then + echo "BSIM_OUT_PATH needs to be set before running this script." + exit 1 +fi + +if [ -z "$BLE_TESTS_NO_CENTRAL_BUILD" ]; then + if ! [ -e build/tests/ble/central ]; then + west build -d build/tests/ble/central -b nrf52_bsim tests/ble/central > /dev/null 2>&1 + else + west build -d build/tests/ble/central + fi + + cp build/tests/ble/central/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/ble_test_central.exe" + + if ! [ -e build/tests/ble/private_central ]; then + west build -d build/tests/ble/private_central -b nrf52_bsim tests/ble/central -- -DCONFIG_BT_PRIVACY=y -DCONFIG_BT_SCAN_WITH_IDENTITY=n > /dev/null 2>&1 + else + west build -d build/tests/ble/private_central + fi + + cp build/tests/ble/private_central/zephyr/zephyr.exe "${BSIM_OUT_PATH}/bin/ble_test_private_central.exe" +fi + +testcases=$(find $path -name nrf52_bsim.keymap -exec dirname \{\} \;) +num_cases=$(echo "$testcases" | wc -l) +if [ $num_cases -gt 1 ] || [ "$testcases" != "${path%%/}" ]; then + echo "$testcases" + echo "" > ./build/tests/pass-fail.log + echo "$testcases" | BLE_TESTS_QUIET_OUTPUT=y BLE_TESTS_NO_CENTRAL_BUILD=y xargs -L 1 -P ${J:-4} ./run-ble-test.sh + err=$? + sort -k2 ./build/tests/pass-fail.log + exit $err +fi + +testcase="$path" +echo "Running $testcase:" + +west build -d build/$testcase -b nrf52_bsim -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 +if [ $? -gt 0 ]; then + echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log + exit 1 +fi + +if [ -n "${BLE_TESTS_QUIET_OUTPUT}" ]; then + output_dev="/dev/null" +else + output_dev="/dev/stdout" +fi + +exe_name=${testcase//\//_} + +start_dir=$(pwd) +cp build/$testcase/zephyr/zmk.exe "${BSIM_OUT_PATH}/bin/${exe_name}" +pushd "${BSIM_OUT_PATH}/bin" > /dev/null 2>&1 +if [ -e "${start_dir}/build/$testcase/output.log" ]; then + rm "${start_dir}/build/$testcase/output.log" +fi + +central_counts=$(wc -l ${start_dir}/${testcase}/centrals.txt | cut -d' ' -f1) +./${exe_name} -d=0 -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" & +./bs_device_handbrake -s=${exe_name} -d=1 -r=10 > "${output_dev}" & + +cat "${start_dir}/${testcase}/centrals.txt" | +while IFS= read -r line +do + ${line} -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" & +done + +./bs_2G4_phy_v1 -s=${exe_name} -D=$(( 2 + central_counts )) -sim_length=50e6 > "${output_dev}" 2>&1 + +popd > /dev/null 2>&1 + +cat build/$testcase/output.log | sed -E -n -f $testcase/events.patterns > build/$testcase/filtered_output.log + +diff -auZ $testcase/snapshot.log build/$testcase/filtered_output.log +if [ $? -gt 0 ]; then + if [ -f $testcase/pending ]; then + echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log + exit 0 + fi + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 +fi + +echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log +exit 0 diff --git a/app/tests/ble/central/CMakeLists.txt b/app/tests/ble/central/CMakeLists.txt new file mode 100644 index 00000000000..020bef3813c --- /dev/null +++ b/app/tests/ble/central/CMakeLists.txt @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(ble_test_central) + +FILE(GLOB app_sources src/*.c) +target_sources(app PRIVATE ${app_sources}) + +# zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/app/tests/ble/central/prj.conf b/app/tests/ble/central/prj.conf new file mode 100644 index 00000000000..735d4ac5bbf --- /dev/null +++ b/app/tests/ble/central/prj.conf @@ -0,0 +1,9 @@ +CONFIG_BT=y +CONFIG_LOG=y +CONFIG_BOOT_BANNER=n +CONFIG_BT_LOG_LEVEL_WRN=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_BT_CENTRAL=y +CONFIG_BT_SMP=y +CONFIG_BT_SCAN_WITH_IDENTITY=y +CONFIG_BT_GATT_CLIENT=y diff --git a/app/tests/ble/central/src/main.c b/app/tests/ble/central/src/main.c new file mode 100644 index 00000000000..67521e60da0 --- /dev/null +++ b/app/tests/ble/central/src/main.c @@ -0,0 +1,369 @@ +/* main.c - Application main entry point */ + +/* + * Copyright (c) 2015-2016 Intel Corporation + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include + +#include + +LOG_MODULE_REGISTER(ble_central, 4); + +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_ARCH_POSIX + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cmdline.h" +#include "soc.h" + +static bool disconnect_and_reconnect = false; +static bool clear_bond_on_disconnect = false; +static bool halt_after_bonding = false; +static int32_t wait_on_start = 0; + +static void ble_central_native_posix_options(void) { + static struct args_struct_t options[] = { + {.is_switch = true, + .option = "disconnect_and_reconnect", + .type = 'b', + .dest = (void *)&disconnect_and_reconnect, + .descript = "Disconnect and reconnect after the initial connection"}, + {.is_switch = true, + .option = "halt_after_bonding", + .type = 'b', + .dest = (void *)&halt_after_bonding, + .descript = "Halt any further logic after bonding the first time"}, + {.is_switch = true, + .option = "clear_bond_on_disconnect", + .type = 'b', + .dest = (void *)&clear_bond_on_disconnect, + .descript = "Clear bonds on disconnect and reconnect"}, + {.option = "wait_on_start", + .name = "milliseconds", + .type = 'u', + .dest = (void *)&wait_on_start, + .descript = "Time in milliseconds to wait before starting the test process"}, + ARG_TABLE_ENDMARKER}; + + native_add_command_line_opts(options); +} + +NATIVE_TASK(ble_central_native_posix_options, PRE_BOOT_1, 1); + +#endif + +static void start_scan(void); + +static struct bt_conn *default_conn; + +static struct bt_uuid_16 uuid = BT_UUID_INIT_16(0); +static struct bt_gatt_discover_params discover_params; +static struct bt_gatt_subscribe_params subscribe_params; + +static uint8_t notify_func(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, + const void *data, uint16_t length) { + if (!data) { + LOG_DBG("[UNSUBSCRIBED]"); + params->value_handle = 0U; + return BT_GATT_ITER_STOP; + } + + LOG_HEXDUMP_DBG(data, length, "payload"); + + return BT_GATT_ITER_CONTINUE; +} + +static uint8_t discover_func(struct bt_conn *conn, const struct bt_gatt_attr *attr, + struct bt_gatt_discover_params *params) { + int err; + + if (!attr) { + LOG_DBG("[Discover complete]"); + (void)memset(params, 0, sizeof(*params)); + return BT_GATT_ITER_STOP; + } + + LOG_DBG("[ATTRIBUTE] handle %u", attr->handle); + + if (!bt_uuid_cmp(discover_params.uuid, BT_UUID_HIDS)) { + memcpy(&uuid, BT_UUID_HIDS_REPORT, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.start_handle = attr->handle + 1; + discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + + err = bt_gatt_discover(conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + } + } else if (!bt_uuid_cmp(discover_params.uuid, BT_UUID_HIDS_REPORT)) { + memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.start_handle = attr->handle + 2; + discover_params.type = BT_GATT_DISCOVER_DESCRIPTOR; + subscribe_params.value_handle = bt_gatt_attr_value_handle(attr); + + err = bt_gatt_discover(conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + } + } else { + subscribe_params.notify = notify_func; + subscribe_params.value = BT_GATT_CCC_NOTIFY; + subscribe_params.ccc_handle = attr->handle; + + err = bt_gatt_subscribe(conn, &subscribe_params); + if (err && err != -EALREADY) { + LOG_DBG("[Subscribe failed] (err %d)", err); + } else { + LOG_DBG("[SUBSCRIBED]"); + } + + return BT_GATT_ITER_STOP; + } + + return BT_GATT_ITER_STOP; +} + +static void reconnect(const bt_addr_le_t *addr) { + struct bt_le_conn_param *param; + int err = bt_le_scan_stop(); + if (err < 0) { + LOG_DBG("Stop LE scan failed (err %d)", err); + } + + param = BT_LE_CONN_PARAM_DEFAULT; + err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &default_conn); + if (err < 0) { + LOG_DBG("Create conn failed (err %d)", err); + start_scan(); + } +} + +static bool eir_found(struct bt_data *data, void *user_data) { + bt_addr_le_t *addr = user_data; + int i; + + LOG_DBG("[AD]: %u data_len %u", data->type, data->data_len); + + switch (data->type) { + case BT_DATA_UUID16_SOME: + case BT_DATA_UUID16_ALL: + if (data->data_len % sizeof(uint16_t) != 0U) { + LOG_DBG("[AD malformed]"); + return true; + } + + for (i = 0; i < data->data_len; i += sizeof(uint16_t)) { + struct bt_le_conn_param *param; + struct bt_uuid *uuid; + uint16_t u16; + int err; + + memcpy(&u16, &data->data[i], sizeof(u16)); + uuid = BT_UUID_DECLARE_16(sys_le16_to_cpu(u16)); + if (bt_uuid_cmp(uuid, BT_UUID_HIDS)) { + continue; + } + + err = bt_le_scan_stop(); + if (err) { + LOG_DBG("[Stop LE scan failed] (err %d)", err); + continue; + } + + param = BT_LE_CONN_PARAM_DEFAULT; + err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, param, &default_conn); + if (err) { + LOG_DBG("[Create conn failed] (err %d)", err); + start_scan(); + } + + return false; + } + } + + return true; +} + +static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type, + struct net_buf_simple *ad) { + char dev[BT_ADDR_LE_STR_LEN]; + + bt_addr_le_to_str(addr, dev, sizeof(dev)); + LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", dev, type, ad->len, rssi); + + /* We're only interested in connectable events */ + if (type == BT_GAP_ADV_TYPE_ADV_IND) { + bt_data_parse(ad, eir_found, (void *)addr); + } else if (type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { + reconnect(addr); + } +} + +static void start_scan(void) { + int err; + + /* Use active scanning and disable duplicate filtering to handle any + * devices that might update their advertising data at runtime. */ + struct bt_le_scan_param scan_param = { + .type = BT_LE_SCAN_TYPE_ACTIVE, + .options = BT_LE_SCAN_OPT_NONE, + .interval = BT_GAP_SCAN_FAST_INTERVAL, + .window = BT_GAP_SCAN_FAST_WINDOW, + }; + + err = bt_le_scan_start(&scan_param, device_found); + if (err) { + LOG_DBG("[Scanning failed to start] (err %d)", err); + return; + } + + LOG_DBG("[Scanning successfully started]"); +} + +static void discover_conn(struct bt_conn *conn) { + int err; + + LOG_DBG("[Discovery started for conn]"); + memcpy(&uuid, BT_UUID_HIDS, sizeof(uuid)); + discover_params.uuid = &uuid.uuid; + discover_params.func = discover_func; + discover_params.start_handle = BT_ATT_FIRST_ATTRIBUTE_HANDLE; + discover_params.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE; + discover_params.type = BT_GATT_DISCOVER_PRIMARY; + + err = bt_gatt_discover(default_conn, &discover_params); + if (err) { + LOG_DBG("[Discover failed] (err %d)", err); + return; + } +} + +static void connected(struct bt_conn *conn, uint8_t conn_err) { + char addr[BT_ADDR_LE_STR_LEN]; + + bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); + + if (conn_err) { + LOG_DBG("[Failed to connect to %s] (%u)", addr, conn_err); + + bt_conn_unref(default_conn); + default_conn = NULL; + + start_scan(); + return; + } + + LOG_DBG("[Connected]: %s", addr); + + if (conn == default_conn) { + if (bt_conn_get_security(conn) >= BT_SECURITY_L2) { + discover_conn(conn); + } else { + LOG_DBG("[Setting the security for the connection]"); + bt_conn_set_security(conn, BT_SECURITY_L2); + } + } +} + +static bool first_connect = true; +static void pairing_complete(struct bt_conn *conn, bool bonded) { LOG_DBG("Pairing complete"); } + +static void do_disconnect_of_active(struct k_work *work) { + bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); + if (clear_bond_on_disconnect) { + bt_unpair(BT_ID_DEFAULT, bt_conn_get_dst(default_conn)); + } +} + +static K_WORK_DELAYABLE_DEFINE(disconnect_work, do_disconnect_of_active); + +static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_security_err err) { + if (err > BT_SECURITY_ERR_SUCCESS) { + LOG_DBG("[Security Change Failed]"); + exit(1); + } + + if (halt_after_bonding) { + exit(1); + } + + bool do_disconnect = first_connect && disconnect_and_reconnect; + first_connect = false; + if (do_disconnect) { + k_work_reschedule(&disconnect_work, K_MSEC(500)); + } else { + discover_conn(conn); + } +} + +static void disconnected(struct bt_conn *conn, uint8_t reason) { + char addr[BT_ADDR_LE_STR_LEN]; + + bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); + + LOG_DBG("[Disconnected]: %s (reason 0x%02x)", addr, reason); + + if (default_conn != conn) { + return; + } + + bt_conn_unref(default_conn); + default_conn = NULL; + + if (!halt_after_bonding) { + start_scan(); + } +} + +BT_CONN_CB_DEFINE(conn_callbacks) = { + .connected = connected, + .disconnected = disconnected, + .security_changed = security_changed, +}; + +struct bt_conn_auth_info_cb auth_info_cb = { + .pairing_complete = pairing_complete, +}; + +void main(void) { + int err; + + if (wait_on_start > 0) { + k_sleep(K_MSEC(wait_on_start)); + } + + err = bt_conn_auth_info_cb_register(&auth_info_cb); + + err = bt_enable(NULL); + + if (err) { + LOG_DBG("[Bluetooth init failed] (err %d)", err); + return; + } + + LOG_DBG("[Bluetooth initialized]"); + + start_scan(); +} diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt b/app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt new file mode 100644 index 00000000000..80601bad8bc --- /dev/null +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/centrals.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 -halt_after_bonding +./ble_test_central.exe -d=3 -wait_on_start=1300 diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/events.patterns b/app/tests/ble/profiles/bond-clear-then-bond-second-client/events.patterns new file mode 100644 index 00000000000..dbfe5627ecf --- /dev/null +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/events.patterns @@ -0,0 +1,2 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 1 /p diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap b/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap new file mode 100644 index 00000000000..3ddf226fc86 --- /dev/null +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + }; + }; +}; diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log b/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log new file mode 100644 index 00000000000..4939c0d76a8 --- /dev/null +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/snapshot.log @@ -0,0 +1,33 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 0 ble_central: eir_found: [AD]: 9 data_len 0 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 1 bt_id: No static addresses stored in controller +profile 1 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 1 ble_central: start_scan: [Scanning successfully started] +profile 1 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 1 ble_central: eir_found: [AD]: 9 data_len 0 +profile 1 ble_central: eir_found: [AD]: 25 data_len 2 +profile 1 ble_central: eir_found: [AD]: 1 data_len 1 +profile 1 ble_central: eir_found: [AD]: 2 data_len 4 +profile 1 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 1 ble_central: connected: [Setting the security for the connection] +profile 1 ble_central: pairing_complete: Pairing complete +profile 1 ble_central: discover_conn: [Discovery started for conn] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: notify_func: payload +profile 1 00 00 04 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt b/app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt new file mode 100644 index 00000000000..80601bad8bc --- /dev/null +++ b/app/tests/ble/profiles/bond-to-cleared-profile/centrals.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 -halt_after_bonding +./ble_test_central.exe -d=3 -wait_on_start=1300 diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/events.patterns b/app/tests/ble/profiles/bond-to-cleared-profile/events.patterns new file mode 100644 index 00000000000..dbfe5627ecf --- /dev/null +++ b/app/tests/ble/profiles/bond-to-cleared-profile/events.patterns @@ -0,0 +1,2 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 1 /p diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap b/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap new file mode 100644 index 00000000000..b13fe6f9dd8 --- /dev/null +++ b/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_CLR>; + }; + }; +}; diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log b/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log new file mode 100644 index 00000000000..4939c0d76a8 --- /dev/null +++ b/app/tests/ble/profiles/bond-to-cleared-profile/snapshot.log @@ -0,0 +1,33 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 0 ble_central: eir_found: [AD]: 9 data_len 0 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 1 bt_id: No static addresses stored in controller +profile 1 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 1 ble_central: start_scan: [Scanning successfully started] +profile 1 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 1 ble_central: eir_found: [AD]: 9 data_len 0 +profile 1 ble_central: eir_found: [AD]: 25 data_len 2 +profile 1 ble_central: eir_found: [AD]: 1 data_len 1 +profile 1 ble_central: eir_found: [AD]: 2 data_len 4 +profile 1 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 1 ble_central: connected: [Setting the security for the connection] +profile 1 ble_central: pairing_complete: Pairing complete +profile 1 ble_central: discover_conn: [Discovery started for conn] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: notify_func: payload +profile 1 00 00 04 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt b/app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt new file mode 100644 index 00000000000..110e617d4b7 --- /dev/null +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/centrals.txt @@ -0,0 +1 @@ +./ble_test_central.exe -d=2 diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/events.patterns b/app/tests/ble/profiles/connnect-and-output-to-selection/events.patterns new file mode 100644 index 00000000000..cca5a2d4ed3 --- /dev/null +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/events.patterns @@ -0,0 +1 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}//p diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap b/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap new file mode 100644 index 00000000000..789cec44337 --- /dev/null +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_SEL 1>; + }; + }; +}; diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log b/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log new file mode 100644 index 00000000000..092bb034f87 --- /dev/null +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/snapshot.log @@ -0,0 +1,26 @@ + bt_id: No static addresses stored in controller + ble_central: _posix_zephyr_main: [Bluetooth initialized] + ble_central: start_scan: [Scanning successfully started] + ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 + ble_central: eir_found: [AD]: 9 data_len 0 + ble_central: eir_found: [AD]: 25 data_len 2 + ble_central: eir_found: [AD]: 1 data_len 1 + ble_central: eir_found: [AD]: 2 data_len 4 + ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) + ble_central: connected: [Setting the security for the connection] + ble_central: pairing_complete: Pairing complete + ble_central: discover_conn: [Discovery started for conn] + ble_central: discover_func: [ATTRIBUTE] handle 23 + ble_central: discover_func: [ATTRIBUTE] handle 28 + ble_central: discover_func: [ATTRIBUTE] handle 30 + ble_central: discover_func: [SUBSCRIBED] + ble_central: notify_func: payload + 00 00 04 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 05 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt b/app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt new file mode 100644 index 00000000000..80601bad8bc --- /dev/null +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/centrals.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 -halt_after_bonding +./ble_test_central.exe -d=3 -wait_on_start=1300 diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/events.patterns b/app/tests/ble/profiles/dont-bond-to-taken-profile/events.patterns new file mode 100644 index 00000000000..dbfe5627ecf --- /dev/null +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/events.patterns @@ -0,0 +1,2 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 1 /p diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap b/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap new file mode 100644 index 00000000000..789cec44337 --- /dev/null +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_SEL 1>; + }; + }; +}; diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log b/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log new file mode 100644 index 00000000000..d41eae797df --- /dev/null +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/snapshot.log @@ -0,0 +1,23 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 0 ble_central: eir_found: [AD]: 9 data_len 0 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 1 bt_id: No static addresses stored in controller +profile 1 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 1 ble_central: start_scan: [Scanning successfully started] +profile 1 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 1 ble_central: eir_found: [AD]: 9 data_len 0 +profile 1 ble_central: eir_found: [AD]: 25 data_len 2 +profile 1 ble_central: eir_found: [AD]: 1 data_len 1 +profile 1 ble_central: eir_found: [AD]: 2 data_len 4 +profile 1 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 1 ble_central: connected: [Setting the security for the connection] +profile 1 bt_smp: reason 0x8 +profile 1 ble_central: security_changed: [Security Change Failed] diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt new file mode 100644 index 00000000000..e60cdec044b --- /dev/null +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/centrals.txt @@ -0,0 +1,2 @@ +./ble_test_central.exe -d=2 +./ble_test_central.exe -d=3 -wait_on_start=1300 diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/events.patterns b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/events.patterns new file mode 100644 index 00000000000..dbfe5627ecf --- /dev/null +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/events.patterns @@ -0,0 +1,2 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 0 /p +s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/profile 1 /p diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap new file mode 100644 index 00000000000..cc1420ee5ca --- /dev/null +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_SEL 1>; + }; + }; +}; diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log new file mode 100644 index 00000000000..a03bbb09508 --- /dev/null +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/snapshot.log @@ -0,0 +1,42 @@ +profile 0 bt_id: No static addresses stored in controller +profile 0 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 0 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 0 ble_central: eir_found: [AD]: 9 data_len 0 +profile 0 ble_central: eir_found: [AD]: 25 data_len 2 +profile 0 ble_central: eir_found: [AD]: 1 data_len 1 +profile 0 ble_central: eir_found: [AD]: 2 data_len 4 +profile 0 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 0 ble_central: connected: [Setting the security for the connection] +profile 0 ble_central: pairing_complete: Pairing complete +profile 0 ble_central: discover_conn: [Discovery started for conn] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 1 bt_id: No static addresses stored in controller +profile 1 ble_central: _posix_zephyr_main: [Bluetooth initialized] +profile 1 ble_central: start_scan: [Scanning successfully started] +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 0 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 0 ble_central: discover_func: [SUBSCRIBED] +profile 0 ble_central: notify_func: payload +profile 0 00 00 04 00 00 00 00 00 |........ +profile 0 ble_central: notify_func: payload +profile 0 00 00 00 00 00 00 00 00 |........ +profile 1 ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 +profile 1 ble_central: eir_found: [AD]: 9 data_len 0 +profile 1 ble_central: eir_found: [AD]: 25 data_len 2 +profile 1 ble_central: eir_found: [AD]: 1 data_len 1 +profile 1 ble_central: eir_found: [AD]: 2 data_len 4 +profile 1 ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) +profile 1 ble_central: connected: [Setting the security for the connection] +profile 1 ble_central: pairing_complete: Pairing complete +profile 1 ble_central: discover_conn: [Discovery started for conn] +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 23 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 28 +profile 1 ble_central: discover_func: [ATTRIBUTE] handle 30 +profile 1 ble_central: discover_func: [SUBSCRIBED] +profile 1 ble_central: notify_func: payload +profile 1 00 00 05 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ +profile 1 ble_central: notify_func: payload +profile 1 00 00 00 00 00 00 00 00 |........ diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt b/app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt new file mode 100644 index 00000000000..2478118532e --- /dev/null +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/centrals.txt @@ -0,0 +1 @@ +./ble_test_central.exe -d=2 -disconnect_and_reconnect diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/events.patterns b/app/tests/ble/profiles/reconnect-then-output-to-selection/events.patterns new file mode 100644 index 00000000000..cca5a2d4ed3 --- /dev/null +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/events.patterns @@ -0,0 +1 @@ +s/^d_02: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}//p diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap b/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap new file mode 100644 index 00000000000..789cec44337 --- /dev/null +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +&kscan { + events = + ; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + label = "Default keymap"; + + default_layer { + bindings = < + &kp A &kp B + &bt BT_SEL 0 &bt BT_SEL 1>; + }; + }; +}; diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log b/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log new file mode 100644 index 00000000000..bf6cc49ea0f --- /dev/null +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/snapshot.log @@ -0,0 +1,35 @@ + bt_id: No static addresses stored in controller + ble_central: _posix_zephyr_main: [Bluetooth initialized] + ble_central: start_scan: [Scanning successfully started] + ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 + ble_central: eir_found: [AD]: 9 data_len 0 + ble_central: eir_found: [AD]: 25 data_len 2 + ble_central: eir_found: [AD]: 1 data_len 1 + ble_central: eir_found: [AD]: 2 data_len 4 + ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) + ble_central: connected: [Setting the security for the connection] + ble_central: pairing_complete: Pairing complete + ble_central: disconnected: [Disconnected]: ED:3B:20:15:18:12 (random) (reason 0x16) + ble_central: start_scan: [Scanning successfully started] + ble_central: device_found: [DEVICE]: ED:3B:20:15:18:12 (random), AD evt type 0, AD data len 15, RSSI -59 + ble_central: eir_found: [AD]: 9 data_len 0 + ble_central: eir_found: [AD]: 25 data_len 2 + ble_central: eir_found: [AD]: 1 data_len 1 + ble_central: eir_found: [AD]: 2 data_len 4 + ble_central: connected: [Connected]: ED:3B:20:15:18:12 (random) + ble_central: connected: [Setting the security for the connection] + ble_central: discover_conn: [Discovery started for conn] + ble_central: discover_func: [ATTRIBUTE] handle 23 + ble_central: discover_func: [ATTRIBUTE] handle 28 + ble_central: discover_func: [ATTRIBUTE] handle 30 + ble_central: discover_func: [SUBSCRIBED] + ble_central: notify_func: payload + 00 00 04 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 05 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ + ble_central: notify_func: payload + 00 00 00 00 00 00 00 00 |........ diff --git a/app/west.yml b/app/west.yml index ffa36ca36e9..f72f2f398bc 100644 --- a/app/west.yml +++ b/app/west.yml @@ -1,9 +1,17 @@ manifest: + defaults: + remote: upstream + remotes: - name: zephyrproject-rtos url-base: https://github.com/zephyrproject-rtos - name: zmkfirmware url-base: https://github.com/zmkfirmware + - name: upstream + url-base: https://github.com/zephyrproject-rtos + - name: babblesim + url-base: https://github.com/BabbleSim + group-filter: [-babblesim] projects: - name: zephyr remote: zmkfirmware @@ -30,5 +38,88 @@ manifest: - edtt - trusted-firmware-m - sof + - name: bsim + repo-path: babblesim-manifest + revision: 908ffde6298a937c6549dbfa843a62caab26bfc5 + path: tools/bsim + groups: + - babblesim + - name: babblesim_base + remote: babblesim + repo-path: base.git + path: tools/bsim/components + revision: 02838ca04c4562e68dc876196828d8121679e537 + groups: + - babblesim + - name: babblesim_ext_2G4_libPhyComv1 + remote: babblesim + repo-path: ext_2G4_libPhyComv1.git + path: tools/bsim/components/ext_2G4_libPhyComv1 + revision: 9018113a362fa6c9e8f4b9cab9e5a8f12cc46b94 + groups: + - babblesim + - name: babblesim_ext_2G4_phy_v1 + remote: babblesim + repo-path: ext_2G4_phy_v1.git + path: tools/bsim/components/ext_2G4_phy_v1 + revision: cf2d86e736efac4f12fad5093ed2da2c5b406156 + groups: + - babblesim + - name: babblesim_ext_2G4_channel_NtNcable + remote: babblesim + repo-path: ext_2G4_channel_NtNcable.git + path: tools/bsim/components/ext_2G4_channel_NtNcable + revision: 20a38c997f507b0aa53817aab3d73a462fff7af1 + groups: + - babblesim + - name: babblesim_ext_2G4_channel_multiatt + remote: babblesim + repo-path: ext_2G4_channel_multiatt.git + path: tools/bsim/components/ext_2G4_channel_multiatt + revision: e09bc2d14b1975f969ad19c6ed23eb20e5dc3d09 + groups: + - babblesim + - name: babblesim_ext_2G4_modem_magic + remote: babblesim + repo-path: ext_2G4_modem_magic.git + path: tools/bsim/components/ext_2G4_modem_magic + revision: cb70771794f0bf6f262aa474848611c68ae8f1ed + groups: + - babblesim + - name: babblesim_ext_2G4_modem_BLE_simple + remote: babblesim + repo-path: ext_2G4_modem_BLE_simple.git + path: tools/bsim/components/ext_2G4_modem_BLE_simple + revision: ce975a3259fd0dd761d371b60435242d54794bad + groups: + - babblesim + - name: babblesim_ext_2G4_device_burst_interferer + remote: babblesim + repo-path: ext_2G4_device_burst_interferer.git + path: tools/bsim/components/ext_2G4_device_burst_interferer + revision: 5b5339351d6e6a2368c686c734dc8b2fc65698fc + groups: + - babblesim + - name: babblesim_ext_2G4_device_WLAN_actmod + remote: babblesim + repo-path: ext_2G4_device_WLAN_actmod.git + path: tools/bsim/components/ext_2G4_device_WLAN_actmod + revision: 9cb6d8e72695f6b785e57443f0629a18069d6ce4 + groups: + - babblesim + - name: babblesim_ext_2G4_device_playback + remote: babblesim + repo-path: ext_2G4_device_playback.git + path: tools/bsim/components/ext_2G4_device_playback + revision: 85c645929cf1ce995d8537107d9dcbd12ed64036 + groups: + - babblesim + - name: babblesim_ext_libCryptov1 + remote: babblesim + repo-path: ext_libCryptov1.git + path: tools/bsim/components/ext_libCryptov1 + revision: eed6d7038e839153e340bd333bc43541cb90ba64 + groups: + - babblesim self: west-commands: scripts/west-commands.yml From c63d0791d52f2566bdca50895866339ce6fb947a Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 13 Jul 2023 22:16:44 -0700 Subject: [PATCH 33/65] chore: Ensure BSIM env. variables set in devcontainer. --- .devcontainer/.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.devcontainer/.bashrc b/.devcontainer/.bashrc index 9fdb8f69e35..967fa144bbb 100644 --- a/.devcontainer/.bashrc +++ b/.devcontainer/.bashrc @@ -6,3 +6,8 @@ fi if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then source "$WORKSPACE_DIR/zephyr/zephyr-env.sh" fi + +if [ -d "$WORKSPACE_DIR/tools/bsim" ]; then + export BSIM_OUT_PATH="$WORKSPACE_DIR/tools/bsim/" + export BSIM_COMPONENTS_PATH="$WORKSPACE_DIR/tools/bsim/components/" +fi \ No newline at end of file From 55aed8e89d3d256b3e758be5bc5dfbb23ea04ece Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 2 Dec 2023 16:16:49 +0000 Subject: [PATCH 34/65] feat(tests): Add ability to auto-accept test diff. --- app/run-ble-test.sh | 10 ++++++++-- app/run-test.sh | 11 +++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/run-ble-test.sh b/app/run-ble-test.sh index f6e4f0cc048..9984caa14e2 100755 --- a/app/run-ble-test.sh +++ b/app/run-ble-test.sh @@ -93,8 +93,14 @@ if [ $? -gt 0 ]; then echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log exit 0 fi - echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log - exit 1 + + if [ -n "${ZMK_TESTS_AUTO_ACCEPT}" ]; then + echo "Auto-accepting failure for $testcase" + cp build/$testcase/filtered_output.log $testcase/snapshot.log + else + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 + fi fi echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log diff --git a/app/run-test.sh b/app/run-test.sh index 6935f2c8b36..cfd376686c8 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -39,8 +39,15 @@ if [ $? -gt 0 ]; then echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log exit 0 fi - echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log - exit 1 + + + if [ -n "${ZMK_TESTS_AUTO_ACCEPT}" ]; then + echo "Auto-accepting failure for $testcase" + cp build/$testcase/keycode_events.log $testcase/keycode_events.snapshot + else + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 + fi fi echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log From ecefd6d24b05124e2efcf3573ed8a32901d531d6 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 4 Dec 2023 17:21:49 +0000 Subject: [PATCH 35/65] fix(docs): Update backlight docs (#1894) Co-authored-by: Cem Aksoylar Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com> --- docs/docs/features/backlight.md | 169 ++++++++++++++++++-------------- 1 file changed, 97 insertions(+), 72 deletions(-) diff --git a/docs/docs/features/backlight.md b/docs/docs/features/backlight.md index c1b5db5dd9b..8a23a67af6a 100644 --- a/docs/docs/features/backlight.md +++ b/docs/docs/features/backlight.md @@ -37,12 +37,12 @@ There are various Kconfig options used to configure the backlight feature. These ## Adding Backlight to a board or a shield - + + First, you must enable PWM by adding the following lines to your `Kconfig.defconfig` file: @@ -58,43 +58,60 @@ config LED_PWM endif # ZMK_BACKLIGHT ``` -Then you have to add the following lines to your `.dts` file: +Create a `-pinctrl.dtsi` file if it does not already exist, and include it at the beginning of the `.dts` file. `CONFIG_PINCTRL=y` must be added to to `_defconfig` if it isn't already enabled. + +The pinctrl file has a `&pinctrl` node that encompasses all pinctrl settings, including I2C or SPI peripherals (e.g. WS2812 LEDs, Battery fuel gauges): ```dts -&pwm0 { - status = "okay"; - ch0-pin = <45>; - /* ch0-inverted; */ +&pinctrl { + // Other pinctrl definitions for other hardware + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; ``` -The value `ch0-pin` represents the pin that controls the LEDs. With nRF52 boards, you can calculate the value to use in the following way: you need the hardware port and run it through a function. -**32 \* X + Y** = `` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y". +Pin numbers are handled differently depending on the MCU. On nRF MCUs pins are configured using `(PWM_OUTX, Y, Z)`, where `X` is the PWM channel used (usually 0), `Y` is the first part of the hardware port (_PY.01_) and `Z` is the second part of the hardware port (_P1.Z_). + +For example, _P1.13_ would give you `(PWM_OUT0, 1, 13)` and _P0.15_ would give you `(PWM_OUT0, 0, 15)`. -For example, _P1.13_ would give you _32 \* 1 + 13_ = `<45>` and _P0.15_ would give you _32 \* 0 + 15_ = `<15>`. +Add the PWM device to the `board.dts` file and assign the pinctrl definitions to it: -If your board uses a P-channel MOSFET to control backlight instead of a N-channel MOSFET, you may want to enable `ch0-inverted`. +```dts +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; +``` -Then you have to add the following lines inside the root devicetree node on the same file as before: +Then add the following lines to the same `.dts` file, but inside the root devicetree node: ```dts / { backlight: pwmleds { compatible = "pwm-leds"; - label = "Backlight LEDs"; pwm_led_0 { - pwms = <&pwm0 45>; - label = "Backlight LED 0"; + pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; }; }; ``` -The value inside `pwm_led_0` must be the same as you used before. +The value inside `pwm_led_0` after `&pwm0` must be the channel number. Since `PWM_OUT0` is defined in the pinctrl node, the channel in this example is 0. -:::info -Note that every LED inside of the backlight node will be treated as a backlight LED, so if you have other PWM LEDs you need to declare them in a separate node. Refer to [Multiple backlight LEDs](#multiple-backlight-leds) if you have multiple backlight LEDs. -::: +In this example, `PWM_MSEC(10)` is the period of the PWM waveform. This period can be altered if your drive circuitry requires different values or the frequency is audible. + +If your board uses a P-channel MOSFET to control backlight instead of a N-channel MOSFET, you may want to change `PWM_POLARITY_NORMAL` for `PWM_POLARITY_INVERTED`. Finally you need to add backlight to the `chosen` element of the root devicetree node: @@ -107,7 +124,7 @@ Finally you need to add backlight to the `chosen` element of the root devicetree ``` - + You must first add a `boards/` directory within your shield folder. For each board that supports the shield you must create a `.defconfig` file and a `.overlay` file inside the `boards/` folder. @@ -128,40 +145,55 @@ endif # ZMK_BACKLIGHT Then add the following lines to your `.overlay` file: ```dts -&pwm0 { - status = "okay"; - ch0-pin = <45>; - /* ch0-inverted; */ +&pinctrl { + // Other pinctrl definitions for other hardware + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; }; ``` -The value `ch0-pin` represents the pin that controls the LEDs. With nRF52 boards, you can calculate the value to use in the following way: you need the hardware port and run it through a function. -**32 \* X + Y** = `` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y". - -For example, _P1.13_ would give you _32 \* 1 + 13_ = `<45>` and _P0.15_ would give you _32 \* 0 + 15_ = `<15>`. +Pin numbers are handled differently depending on the MCU. On nRF MCUs pins are configured using `(PWM_OUTX, Y, Z)`, where `X` is the PWM channel used (usually 0), `Y` is the first part of the hardware port (_PY.01_) and `Z` is the second part of the hardware port (_P1.Z_). -If your shield uses a P-channel MOSFET to control backlight instead of a N-channel MOSFET, you may want to enable `ch0-inverted`. +For example, _P1.13_ would give you `(PWM_OUT0, 1, 13)` and _P0.15_ would give you `(PWM_OUT0, 0, 15)`. -Then you have to add the following lines inside the root devicetree node on the same file: +Add the PWM device to the `.overlay` file and assign the pinctrl definitions to it: ```dts +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; +``` + +Then add the following lines to the same `.overlay` file, but inside the root devicetree node: + +``` / { backlight: pwmleds { compatible = "pwm-leds"; - label = "Backlight LEDs"; pwm_led_0 { - pwms = <&pwm0 45>; - label = "Backlight LED 0"; + pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; }; }; ``` -The value inside `pwm_led_0` must be the same as you used before. +In this example, `PWM_MSEC(10)` is the period of the PWM waveform. This period can be altered if your drive circuitry requires different values or the frequency is audible. -:::info -Note that every LED inside of the backlight node will be treated as a backlight LED, so if you have other PWM LEDs you need to declare them in a separate node. Refer to [Multiple backlight LEDs](#multiple-backlight-leds) if you have multiple backlight LEDs. -::: +If your board uses a P-channel MOSFET to control backlight instead of a N-channel MOSFET, you may want to change `PWM_POLARITY_NORMAL` for `PWM_POLARITY_INVERTED`. + +The value inside `pwm_led_0` after `&pwm0` must be the channel number. Since `PWM_OUT0` is defined in the pinctrl node, the channel in this example is 0. Finally you need to add backlight to the `chosen` element of the root devicetree node: @@ -170,26 +202,9 @@ Finally you need to add backlight to the `chosen` element of the root devicetree chosen { zmk,backlight = &backlight; }; -}: -``` - -Optionally, on Pro Micro compatible shields you can add a LED GPIO node to your devicetree, this could be useful if you want your shield to be compatible with newer or untested boards. To do that you have to enable `CONFIG_LED_GPIO` in your `.conf` file and then add the following lines inside the root devicetree node of your `.dtsi` or `.dts` file: - -```dts -/ { - backlight: gpioleds { - compatible = "gpio-leds"; - label = "Backlight LEDs"; - gpio_led_0 { - gpios = <&pro_micro 20 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; - }; - }; }; ``` -If no suitable `.overlay` file is found, this node will act as a fallback, however, without PWM, backlight has limited functionality. - @@ -197,35 +212,45 @@ If no suitable `.overlay` file is found, this node will act as a fallback It is possible to control multiple backlight LEDs at the same time. This is useful if, for example, you have a Caps Lock LED connected to a different pin and you want it to be part of the backlight. -In order to do that, first you need to enable PWM for each pin: +In order to do that, first configure PWM for each pin in the pinctrl node: ```dts -&pwm0 { - status = "okay"; - ch0-pin = <45>; /* LED 0 */ - ch1-pin = <46>; /* LED 1 */ - ch2-pin = <47>; /* LED 2 */ - ... +&pinctrl { + // Other Pinctrl definitions go here + pwm0_default: pwm0_default { + group1 { + psels = , // LED 0 + , // LED 1 + ; // LED 2 + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = , // LED 0 + , // LED 1 + ; // LED 2 + low-power-enable; + }; + }; }; ``` -This part may vary based on your MCU as different MCUs may have a different number of modules and channels. +This part will vary based on your MCU as different MCUs have a different number of modules, channels and configuration options. -Then you can simply add each of your LED to the backlight node: +Add each of your LEDs to the backlight node in the same manner as for one LED, using the channel number definitions in the pinctrl node: ```dts backlight: pwmleds { compatible = "pwm-leds"; label = "Backlight LEDs"; - pwm_led_0 { - pwms = <&pwm0 45>; /* LED 0 */ + pwm_led_0: pwm_led_0 { + pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; - pwm_led_1 { - pwms = <&pwm0 46>; /* LED 1 */ + pwm_led_1: pwm_led_1 { + pwms = <&pwm0 1 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; - pwm_led_2 { - pwms = <&pwm0 47>; /* LED 2 */ + pwm_led_2: pwm_led_2 { + pwms = <&pwm0 2 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; - ... }; ``` From 042e5209b3c2fc387793366d979f8bc986be2514 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 22:43:06 -0800 Subject: [PATCH 36/65] fix(docs): Fix table for BT_DISC --- docs/docs/behaviors/bluetooth.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/docs/behaviors/bluetooth.md b/docs/docs/behaviors/bluetooth.md index ef1cc4666f1..b34614e6205 100644 --- a/docs/docs/behaviors/bluetooth.md +++ b/docs/docs/behaviors/bluetooth.md @@ -35,14 +35,13 @@ This will allow you to reference the actions defined in this header such as `BT_ Here is a table describing the command for each define: -| Define | Action | -| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | -| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | -| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | -| `BT_SEL` | Select the 0-indexed profile by number. Please note: this definition must include a number as an argument in the keymap to work correctly. eg. `BT_SEL 0` | -| `BT_DISC` | Disconnect from the 0-indexed profile by number, if it's currently connected and inactive. Please note: this definition must include a number as an | -| | argument in the keymap to work correctly. eg. `BT_DISC 0` | +| Define | Action | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `BT_CLR` | Clear bond information between the keyboard and host for the selected profile. | +| `BT_NXT` | Switch to the next profile, cycling through to the first one when the end is reached. | +| `BT_PRV` | Switch to the previous profile, cycling through to the last one when the beginning is reached. | +| `BT_SEL` | Select the 0-indexed profile by number; must include a number as an argument in the keymap to work correctly, e.g. `BT_SEL 0`. | +| `BT_DISC` | Disconnect from the 0-indexed profile by number, if it's currently connected and inactive; must include a number as an argument in the keymap to work correctly, e.g. `BT_DISC 0`. | :::note Selected profile persistence The profile that is selected by the `BT_SEL`/`BT_PRV`/`BT_NXT` actions will be saved to flash storage and hence persist across restarts and firmware flashes. From 8ee3467adff4cd0ced085ee7778c99d42b1889c8 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 22:25:45 -0800 Subject: [PATCH 37/65] fix(docs): Update outdated information in the hardware page --- docs/docs/hardware.mdx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/docs/hardware.mdx b/docs/docs/hardware.mdx index 6f377073810..7bc98f96105 100644 --- a/docs/docs/hardware.mdx +++ b/docs/docs/hardware.mdx @@ -41,7 +41,7 @@ export const toc = [ ]; With the solid technical foundation of Zephyr™ RTOS, ZMK can support a wide diversity of hardware targets. -That being said, there are currently only a few specific [boards](/docs/faq#what-is-a-board)/[shields](faq.md#what-is-a-shield) that have been implemented and tested by the ZMK contributors. +That being said, there are specific [boards](faq.md#what-is-a-board)/[shields](faq.md#what-is-a-shield) that have been implemented and tested by the ZMK contributors, listed below. @@ -49,17 +49,11 @@ That being said, there are currently only a few specific [boards](/docs/faq#what Other Hardware -In addition to the basic keyboard functionality, there is some initial support for additional keyboard hardware: - -- Encoders -- Displays -- RGB Underglow -- Backlight - -Until detailed documentation is available, feel free to ask questions about how these are supported in the [Discord server](https://zmk.dev/community/discord/invite). +In addition to the basic keyboard functionality, there is also support for additional keyboard hardware such as encoders, RGB underglow, backlight and displays. +Please see pages under the "Features" header in the sidebar for details. Contributing -If you'd like to add support for a new keyboard shield, head over to the [New Keyboard Shield](development/new-shield.md) documentation. +If you'd like to add support for a new keyboard shield, head over to the [New Keyboard Shield](development/new-shield.md) documentation and note the [clean room design requirements](development/clean-room.md). From 9bacaffe6244fd00329f959700e2fd52b241c520 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:24:05 +0000 Subject: [PATCH 38/65] feat(hid): Add KConfig option for higher NKRO usages By default the maximum NKRO usage is set to maximise compatibility, but some keys dont work, this adds the ability to use those extended keys, at the cost of compatibiltity Co-authored-by: Cem Aksoylar Co-authored-by: Pete Johanson --- app/Kconfig | 11 ++++++++++- app/include/zmk/hid.h | 5 +++++ docs/docs/config/system.md | 12 ++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/Kconfig b/app/Kconfig index 32ec435593b..63eff2ad4be 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -53,10 +53,19 @@ config ZMK_HID_REPORT_TYPE_NKRO help Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard from working with some BIOS/UEFI versions that only support "boot keyboard" support. - This option also prevents using some infrequently used higher range HID usages. + This option also prevents using some infrequently used higher range HID usages (notably F13-F24 and INTL1-9) + These usages can be re enabled with ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT. endchoice +config ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT + bool "Enable extended NKRO reporting" + depends on ZMK_HID_REPORT_TYPE_NKRO + help + Enables higher usage range for NKRO (F13-F24 and INTL1-9). + Please note this is not compatible with Android currently and you will get no input + + if ZMK_HID_REPORT_TYPE_HKRO config ZMK_HID_KEYBOARD_REPORT_SIZE diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index 3f7e61bcd45..30534b02d21 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -17,7 +17,12 @@ #include #include +#if IS_ENABLED(CONFIG_ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT) +#define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYBOARD_LANG8 +#else #define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL +#endif + #define ZMK_HID_MOUSE_NUM_BUTTONS 0x05 // See https://www.usb.org/sites/default/files/hid1_11.pdf section 6.2.2.4 Main Items diff --git a/docs/docs/config/system.md b/docs/docs/config/system.md index 6e834c678b9..4629ea0f790 100644 --- a/docs/docs/config/system.md +++ b/docs/docs/config/system.md @@ -34,12 +34,24 @@ Exactly zero or one of the following options may be set to `y`. The first is use | `CONFIG_ZMK_HID_REPORT_TYPE_HKRO` | Enable `CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE` key roll over. | | `CONFIG_ZMK_HID_REPORT_TYPE_NKRO` | Enable full N-key roll over. This may prevent the keyboard from working with some BIOS/UEFI versions. | +:::note NKRO usages + +By default the NKRO max usage is set so as to maximize compatibility, however certain less frequently used keys (F13-F24 and INTL1-8) will not work with it. One solution is to set `CONFIG_ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT=y`, however this is known to break compatibility with Android and thus not enabled by default. + +::: + If `CONFIG_ZMK_HID_REPORT_TYPE_HKRO` is enabled, it may be configured with the following options: | Config | Type | Description | Default | | ------------------------------------- | ---- | ------------------------------------------------- | ------- | | `CONFIG_ZMK_HID_KEYBOARD_REPORT_SIZE` | int | Number of keyboard keys simultaneously reportable | 6 | +If `CONFIG_ZMK_HID_REPORT_TYPE_NKRO` is enabled, it may be configured with the following options: + +| Config | Type | Description | Default | +| ---------------------------------------------- | ---- | -------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT` | bool | Enable less frequently used key usages, at the cost of compatibility | n | + Exactly zero or one of the following options may be set to `y`. The first is used if none are set. | Config | Description | From dbe5dfb1d841f55f2ad853275206aa706d24770b Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:31:35 +0000 Subject: [PATCH 39/65] feat(split): Add is_bonded function to peripherals There is already a function to see if the peripheral is connected, a matching one for if it's bonded is a useful addition for displays/indicators. `is_bonded` gets reset to false in the advertising function in preparation for runtime peripheral bond clearing --- app/include/zmk/split/bluetooth/peripheral.h | 4 +++- app/src/split/bluetooth/peripheral.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/include/zmk/split/bluetooth/peripheral.h b/app/include/zmk/split/bluetooth/peripheral.h index a650508ad53..44ac8062a51 100644 --- a/app/include/zmk/split/bluetooth/peripheral.h +++ b/app/include/zmk/split/bluetooth/peripheral.h @@ -6,4 +6,6 @@ #pragma once -bool zmk_split_bt_peripheral_is_connected(void); \ No newline at end of file +bool zmk_split_bt_peripheral_is_connected(void); + +bool zmk_split_bt_peripheral_is_bonded(void); \ No newline at end of file diff --git a/app/src/split/bluetooth/peripheral.c b/app/src/split/bluetooth/peripheral.c index 1d649f71221..704e2eed408 100644 --- a/app/src/split/bluetooth/peripheral.c +++ b/app/src/split/bluetooth/peripheral.c @@ -43,6 +43,8 @@ static const struct bt_data zmk_ble_ad[] = { static bool is_connected = false; +static bool is_bonded = false; + static void each_bond(const struct bt_bond_info *info, void *user_data) { bt_addr_le_t *addr = (bt_addr_le_t *)user_data; @@ -57,10 +59,12 @@ static int start_advertising(bool low_duty) { bt_foreach_bond(BT_ID_DEFAULT, each_bond, ¢ral_addr); if (bt_addr_le_cmp(¢ral_addr, BT_ADDR_LE_NONE) != 0) { + is_bonded = true; struct bt_le_adv_param adv_param = low_duty ? *BT_LE_ADV_CONN_DIR_LOW_DUTY(¢ral_addr) : *BT_LE_ADV_CONN_DIR(¢ral_addr); return bt_le_adv_start(&adv_param, NULL, 0, NULL, 0); } else { + is_bonded = false; return bt_le_adv_start(BT_LE_ADV_CONN, zmk_ble_ad, ARRAY_SIZE(zmk_ble_ad), NULL, 0); } }; @@ -132,8 +136,16 @@ static struct bt_conn_cb conn_callbacks = { .le_param_updated = le_param_updated, }; +static void auth_pairing_complete(struct bt_conn *conn, bool bonded) { is_bonded = bonded; } + +static struct bt_conn_auth_info_cb zmk_peripheral_ble_auth_info_cb = { + .pairing_complete = auth_pairing_complete, +}; + bool zmk_split_bt_peripheral_is_connected() { return is_connected; } +bool zmk_split_bt_peripheral_is_bonded() { return is_bonded; } + static int zmk_peripheral_ble_init(const struct device *_arg) { int err = bt_enable(NULL); @@ -155,6 +167,7 @@ static int zmk_peripheral_ble_init(const struct device *_arg) { bt_unpair(BT_ID_DEFAULT, NULL); #else bt_conn_cb_register(&conn_callbacks); + bt_conn_auth_info_cb_register(&zmk_peripheral_ble_auth_info_cb); low_duty_advertising = false; k_work_submit(&advertising_work); From 179bdbc41a85165d3d535cd3b0df410ad0621662 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Tue, 5 Sep 2023 11:35:51 -0500 Subject: [PATCH 40/65] refactor(behaviors): Make label property optional Changed all code (except for layer names) which used the label property to use DEVICE_DT_NAME() instead, which uses the label if set or falls back to the full node name. This matches how Zephyr determines the node names used with device_get_binding() and allows us to start removing the deprecated label property from things. --- app/dts/bindings/behaviors/one_param.yaml | 3 +- app/dts/bindings/behaviors/two_param.yaml | 3 +- app/dts/bindings/behaviors/zero_param.yaml | 3 +- .../zmk,behavior-sensor-rotate-var.yaml | 3 +- .../behaviors/zmk,behavior-sensor-rotate.yaml | 3 +- app/dts/bindings/zmk,kscan-composite.yaml | 4 ++ app/dts/bindings/zmk,kscan-mock.yaml | 2 + app/include/zmk/keymap.h | 2 +- app/src/behaviors/behavior_hold_tap.c | 4 +- app/src/behaviors/behavior_macro.c | 24 ++++----- app/src/behaviors/behavior_mod_morph.c | 2 +- app/src/behaviors/behavior_sensor_rotate.c | 2 +- .../behaviors/behavior_sensor_rotate_var.c | 4 +- app/src/ext_power_generic.c | 52 +++++++++---------- app/src/keymap.c | 21 ++++---- 15 files changed, 70 insertions(+), 62 deletions(-) diff --git a/app/dts/bindings/behaviors/one_param.yaml b/app/dts/bindings/behaviors/one_param.yaml index faa01a0d4ca..9a503e8a815 100644 --- a/app/dts/bindings/behaviors/one_param.yaml +++ b/app/dts/bindings/behaviors/one_param.yaml @@ -4,7 +4,8 @@ properties: label: type: string - required: true + required: false + deprecated: true "#binding-cells": type: int required: true diff --git a/app/dts/bindings/behaviors/two_param.yaml b/app/dts/bindings/behaviors/two_param.yaml index d4cdfaa00fd..4f342301bb3 100644 --- a/app/dts/bindings/behaviors/two_param.yaml +++ b/app/dts/bindings/behaviors/two_param.yaml @@ -4,7 +4,8 @@ properties: label: type: string - required: true + required: false + deprecated: true "#binding-cells": type: int required: true diff --git a/app/dts/bindings/behaviors/zero_param.yaml b/app/dts/bindings/behaviors/zero_param.yaml index 075270d638f..79d0dcaed3f 100644 --- a/app/dts/bindings/behaviors/zero_param.yaml +++ b/app/dts/bindings/behaviors/zero_param.yaml @@ -4,7 +4,8 @@ properties: label: type: string - required: true + required: false + deprecated: true "#binding-cells": type: int required: true diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml index 0da3b4dbfea..d286f9c4c1b 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml @@ -8,7 +8,8 @@ compatible: "zmk,behavior-sensor-rotate-var" properties: label: type: string - required: true + required: false + deprecated: true "#sensor-binding-cells": type: int required: true diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml index d20777b8d98..dbb92c8bcfa 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml @@ -8,7 +8,8 @@ compatible: "zmk,behavior-sensor-rotate" properties: label: type: string - required: true + required: false + deprecated: true "#sensor-binding-cells": type: int required: true diff --git a/app/dts/bindings/zmk,kscan-composite.yaml b/app/dts/bindings/zmk,kscan-composite.yaml index 6126c30340e..857ef34fa4f 100644 --- a/app/dts/bindings/zmk,kscan-composite.yaml +++ b/app/dts/bindings/zmk,kscan-composite.yaml @@ -6,6 +6,8 @@ compatible: "zmk,kscan-composite" properties: label: type: string + required: false + deprecated: true rows: type: int columns: @@ -17,6 +19,8 @@ child-binding: properties: label: type: string + required: false + deprecated: true kscan: type: phandle row-offset: diff --git a/app/dts/bindings/zmk,kscan-mock.yaml b/app/dts/bindings/zmk,kscan-mock.yaml index f9d83fa7e89..2fe9360c71f 100644 --- a/app/dts/bindings/zmk,kscan-mock.yaml +++ b/app/dts/bindings/zmk,kscan-mock.yaml @@ -6,6 +6,8 @@ compatible: "zmk,kscan-mock" properties: label: type: string + required: false + deprecated: true event-period: type: int description: Milliseconds between each generated event diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 9ce140bfa27..43e8aef141f 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -29,7 +29,7 @@ int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pr #define ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) \ { \ - .behavior_dev = DT_PROP(DT_PHANDLE_BY_IDX(drv_inst, bindings, idx), label), \ + .behavior_dev = DEVICE_DT_NAME(DT_PHANDLE_BY_IDX(drv_inst, bindings, idx)), \ .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, bindings, idx, param1), (0), \ (DT_PHA_BY_IDX(drv_inst, bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, bindings, idx, param2), (0), \ diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index d4aa0dce036..26c190b6613 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -703,8 +703,8 @@ static int behavior_hold_tap_init(const struct device *dev) { #define KP_INST(n) \ static struct behavior_hold_tap_config behavior_hold_tap_config_##n = { \ .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ - .hold_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label), \ - .tap_behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label), \ + .hold_behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 0)), \ + .tap_behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 1)), \ .quick_tap_ms = DT_INST_PROP(n, quick_tap_ms), \ .require_prior_idle_ms = DT_INST_PROP(n, global_quick_tap) \ ? DT_INST_PROP(n, quick_tap_ms) \ diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index c47284531a7..e6a789b6dc3 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -44,18 +44,18 @@ struct behavior_macro_config { struct zmk_behavior_binding bindings[]; }; -#define TAP_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_tap), label) -#define PRESS_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_press), label) -#define REL_MODE DT_PROP(DT_INST(0, zmk_macro_control_mode_release), label) - -#define TAP_TIME DT_PROP(DT_INST(0, zmk_macro_control_tap_time), label) -#define WAIT_TIME DT_PROP(DT_INST(0, zmk_macro_control_wait_time), label) -#define WAIT_REL DT_PROP(DT_INST(0, zmk_macro_pause_for_release), label) - -#define P1TO1 DT_PROP(DT_INST(0, zmk_macro_param_1to1), label) -#define P1TO2 DT_PROP(DT_INST(0, zmk_macro_param_1to2), label) -#define P2TO1 DT_PROP(DT_INST(0, zmk_macro_param_2to1), label) -#define P2TO2 DT_PROP(DT_INST(0, zmk_macro_param_2to2), label) +#define TAP_MODE DEVICE_DT_NAME(DT_INST(0, zmk_macro_control_mode_tap)) +#define PRESS_MODE DEVICE_DT_NAME(DT_INST(0, zmk_macro_control_mode_press)) +#define REL_MODE DEVICE_DT_NAME(DT_INST(0, zmk_macro_control_mode_release)) + +#define TAP_TIME DEVICE_DT_NAME(DT_INST(0, zmk_macro_control_tap_time)) +#define WAIT_TIME DEVICE_DT_NAME(DT_INST(0, zmk_macro_control_wait_time)) +#define WAIT_REL DEVICE_DT_NAME(DT_INST(0, zmk_macro_pause_for_release)) + +#define P1TO1 DEVICE_DT_NAME(DT_INST(0, zmk_macro_param_1to1)) +#define P1TO2 DEVICE_DT_NAME(DT_INST(0, zmk_macro_param_1to2)) +#define P2TO1 DEVICE_DT_NAME(DT_INST(0, zmk_macro_param_2to1)) +#define P2TO2 DEVICE_DT_NAME(DT_INST(0, zmk_macro_param_2to2)) #define ZM_IS_NODE_MATCH(a, b) (strcmp(a, b) == 0) #define IS_TAP_MODE(dev) ZM_IS_NODE_MATCH(dev, TAP_MODE) diff --git a/app/src/behaviors/behavior_mod_morph.c b/app/src/behaviors/behavior_mod_morph.c index d540abd93af..f0832514122 100644 --- a/app/src/behaviors/behavior_mod_morph.c +++ b/app/src/behaviors/behavior_mod_morph.c @@ -81,7 +81,7 @@ static int behavior_mod_morph_init(const struct device *dev) { return 0; } #define _TRANSFORM_ENTRY(idx, node) \ { \ - .behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(node, bindings, idx), label), \ + .behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \ .param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param1), (0), \ (DT_INST_PHA_BY_IDX(node, bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param2), (0), \ diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index 822bc206b02..eb138fe23ab 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -20,7 +20,7 @@ static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; #define _TRANSFORM_ENTRY(idx, node) \ { \ - .behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(node, bindings, idx), label), \ + .behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \ .param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param1), (0), \ (DT_INST_PHA_BY_IDX(node, bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param2), (0), \ diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index e6d20cab9d1..8263a693813 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -20,8 +20,8 @@ static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; #define SENSOR_ROTATE_VAR_INST(n) \ static struct behavior_sensor_rotate_config behavior_sensor_rotate_var_config_##n = { \ - .cw_binding = {.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 0), label)}, \ - .ccw_binding = {.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(n, bindings, 1), label)}, \ + .cw_binding = {.behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 0))}, \ + .ccw_binding = {.behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(n, bindings, 1))}, \ .tap_ms = DT_INST_PROP(n, tap_ms), \ .override_params = true, \ }; \ diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index e35714da10b..52896f19871 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -39,7 +39,7 @@ static void ext_power_save_state_work(struct k_work *work) { const struct device *ext_power = DEVICE_DT_GET(DT_DRV_INST(0)); struct ext_power_generic_data *data = ext_power->data; - snprintf(setting_path, 40, "ext_power/state/%s", DT_INST_PROP(0, label)); + snprintf(setting_path, sizeof(setting_path), "ext_power/state/%s", ext_power->name); settings_save_one(setting_path, &data->status, sizeof(data->status)); } @@ -86,38 +86,38 @@ static int ext_power_generic_get(const struct device *dev) { } #if IS_ENABLED(CONFIG_SETTINGS) -static int ext_power_settings_set(const char *name, size_t len, settings_read_cb read_cb, - void *cb_arg) { - const char *next; - int rc; +static int ext_power_settings_set_status(const struct device *dev, size_t len, + settings_read_cb read_cb, void *cb_arg) { + struct ext_power_generic_data *data = dev->data; - if (settings_name_steq(name, DT_INST_PROP(0, label), &next) && !next) { - const struct device *ext_power = DEVICE_DT_GET(DT_DRV_INST(0)); - struct ext_power_generic_data *data = ext_power->data; + if (len != sizeof(data->status)) { + return -EINVAL; + } - if (len != sizeof(data->status)) { - return -EINVAL; - } + int rc = read_cb(cb_arg, &data->status, sizeof(data->status)); + if (rc >= 0) { + data->settings_init = true; - rc = read_cb(cb_arg, &data->status, sizeof(data->status)); - if (rc >= 0) { - data->settings_init = true; + if (data->status) { + ext_power_generic_enable(dev); + } else { + ext_power_generic_disable(dev); + } - if (ext_power == NULL) { - LOG_ERR("Unable to retrieve ext_power device: %s", DT_INST_PROP(0, label)); - return -EIO; - } + return 0; + } + return rc; +} - if (data->status) { - ext_power_generic_enable(ext_power); - } else { - ext_power_generic_disable(ext_power); - } +static int ext_power_settings_set(const char *name, size_t len, settings_read_cb read_cb, + void *cb_arg) { + const struct device *ext_power = DEVICE_DT_GET(DT_DRV_INST(0)); - return 0; - } - return rc; + const char *next; + if (settings_name_steq(name, ext_power->name, &next) && !next) { + return ext_power_settings_set_status(ext_power, len, read_cb, cb_arg); } + return -ENOENT; } diff --git a/app/src/keymap.c b/app/src/keymap.c index bda694276c8..ca41e34adcc 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -31,15 +31,13 @@ static uint8_t _zmk_keymap_layer_default = 0; #define DT_DRV_COMPAT zmk_keymap -#define BINDING_WITH_COMMA(idx, drv_inst) ZMK_KEYMAP_EXTRACT_BINDING(idx, drv_inst) - #define TRANSFORMED_LAYER(node) \ - {LISTIFY(DT_PROP_LEN(node, bindings), BINDING_WITH_COMMA, (, ), node)}, + { LISTIFY(DT_PROP_LEN(node, bindings), ZMK_KEYMAP_EXTRACT_BINDING, (, ), node) } #if ZMK_KEYMAP_HAS_SENSORS #define _TRANSFORM_SENSOR_ENTRY(idx, layer) \ { \ - .behavior_dev = DT_PROP(DT_PHANDLE_BY_IDX(layer, sensor_bindings, idx), label), \ + .behavior_dev = DEVICE_DT_NAME(DT_PHANDLE_BY_IDX(layer, sensor_bindings, idx)), \ .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(layer, sensor_bindings, idx, param1), (0), \ (DT_PHA_BY_IDX(layer, sensor_bindings, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(layer, sensor_bindings, idx, param2), (0), \ @@ -50,12 +48,11 @@ static uint8_t _zmk_keymap_layer_default = 0; COND_CODE_1( \ DT_NODE_HAS_PROP(node, sensor_bindings), \ ({LISTIFY(DT_PROP_LEN(node, sensor_bindings), _TRANSFORM_SENSOR_ENTRY, (, ), node)}), \ - ({})), + ({})) #endif /* ZMK_KEYMAP_HAS_SENSORS */ -#define LAYER_LABEL(node) \ - COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_PROP(node, label))), +#define LAYER_LABEL(node) DT_PROP_OR(node, label, NULL) // State @@ -65,16 +62,16 @@ static uint8_t _zmk_keymap_layer_default = 0; static uint32_t zmk_keymap_active_behavior_layer[ZMK_KEYMAP_LEN]; static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = { - DT_INST_FOREACH_CHILD(0, TRANSFORMED_LAYER)}; + DT_INST_FOREACH_CHILD_SEP(0, TRANSFORMED_LAYER, (, ))}; static const char *zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN] = { - DT_INST_FOREACH_CHILD(0, LAYER_LABEL)}; + DT_INST_FOREACH_CHILD_SEP(0, LAYER_LABEL, (, ))}; #if ZMK_KEYMAP_HAS_SENSORS -static struct zmk_behavior_binding zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN] - [ZMK_KEYMAP_SENSORS_LEN] = { - DT_INST_FOREACH_CHILD(0, SENSOR_LAYER)}; +static struct zmk_behavior_binding + zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_SENSORS_LEN] = { + DT_INST_FOREACH_CHILD_SEP(0, SENSOR_LAYER, (, ))}; #endif /* ZMK_KEYMAP_HAS_SENSORS */ From 05925c72d7303fe786455e64d2c938bdf6be3b0a Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Tue, 5 Sep 2023 17:52:18 -0500 Subject: [PATCH 41/65] refactor(ext_power): Remove label property Changed the label property on zmk,ext-power-generic to be optional and removed it from existing uses. Renamed the nodes for all non-development boards to "EXT_POWER" to preserve user settings. rgb_underglow.c now finds the correct device by finding the first instance of zmk,ext-power-generic instead of looking for a node named "EXT_POWER". --- app/boards/arm/bluemicro840/bluemicro840_v1.dts | 4 ++-- app/boards/arm/ckp/ckp.dtsi | 4 ++-- app/boards/arm/glove80/glove80_lh.dts | 4 ++-- app/boards/arm/glove80/glove80_rh.dts | 4 ++-- app/boards/arm/mikoto/mikoto_520.dts | 4 ++-- app/boards/arm/nice60/nice60.dts | 4 ++-- app/boards/arm/nice_nano/nice_nano.dts | 4 ++-- app/boards/arm/nice_nano/nice_nano_v2.dts | 4 ++-- app/boards/arm/nrfmicro/nrfmicro_11.dts | 4 ++-- app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts | 4 ++-- app/boards/arm/nrfmicro/nrfmicro_13.dts | 4 ++-- app/boards/arm/nrfmicro/nrfmicro_13_52833.dts | 4 ++-- app/boards/arm/pillbug/pillbug.dts | 4 ++-- app/boards/arm/puchi_ble/puchi_ble_v1.dts | 4 ++-- app/boards/shields/zmk_uno/zmk_uno.overlay | 3 --- app/dts/bindings/zmk,ext-power-generic.yaml | 3 ++- app/src/rgb_underglow.c | 8 ++++---- 17 files changed, 34 insertions(+), 36 deletions(-) diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts index 05849001eaf..b31a8f7fd23 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; init-delay-ms = <20>; control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index ec2bd6a87b6..2cb4bcfea6c 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -66,9 +66,9 @@ ; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/arm/glove80/glove80_lh.dts index ed40e0d2d1e..b00fa9806e6 100644 --- a/app/boards/arm/glove80/glove80_lh.dts +++ b/app/boards/arm/glove80/glove80_lh.dts @@ -28,9 +28,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ init-delay-ms = <100>; }; diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts index 288f63688ca..e9fd52d5e3f 100644 --- a/app/boards/arm/glove80/glove80_rh.dts +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */ init-delay-ms = <100>; }; diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/boards/arm/mikoto/mikoto_520.dts index f8007033155..0da2e441cde 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/boards/arm/mikoto/mikoto_520.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; init-delay-ms = <50>; }; diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/arm/nice60/nice60.dts index 651dd555556..ea72945a0ba 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/arm/nice60/nice60.dts @@ -78,9 +78,9 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; }; diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/arm/nice_nano/nice_nano.dts index 4ee0df7fc43..8fec5004f78 100644 --- a/app/boards/arm/nice_nano/nice_nano.dts +++ b/app/boards/arm/nice_nano/nice_nano.dts @@ -12,9 +12,9 @@ zmk,battery = &vbatt; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/arm/nice_nano/nice_nano_v2.dts index b2fbcc81970..429b339ecdd 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/arm/nice_nano/nice_nano_v2.dts @@ -12,9 +12,9 @@ zmk,battery = &vbatt; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; init-delay-ms = <50>; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts index 14b9adb9670..7d2f88c47d9 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -28,9 +28,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts index 874b67e25de..88ef21b6349 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -28,9 +28,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts index 65674132f80..e71c5c4f41a 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts index cfe77e37c82..c75a44b1cf0 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index a2e56df3e8e..6d9337aa5d2 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -30,9 +30,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; init-delay-ms = <50>; }; diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/arm/puchi_ble/puchi_ble_v1.dts index b056f7113e1..1198b762d45 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/arm/puchi_ble/puchi_ble_v1.dts @@ -29,9 +29,9 @@ }; }; - ext-power { + // Node name must match original "EXT_POWER" label to preserve user settings. + EXT_POWER { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 02bb4ad8e81..b21b83aeeb9 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -49,15 +49,12 @@ nice_view_spi: &arduino_spi { // Commented out until we add more powerful power domain support // external_power { // compatible = "zmk,ext-power-generic"; - // label = "EXT_POWER"; // init-delay-ms = <200>; // control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; // }; rgb_power { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - // label = "RGB_POWER"; init-delay-ms = <200>; control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; }; diff --git a/app/dts/bindings/zmk,ext-power-generic.yaml b/app/dts/bindings/zmk,ext-power-generic.yaml index ddb4b3deb9b..cb2a16b57ba 100644 --- a/app/dts/bindings/zmk,ext-power-generic.yaml +++ b/app/dts/bindings/zmk,ext-power-generic.yaml @@ -14,7 +14,8 @@ properties: required: true label: type: string - required: true + required: false + deprecated: true init-delay-ms: type: int description: Number of milliseconds to delay after initializing driver diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index b80d403953f..9d4f2cf1cab 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -67,7 +67,7 @@ static struct led_rgb pixels[STRIP_NUM_PIXELS]; static struct rgb_underglow_state state; #if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER) -static const struct device *ext_power; +static const struct device *const ext_power = DEVICE_DT_GET(DT_INST(0, zmk_ext_power_generic)); #endif static struct zmk_led_hsb hsb_scale_min_max(struct zmk_led_hsb hsb) { @@ -243,9 +243,9 @@ static int zmk_rgb_underglow_init(const struct device *_arg) { led_strip = DEVICE_DT_GET(STRIP_CHOSEN); #if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER) - ext_power = device_get_binding("EXT_POWER"); - if (ext_power == NULL) { - LOG_ERR("Unable to retrieve ext_power device: EXT_POWER"); + if (!device_is_ready(ext_power)) { + LOG_ERR("External power device \"%s\" is not ready", ext_power->name); + return -ENODEV; } #endif From 3ae9e740567081fceb1c67ad403e4d94e983e08b Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 18 Nov 2023 00:39:11 -0600 Subject: [PATCH 42/65] refactor(drivers): Make label property optional --- app/module/dts/bindings/sensor/alps,ec11.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/module/dts/bindings/sensor/alps,ec11.yaml b/app/module/dts/bindings/sensor/alps,ec11.yaml index 3672ea30579..46dad31d23d 100644 --- a/app/module/dts/bindings/sensor/alps,ec11.yaml +++ b/app/module/dts/bindings/sensor/alps,ec11.yaml @@ -6,7 +6,8 @@ compatible: "alps,ec11" properties: label: type: string - required: true + required: false + deprecated: true a-gpios: type: phandle-array required: true From ba5637fdefc5aff8e57ec9172887405dcb363bb1 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 6 Oct 2023 19:53:37 -0500 Subject: [PATCH 43/65] refactor: Remove unimportant labels Removed "label" properties which no longer have any function. Labels are still used as layer names and as identifiers for sending behaviors between sides of a split keyboard, so those have been left alone for now. --- app/boards/arm/bdn9/bdn9_rev2.dts | 7 ------- app/boards/arm/bluemicro840/bluemicro840_v1.dts | 7 ------- app/boards/arm/bt60/bt60.dtsi | 8 -------- app/boards/arm/bt60/bt60_v1.dts | 1 - app/boards/arm/bt60/bt60_v1_hs.dts | 1 - app/boards/arm/ckp/ckp.dtsi | 12 ------------ app/boards/arm/corneish_zen/corneish_zen.dtsi | 5 ----- app/boards/arm/corneish_zen/corneish_zen_v1_left.dts | 4 ---- .../arm/corneish_zen/corneish_zen_v1_right.dts | 4 ---- app/boards/arm/corneish_zen/corneish_zen_v2_left.dts | 4 ---- .../arm/corneish_zen/corneish_zen_v2_right.dts | 4 ---- app/boards/arm/dz60rgb/dz60rgb_rev1.dts | 3 --- app/boards/arm/ferris/ferris_rev02.dts | 5 ----- app/boards/arm/glove80/glove80.dtsi | 6 ------ app/boards/arm/glove80/glove80.keymap | 5 ----- app/boards/arm/glove80/glove80_lh.dts | 4 ---- app/boards/arm/glove80/glove80_rh.dts | 4 ---- app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts | 3 --- app/boards/arm/mikoto/mikoto_520.dts | 7 ------- app/boards/arm/nice60/nice60.dts | 9 --------- app/boards/arm/nice_nano/nice_nano.dts | 1 - app/boards/arm/nice_nano/nice_nano.dtsi | 6 ------ app/boards/arm/nice_nano/nice_nano_v2.dts | 1 - app/boards/arm/nrf52840_m2/nrf52840_m2.dts | 9 --------- app/boards/arm/nrfmicro/nrfmicro_11.dts | 6 ------ app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts | 6 ------ app/boards/arm/nrfmicro/nrfmicro_13.dts | 7 ------- app/boards/arm/nrfmicro/nrfmicro_13_52833.dts | 7 ------- app/boards/arm/pillbug/pillbug.dts | 7 ------- app/boards/arm/planck/planck_rev6.dts | 3 --- app/boards/arm/preonic/preonic_rev3.dts | 3 --- app/boards/arm/proton_c/proton_c.dts | 3 --- app/boards/arm/puchi_ble/puchi_ble_v1.dts | 7 ------- app/boards/arm/s40nc/s40nc.dts | 8 -------- app/boards/native_posix.overlay | 1 - app/boards/native_posix_64.overlay | 1 - app/boards/seeeduino_xiao.overlay | 1 - app/boards/seeeduino_xiao_ble.overlay | 2 -- app/boards/shields/a_dux/a_dux.dtsi | 1 - app/boards/shields/bat43/bat43.overlay | 1 - app/boards/shields/bfo9000/bfo9000.dtsi | 1 - .../shields/boardsource3x4/boardsource3x4.overlay | 1 - .../shields/boardsource5x12/boardsource5x12.overlay | 1 - app/boards/shields/chalice/boards/nice_nano.overlay | 1 - .../shields/chalice/boards/nice_nano_v2.overlay | 1 - app/boards/shields/chalice/chalice.overlay | 1 - app/boards/shields/clog/clog.dtsi | 1 - .../clueboard_california.overlay | 2 -- app/boards/shields/contra/contra.overlay | 1 - app/boards/shields/corne/boards/nice_nano.overlay | 1 - app/boards/shields/corne/boards/nice_nano_v2.overlay | 1 - app/boards/shields/corne/corne.dtsi | 2 -- app/boards/shields/cradio/cradio.dtsi | 1 - app/boards/shields/crbn/crbn.overlay | 2 -- app/boards/shields/eek/eek.overlay | 1 - .../shields/elephant42/boards/nice_nano.overlay | 1 - .../shields/elephant42/boards/nice_nano_v2.overlay | 1 - app/boards/shields/elephant42/elephant42.dtsi | 2 -- app/boards/shields/ergodash/ergodash.dtsi | 1 - .../shields/eternal_keypad/boards/nice_nano.overlay | 1 - .../eternal_keypad/boards/nice_nano_v2.overlay | 1 - .../shields/eternal_keypad/eternal_keypad.dtsi | 1 - app/boards/shields/fourier/fourier.dtsi | 1 - app/boards/shields/helix/boards/nice_nano.overlay | 1 - app/boards/shields/helix/boards/nice_nano_v2.overlay | 1 - app/boards/shields/helix/helix.dtsi | 1 - app/boards/shields/hummingbird/hummingbird.overlay | 1 - app/boards/shields/iris/iris.dtsi | 1 - app/boards/shields/jian/jian.dtsi | 1 - app/boards/shields/jiran/jiran.dtsi | 1 - app/boards/shields/jorne/boards/nice_nano.overlay | 1 - app/boards/shields/jorne/boards/nice_nano_v2.overlay | 1 - app/boards/shields/jorne/jorne.dtsi | 2 -- app/boards/shields/knob_goblin/knob_goblin.overlay | 4 ---- app/boards/shields/kyria/boards/nice_nano.overlay | 1 - app/boards/shields/kyria/boards/nice_nano_v2.overlay | 1 - app/boards/shields/kyria/boards/nrfmicro_11.overlay | 1 - .../shields/kyria/boards/nrfmicro_11_flipped.overlay | 1 - app/boards/shields/kyria/boards/nrfmicro_13.overlay | 1 - app/boards/shields/kyria/kyria_common.dtsi | 4 ---- .../shields/leeloo/boards/nice_nano_v2.overlay | 1 - app/boards/shields/leeloo/leeloo_common.dtsi | 4 ---- .../shields/leeloo_micro/boards/nice_nano_v2.overlay | 1 - app/boards/shields/leeloo_micro/leeloo_micro.dtsi | 4 ---- app/boards/shields/lily58/boards/nice_nano.overlay | 1 - .../shields/lily58/boards/nice_nano_v2.overlay | 1 - app/boards/shields/lily58/lily58.dtsi | 3 --- app/boards/shields/lotus58/lotus58.dtsi | 4 ---- app/boards/shields/m60/m60.overlay | 1 - app/boards/shields/microdox/boards/nice_nano.overlay | 1 - .../shields/microdox/boards/nice_nano_v2.overlay | 1 - app/boards/shields/microdox/microdox.dtsi | 1 - app/boards/shields/microdox/microdox_common.dtsi | 1 - app/boards/shields/microdox/microdox_v2.dtsi | 1 - app/boards/shields/murphpad/boards/nice_nano.overlay | 1 - .../shields/murphpad/boards/nice_nano_v2.overlay | 1 - app/boards/shields/murphpad/murphpad.overlay | 4 ---- app/boards/shields/naked60/naked60.overlay | 1 - app/boards/shields/nibble/boards/nice_nano.overlay | 1 - .../shields/nibble/boards/nice_nano_v2.overlay | 1 - app/boards/shields/nibble/nibble.overlay | 3 --- app/boards/shields/nice_view/nice_view.overlay | 1 - app/boards/shields/osprette/osprette.overlay | 1 - app/boards/shields/pancake/pancake.overlay | 1 - app/boards/shields/qaz/qaz.overlay | 1 - app/boards/shields/quefrency/quefrency_left.overlay | 1 - app/boards/shields/quefrency/quefrency_right.overlay | 1 - app/boards/shields/redox/boards/nice_nano.overlay | 1 - app/boards/shields/redox/boards/nice_nano_v2.overlay | 1 - app/boards/shields/redox/redox.dtsi | 1 - .../shields/reviung34/boards/nice_nano_v2.overlay | 1 - app/boards/shields/reviung34/reviung34.overlay | 1 - .../shields/reviung41/boards/nice_nano.overlay | 1 - .../shields/reviung41/boards/nice_nano_v2.overlay | 1 - app/boards/shields/reviung41/reviung41.overlay | 1 - app/boards/shields/reviung5/reviung5.overlay | 2 -- .../shields/reviung53/boards/nice_nano.overlay | 1 - .../shields/reviung53/boards/nice_nano_v2.overlay | 1 - app/boards/shields/reviung53/reviung53.overlay | 1 - app/boards/shields/romac/romac.overlay | 1 - .../shields/romac_plus/boards/nice_nano.overlay | 1 - .../shields/romac_plus/boards/nice_nano_v2.overlay | 1 - app/boards/shields/romac_plus/romac_plus.dtsi | 2 -- app/boards/shields/romac_plus/romac_plus.overlay | 1 - .../shields/settings_reset/settings_reset.overlay | 1 - app/boards/shields/snap/boards/nice_nano.overlay | 1 - app/boards/shields/snap/boards/nice_nano_v2.overlay | 1 - app/boards/shields/snap/snap.dtsi | 5 ----- app/boards/shields/snap/snap_right.overlay | 1 - app/boards/shields/sofle/boards/nice_nano.overlay | 1 - app/boards/shields/sofle/boards/nice_nano_v2.overlay | 1 - app/boards/shields/sofle/boards/nrfmicro_11.overlay | 1 - app/boards/shields/sofle/boards/nrfmicro_13.overlay | 1 - app/boards/shields/sofle/sofle.dtsi | 4 ---- .../splitkb_aurora_corne/boards/nice_nano.overlay | 1 - .../splitkb_aurora_corne/boards/nice_nano_v2.overlay | 1 - .../splitkb_aurora_corne/splitkb_aurora_corne.dtsi | 3 --- .../splitkb_aurora_corne_left.overlay | 2 -- .../splitkb_aurora_corne_right.overlay | 2 -- .../splitkb_aurora_helix/boards/nice_nano.overlay | 1 - .../splitkb_aurora_helix/boards/nice_nano_v2.overlay | 1 - .../splitkb_aurora_helix/splitkb_aurora_helix.dtsi | 3 --- .../splitkb_aurora_helix_left.overlay | 2 -- .../splitkb_aurora_helix_right.overlay | 2 -- .../splitkb_aurora_lily58/boards/nice_nano.overlay | 1 - .../boards/nice_nano_v2.overlay | 1 - .../splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi | 3 --- .../splitkb_aurora_lily58_left.overlay | 2 -- .../splitkb_aurora_lily58_right.overlay | 2 -- .../splitkb_aurora_sofle/boards/nice_nano.overlay | 1 - .../splitkb_aurora_sofle/boards/nice_nano_v2.overlay | 1 - .../splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi | 3 --- .../splitkb_aurora_sofle_left.overlay | 2 -- .../splitkb_aurora_sofle_right.overlay | 2 -- .../splitkb_aurora_sweep/boards/nice_nano.overlay | 1 - .../splitkb_aurora_sweep/boards/nice_nano_v2.overlay | 1 - .../splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi | 5 ----- .../splitkb_aurora_sweep_left.overlay | 2 -- .../splitkb_aurora_sweep_right.overlay | 2 -- app/boards/shields/splitreus62/splitreus62.dtsi | 1 - app/boards/shields/tg4x/boards/nice_nano.overlay | 1 - app/boards/shields/tg4x/boards/nice_nano_v2.overlay | 1 - app/boards/shields/tg4x/tg4x.overlay | 1 - app/boards/shields/tidbit/boards/nice_nano.overlay | 1 - .../shields/tidbit/boards/nice_nano_v2.overlay | 1 - app/boards/shields/tidbit/tidbit.dtsi | 7 ------- .../two_percent_milk/boards/nice_nano.overlay | 1 - .../two_percent_milk/boards/nice_nano_v2.overlay | 1 - .../two_percent_milk/boards/nrfmicro_11.overlay | 1 - .../boards/nrfmicro_11_flipped.overlay | 1 - .../two_percent_milk/boards/nrfmicro_13.overlay | 1 - .../two_percent_milk/two_percent_milk.overlay | 2 -- app/boards/shields/waterfowl/waterfowl.dtsi | 6 ------ app/boards/shields/zmk_uno/zmk_uno.overlay | 7 ------- app/boards/shields/zodiark/zodiark.dtsi | 4 ---- app/boards/usb_console.dtsi | 1 - app/tests/backlight/behavior_keymap.dtsi | 3 --- app/tests/backlight/cycle/native_posix_64.keymap | 3 --- app/tests/caps-word/behavior_keymap.dtsi | 1 - .../continue-with-modifiers/native_posix_64.keymap | 1 - .../combos-and-holdtaps-0/native_posix_64.keymap | 1 - .../combos-and-holdtaps-1/native_posix_64.keymap | 1 - .../combos-and-holdtaps-2/native_posix_64.keymap | 1 - .../combos-and-holdtaps-3/native_posix_64.keymap | 1 - .../combos-and-holdtaps-4/native_posix_64.keymap | 1 - .../combo/layer-filter-0/native_posix_64.keymap | 1 - .../combo/layer-filter-1/native_posix_64.keymap | 1 - .../combo/multiple-timeouts/native_posix_64.keymap | 1 - .../overlapping-combos-0/native_posix_64.keymap | 1 - .../overlapping-combos-1/native_posix_64.keymap | 1 - .../overlapping-combos-2/native_posix_64.keymap | 1 - .../overlapping-combos-3/native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - app/tests/combo/press-release/native_posix_64.keymap | 1 - app/tests/combo/press-timeout/native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../combo/require-prior-idle/native_posix_64.keymap | 1 - .../slowrelease-disabled/native_posix_64.keymap | 1 - .../combo/slowrelease-enabled/native_posix_64.keymap | 1 - .../gresc/gresc-press-release/native_posix_64.keymap | 1 - .../gresc/gresc-two-instances/native_posix_64.keymap | 1 - .../balanced/6-retro-tap/native_posix_64.keymap | 2 -- .../balanced/7-positional/behavior_keymap.dtsi | 2 -- .../8-require-prior-idle/behavior_keymap.dtsi | 2 -- app/tests/hold-tap/balanced/behavior_keymap.dtsi | 2 -- .../balanced/many-nested/native_posix_64.keymap | 2 -- .../6-retro-tap/native_posix_64.keymap | 2 -- .../hold-preferred/7-positional/behavior_keymap.dtsi | 2 -- .../8-require-prior-idle/behavior_keymap.dtsi | 2 -- .../hold-tap/hold-preferred/behavior_keymap.dtsi | 2 -- .../6-nested-timeouts/native_posix_64.keymap | 3 --- .../tap-preferred/7-positional/behavior_keymap.dtsi | 2 -- .../8-require-prior-idle/behavior_keymap.dtsi | 2 -- .../hold-tap/tap-preferred/behavior_keymap.dtsi | 2 -- .../6-require-prior-idle/behavior_keymap.dtsi | 2 -- .../tap-unless-interrupted/behavior_keymap.dtsi | 2 -- app/tests/key-repeat/behavior_keymap.dtsi | 1 - app/tests/keypress/behavior_keymap.dtsi | 1 - app/tests/keytoggle/behavior_keymap.dtsi | 1 - .../keytoggle/kt-alt-tab/native_posix_64.keymap | 1 - .../keytoggle/kt-modded-alpha/native_posix_64.keymap | 1 - app/tests/macros/behavior_keymap.dtsi | 1 - .../native_posix_64.keymap | 2 -- .../mo-plus-modifier-macro/native_posix_64.keymap | 1 - .../place-holder-parameters/native_posix_64.keymap | 4 ---- .../native_posix_64.keymap | 2 -- .../native_posix_64.keymap | 2 -- .../native_posix_64.keymap | 2 -- .../3-unmasked-morph/native_posix_64.keymap | 2 -- app/tests/mod-morph/behavior_keymap.dtsi | 2 -- .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../kp-lctl-dn-lctl-up/native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../momentary-layer/1-normal/native_posix_64.keymap | 1 - .../2-early-key-release/native_posix_64.keymap | 1 - .../momentary-layer/3-covered/native_posix_64.keymap | 1 - .../momentary-layer/4-nested/native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - app/tests/momentary-layer/behavior_keymap.dtsi | 1 - app/tests/mouse-keys/mkp/native_posix.keymap | 1 - app/tests/mouse-keys/mkp/native_posix_64.keymap | 1 - app/tests/none/behavior_keymap.dtsi | 1 - .../native_posix_64.keymap | 1 - .../10-callum-mods/native_posix_64.keymap | 1 - .../sticky-keys/10-sl-sl-kp/native_posix_64.keymap | 1 - .../2-sl-dn-up-kcdn-kcup/native_posix_64.keymap | 1 - .../native_posix_64.keymap | 1 - .../8-lsk-osk-combination/native_posix_64.keymap | 1 - .../9-sk-dn-up-dn-up/native_posix_64.keymap | 1 - app/tests/sticky-keys/behavior_keymap.dtsi | 1 - app/tests/tap-dance/behavior_keymap.dtsi | 6 ------ app/tests/to-layer/behavior_keymap.dtsi | 1 - app/tests/toggle-layer/behavior_keymap.dtsi | 1 - app/tests/transparent/behavior_keymap.dtsi | 1 - app/tests/wpm/behavior_keymap.dtsi | 1 - 268 files changed, 525 deletions(-) diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts index 1b85067ce13..6e15408a2cd 100644 --- a/app/boards/arm/bdn9/bdn9_rev2.dts +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -23,7 +23,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; input-gpios = <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> @@ -40,7 +39,6 @@ left_encoder: encoder_left { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -48,7 +46,6 @@ }; mid_encoder: encoder_mid { compatible = "alps,ec11"; - label = "MID_ENCODER"; a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -56,7 +53,6 @@ }; right_encoder: encoder_right { compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -78,7 +74,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ @@ -117,7 +112,6 @@ pinctrl-names = "default"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -137,7 +131,6 @@ /* Set 6Kb of storage at the end of the 128Kb of flash */ storage_partition: partition@1e800 { - label = "storage"; reg = <0x0001e800 0x00001800>; }; }; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts index b31a8f7fd23..408cca3be76 100644 --- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -25,7 +25,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -38,7 +37,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 7>; output-ohms = <2000000>; full-ohms = <(2000000 + 806000)>; @@ -81,7 +79,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -97,11 +94,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -115,12 +110,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/bt60/bt60.dtsi b/app/boards/arm/bt60/bt60.dtsi index 8a270250957..68d817ea9c7 100644 --- a/app/boards/arm/bt60/bt60.dtsi +++ b/app/boards/arm/bt60/bt60.dtsi @@ -32,7 +32,6 @@ left_encoder: encoder_left { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -44,13 +43,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 806000)>; @@ -89,7 +86,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -105,11 +101,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -123,12 +117,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/bt60/bt60_v1.dts b/app/boards/arm/bt60/bt60_v1.dts index 0cfe184a090..4f66a0c20e3 100644 --- a/app/boards/arm/bt60/bt60_v1.dts +++ b/app/boards/arm/bt60/bt60_v1.dts @@ -81,7 +81,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/arm/bt60/bt60_v1_hs.dts b/app/boards/arm/bt60/bt60_v1_hs.dts index b24dee1e82b..155d626cc27 100644 --- a/app/boards/arm/bt60/bt60_v1_hs.dts +++ b/app/boards/arm/bt60/bt60_v1_hs.dts @@ -30,7 +30,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/arm/ckp/ckp.dtsi b/app/boards/arm/ckp/ckp.dtsi index 2cb4bcfea6c..6bbbbdd74fb 100644 --- a/app/boards/arm/ckp/ckp.dtsi +++ b/app/boards/arm/ckp/ckp.dtsi @@ -34,7 +34,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios @@ -74,7 +73,6 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; - label = "ENCODER_ONE"; a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -83,7 +81,6 @@ encoder_2: encoder_2 { compatible = "alps,ec11"; - label = "ENCODER_TWO"; a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -92,7 +89,6 @@ encoder_3: encoder_3 { compatible = "alps,ec11"; - label = "encoder_3"; a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -101,7 +97,6 @@ backlight: pwmleds { compatible = "pwm-leds"; - label = "Backlight LEDs"; pwm_led_0 { pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>; }; @@ -111,13 +106,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "VBATT"; io-channels = <&adc 2>; output-ohms = <100000>; full-ohms = <(100000 + 100000)>; @@ -163,11 +156,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -181,12 +172,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; @@ -201,7 +190,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; diff --git a/app/boards/arm/corneish_zen/corneish_zen.dtsi b/app/boards/arm/corneish_zen/corneish_zen.dtsi index 289c5e73711..c6f2b630cbe 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.dtsi +++ b/app/boards/arm/corneish_zen/corneish_zen.dtsi @@ -80,7 +80,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -95,11 +94,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -113,12 +110,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts b/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts index 399a564ff89..6683b1b2408 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_left.dts @@ -15,7 +15,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -39,7 +38,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; }; @@ -88,7 +86,6 @@ fuelgauge: bq274xx@55 { compatible = "ti,bq274xx"; - label = "BATTERY"; reg = <0x55>; design-voltage = <3700>; //Battery Design Volatge in mV design-capacity = <180>; //Battery Design Capacity in mAh @@ -109,7 +106,6 @@ epd: il0323@0 { compatible = "gooddisplay,il0323"; reg = <0>; - label = "DISPLAY"; width = <80>; height = <128>; spi-max-frequency = <4000000>; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts b/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts index d5f6e588444..492c79fa108 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v1_right.dts @@ -15,7 +15,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -39,7 +38,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; }; @@ -96,7 +94,6 @@ fuelgauge: bq274xx@55 { compatible = "ti,bq274xx"; - label = "BATTERY"; reg = <0x55>; design-voltage = <3700>; //Battery Design Volatge in mV design-capacity = <180>; //Battery Design Capacity in mAh @@ -117,7 +114,6 @@ epd: il0323@0 { compatible = "gooddisplay,il0323"; reg = <0>; - label = "DISPLAY"; width = <80>; height = <128>; spi-max-frequency = <4000000>; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts index 14d82e87558..dacb24c3a24 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_left.dts @@ -15,7 +15,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -39,13 +38,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 0>; output-ohms = <1960000>; full-ohms = <(1960000 + 810000)>; @@ -83,7 +80,6 @@ epd: il0323@0 { compatible = "gooddisplay,il0323"; reg = <0>; - label = "DISPLAY"; width = <80>; height = <128>; spi-max-frequency = <4000000>; diff --git a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts index 4d444cae4f8..f1baea42656 100644 --- a/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts +++ b/app/boards/arm/corneish_zen/corneish_zen_v2_right.dts @@ -15,7 +15,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -39,13 +38,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 0>; output-ohms = <1960000>; full-ohms = <(1960000 + 810000)>; @@ -90,7 +87,6 @@ epd: il0323@0 { compatible = "gooddisplay,il0323"; reg = <0>; - label = "DISPLAY"; width = <80>; height = <128>; spi-max-frequency = <4000000>; diff --git a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts index 14be837d9ee..25c95ddf8ee 100644 --- a/app/boards/arm/dz60rgb/dz60rgb_rev1.dts +++ b/app/boards/arm/dz60rgb/dz60rgb_rev1.dts @@ -36,7 +36,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC( kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -70,7 +69,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC( status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -86,7 +84,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC( /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { - label = "storage"; reg = <0x0003e800 0x00001800>; }; }; diff --git a/app/boards/arm/ferris/ferris_rev02.dts b/app/boards/arm/ferris/ferris_rev02.dts index 618a5591407..1b9408d2d9b 100644 --- a/app/boards/arm/ferris/ferris_rev02.dts +++ b/app/boards/arm/ferris/ferris_rev02.dts @@ -40,7 +40,6 @@ kscan: kscan { compatible = "zmk,kscan-composite"; - label = "KSCAN"; rows = <4>; columns = <10>; @@ -56,7 +55,6 @@ kscan_left: kscan_left { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN_LEFT"; diode-direction = "col2row"; @@ -77,7 +75,6 @@ kscan_right: kscan_right { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN_RIGHT"; diode-direction = "row2col"; @@ -117,7 +114,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -156,7 +152,6 @@ /* Set 6Kb of storage at the end of the 128Kb of flash */ storage_partition: partition@3e800 { - label = "storage"; reg = <0x0001e800 0x00001800>; }; }; diff --git a/app/boards/arm/glove80/glove80.dtsi b/app/boards/arm/glove80/glove80.dtsi index f3f58cf7b42..3e3a6233b8d 100644 --- a/app/boards/arm/glove80/glove80.dtsi +++ b/app/boards/arm/glove80/glove80.dtsi @@ -34,7 +34,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; debounce-press-ms = <4>; debounce-release-ms = <20>; @@ -62,7 +61,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -77,11 +75,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -95,12 +91,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/glove80/glove80.keymap b/app/boards/arm/glove80/glove80.keymap index 6c920ca1dcd..60129bd94e9 100644 --- a/app/boards/arm/glove80/glove80.keymap +++ b/app/boards/arm/glove80/glove80.keymap @@ -22,7 +22,6 @@ // Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to layer_td: tap_dance_0 { compatible = "zmk,behavior-tap-dance"; - label = "LAYER_TAP_DANCE"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&mo LOWER>, <&to LOWER>; @@ -31,7 +30,6 @@ macros { bt_0: bt_profile_macro_0 { - label = "BT_0"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings @@ -40,7 +38,6 @@ }; bt_1: bt_profile_macro_1 { - label = "BT_1"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings @@ -49,7 +46,6 @@ }; bt_2: bt_profile_macro_2 { - label = "BT_2"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings @@ -58,7 +54,6 @@ }; bt_3: bt_profile_macro_3 { - label = "BT_3"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings diff --git a/app/boards/arm/glove80/glove80_lh.dts b/app/boards/arm/glove80/glove80_lh.dts index b00fa9806e6..5ef54207127 100644 --- a/app/boards/arm/glove80/glove80_lh.dts +++ b/app/boards/arm/glove80/glove80_lh.dts @@ -21,10 +21,8 @@ back_led_backlight: pwmleds { compatible = "pwm-leds"; - label = "BACK LED"; pwm_led_0 { pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; - label = "Back LED configured as backlight"; }; }; @@ -37,7 +35,6 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; - label = "BATTERY"; }; }; @@ -51,7 +48,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812C-2020"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/arm/glove80/glove80_rh.dts b/app/boards/arm/glove80/glove80_rh.dts index e9fd52d5e3f..6f108d74763 100644 --- a/app/boards/arm/glove80/glove80_rh.dts +++ b/app/boards/arm/glove80/glove80_rh.dts @@ -22,10 +22,8 @@ back_led_backlight: pwmleds { compatible = "pwm-leds"; - label = "BACK LED"; pwm_led_0 { pwms = <&pwm0 0 PWM_USEC(20) PWM_POLARITY_NORMAL>; - label = "Back LED configured as backlight"; }; }; @@ -38,7 +36,6 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; - label = "BATTERY"; }; }; @@ -52,7 +49,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812C-2020"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts index 261ffbf4850..ae2f9521071 100644 --- a/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts +++ b/app/boards/arm/kbdfans_tofu65/kbdfans_tofu65_v2.dts @@ -53,7 +53,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -93,7 +92,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) /* Reserved memory for the second stage bootloader */ second_stage_bootloader: partition@0 { - label = "second_stage_bootloader"; reg = <0x00000000 0x100>; read-only; }; @@ -103,7 +101,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,8) RC(4,9) * size is 16MB minus the 0x100 bytes taken by the bootloader. */ code_partition: partition@100 { - label = "code"; reg = <0x100 (DT_SIZE_M(16) - 0x100)>; read-only; }; diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/boards/arm/mikoto/mikoto_520.dts index 0da2e441cde..05ec72dfcda 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/boards/arm/mikoto/mikoto_520.dts @@ -25,7 +25,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -38,7 +37,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 1>; output-ohms = <10000000>; full-ohms = <(10000000 + 4000000)>; @@ -80,7 +78,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -96,11 +93,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -114,12 +109,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nice60/nice60.dts b/app/boards/arm/nice60/nice60.dts index ea72945a0ba..63b9685d3ca 100644 --- a/app/boards/arm/nice60/nice60.dts +++ b/app/boards/arm/nice60/nice60.dts @@ -42,7 +42,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -74,7 +73,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -86,7 +84,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 806000)>; @@ -118,7 +115,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ @@ -136,7 +132,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -151,12 +146,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R #size-cells = <1>; sd_partition: partition@0 { - label = "mbr"; reg = <0x00000000 0x00001000>; }; code_partition: partition@1000 { - label = "code_partition"; reg = <0x00001000 0x000d3000>; }; @@ -170,12 +163,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R * if enabled. */ storage_partition: partition@d4000 { - label = "storage"; reg = <0x000d4000 0x00020000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/arm/nice_nano/nice_nano.dts index 8fec5004f78..06be88e1c51 100644 --- a/app/boards/arm/nice_nano/nice_nano.dts +++ b/app/boards/arm/nice_nano/nice_nano.dts @@ -20,7 +20,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 806000)>; diff --git a/app/boards/arm/nice_nano/nice_nano.dtsi b/app/boards/arm/nice_nano/nice_nano.dtsi index 0c0a3823054..81f10906b92 100644 --- a/app/boards/arm/nice_nano/nice_nano.dtsi +++ b/app/boards/arm/nice_nano/nice_nano.dtsi @@ -23,7 +23,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; }; @@ -63,7 +62,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -79,11 +77,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -97,12 +93,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/arm/nice_nano/nice_nano_v2.dts index 429b339ecdd..c4f7a821c04 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/arm/nice_nano/nice_nano_v2.dts @@ -21,6 +21,5 @@ vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; - label = "BATTERY"; }; }; diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts index 253e6b77d56..85e9ce2107f 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts @@ -23,21 +23,17 @@ compatible = "gpio-leds"; red_led: led_0 { gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; - label = "Red LED"; }; green_led: led_1 { gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; - label = "Green LED"; }; blue_led: led_2 { gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 0>; output-ohms = <1000000>; full-ohms = <(1000000 + 1000000)>; @@ -66,7 +62,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -82,11 +77,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -100,12 +93,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts index 7d2f88c47d9..c0c02ee9e34 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -24,7 +24,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -66,7 +65,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -82,11 +80,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -100,12 +96,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts index 88ef21b6349..df3b224bc49 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -24,7 +24,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -66,7 +65,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -82,11 +80,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -100,12 +96,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts index e71c5c4f41a..f5ae81c9545 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -25,7 +25,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -37,7 +36,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 820000)>; @@ -79,7 +77,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -95,11 +92,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -113,12 +108,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts index c75a44b1cf0..d6c88692d95 100644 --- a/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts +++ b/app/boards/arm/nrfmicro/nrfmicro_13_52833.dts @@ -25,7 +25,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -37,7 +36,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 820000)>; @@ -79,7 +77,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -95,11 +92,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x00046000>; }; @@ -113,12 +108,10 @@ * if enabled. */ storage_partition: partition@6c000 { - label = "storage"; reg = <0x0006c000 0x00008000>; }; boot_partition: partition@74000 { - label = "adafruit_boot"; reg = <0x00074000 0x0000c000>; }; }; diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index 6d9337aa5d2..c30d306e275 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -26,7 +26,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; - label = "Blue LED"; }; }; @@ -39,7 +38,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 820000)>; @@ -89,7 +87,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -105,12 +102,10 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "mbr"; reg = <0x00000000 0x00001000>; }; code_partition: partition@1000 { - label = "code_partition"; reg = <0x00001000 0x000d3000>; }; @@ -124,12 +119,10 @@ * if enabled. */ storage_partition: partition@d4000 { - label = "storage"; reg = <0x000d4000 0x00020000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/planck/planck_rev6.dts b/app/boards/arm/planck/planck_rev6.dts index 5fdd2c21aee..0951d618272 100644 --- a/app/boards/arm/planck/planck_rev6.dts +++ b/app/boards/arm/planck/planck_rev6.dts @@ -23,7 +23,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> @@ -89,7 +88,6 @@ layout_2x2u_transform: status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -125,7 +123,6 @@ layout_2x2u_transform: /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { - label = "storage"; reg = <0x0003e800 0x00001800>; }; }; diff --git a/app/boards/arm/preonic/preonic_rev3.dts b/app/boards/arm/preonic/preonic_rev3.dts index c19b131926b..249c8f3c6ed 100644 --- a/app/boards/arm/preonic/preonic_rev3.dts +++ b/app/boards/arm/preonic/preonic_rev3.dts @@ -23,7 +23,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> @@ -96,7 +95,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -132,7 +130,6 @@ cdc_acm_uart: cdc_acm_uart { /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { - label = "storage"; reg = <0x0003e800 0x00001800>; }; }; diff --git a/app/boards/arm/proton_c/proton_c.dts b/app/boards/arm/proton_c/proton_c.dts index b5a490eeab6..3aad62c8f30 100644 --- a/app/boards/arm/proton_c/proton_c.dts +++ b/app/boards/arm/proton_c/proton_c.dts @@ -27,7 +27,6 @@ compatible = "gpio-leds"; led: led_0 { gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; - label = "User LED"; }; }; }; @@ -73,7 +72,6 @@ status = "okay"; cdc_acm_uart0: cdc_acm_uart0 { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -93,7 +91,6 @@ /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { - label = "storage"; reg = <0x0003e800 0x00001800>; }; }; diff --git a/app/boards/arm/puchi_ble/puchi_ble_v1.dts b/app/boards/arm/puchi_ble/puchi_ble_v1.dts index 1198b762d45..05aba8d3780 100644 --- a/app/boards/arm/puchi_ble/puchi_ble_v1.dts +++ b/app/boards/arm/puchi_ble/puchi_ble_v1.dts @@ -25,7 +25,6 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; @@ -37,7 +36,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 820000)>; @@ -78,7 +76,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -94,11 +91,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -112,12 +107,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/arm/s40nc/s40nc.dts b/app/boards/arm/s40nc/s40nc.dts index 6eb9e2a561a..aff09460853 100644 --- a/app/boards/arm/s40nc/s40nc.dts +++ b/app/boards/arm/s40nc/s40nc.dts @@ -37,7 +37,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -66,13 +65,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 2>; output-ohms = <2000000>; full-ohms = <(2000000 + 820000)>; @@ -99,7 +96,6 @@ status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -114,12 +110,10 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "mbr"; reg = <0x00000000 0x00001000>; }; code_partition: partition@1000 { - label = "code_partition"; reg = <0x00001000 0x000d3000>; }; @@ -133,12 +127,10 @@ * if enabled. */ storage_partition: partition@d4000 { - label = "storage"; reg = <0x000d4000 0x00020000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/app/boards/native_posix.overlay b/app/boards/native_posix.overlay index f8a8f700348..d5ebcf18454 100644 --- a/app/boards/native_posix.overlay +++ b/app/boards/native_posix.overlay @@ -9,7 +9,6 @@ kscan: kscan { compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK"; rows = <2>; columns = <2>; diff --git a/app/boards/native_posix_64.overlay b/app/boards/native_posix_64.overlay index 74d6b7d8708..d0526ca38eb 100644 --- a/app/boards/native_posix_64.overlay +++ b/app/boards/native_posix_64.overlay @@ -10,7 +10,6 @@ kscan: kscan { compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK"; rows = <2>; columns = <2>; diff --git a/app/boards/seeeduino_xiao.overlay b/app/boards/seeeduino_xiao.overlay index a2ddaea4eaf..285ee4de332 100644 --- a/app/boards/seeeduino_xiao.overlay +++ b/app/boards/seeeduino_xiao.overlay @@ -13,7 +13,6 @@ &usb0 { cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeeduino_xiao_ble.overlay index e6a5b62c738..d2ffbe461cb 100644 --- a/app/boards/seeeduino_xiao_ble.overlay +++ b/app/boards/seeeduino_xiao_ble.overlay @@ -13,7 +13,6 @@ vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 7>; power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; output-ohms = <510000>; @@ -28,7 +27,6 @@ &usbd { cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; diff --git a/app/boards/shields/a_dux/a_dux.dtsi b/app/boards/shields/a_dux/a_dux.dtsi index 28156f42e82..c13f3dd133a 100644 --- a/app/boards/shields/a_dux/a_dux.dtsi +++ b/app/boards/shields/a_dux/a_dux.dtsi @@ -27,7 +27,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; input-gpios = <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, diff --git a/app/boards/shields/bat43/bat43.overlay b/app/boards/shields/bat43/bat43.overlay index fc906e0f1e7..7ebe653a010 100644 --- a/app/boards/shields/bat43/bat43.overlay +++ b/app/boards/shields/bat43/bat43.overlay @@ -28,7 +28,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/bfo9000/bfo9000.dtsi b/app/boards/shields/bfo9000/bfo9000.dtsi index c5547920658..d9d09a8320c 100644 --- a/app/boards/shields/bfo9000/bfo9000.dtsi +++ b/app/boards/shields/bfo9000/bfo9000.dtsi @@ -28,7 +28,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.overlay b/app/boards/shields/boardsource3x4/boardsource3x4.overlay index afbc9abf2af..389f5b7ab7c 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.overlay +++ b/app/boards/shields/boardsource3x4/boardsource3x4.overlay @@ -13,7 +13,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/boardsource5x12/boardsource5x12.overlay b/app/boards/shields/boardsource5x12/boardsource5x12.overlay index 080a2392919..9a721d0c4aa 100644 --- a/app/boards/shields/boardsource5x12/boardsource5x12.overlay +++ b/app/boards/shields/boardsource5x12/boardsource5x12.overlay @@ -13,7 +13,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/chalice/boards/nice_nano.overlay b/app/boards/shields/chalice/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/chalice/boards/nice_nano.overlay +++ b/app/boards/shields/chalice/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/chalice/boards/nice_nano_v2.overlay b/app/boards/shields/chalice/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/chalice/boards/nice_nano_v2.overlay +++ b/app/boards/shields/chalice/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/chalice/chalice.overlay b/app/boards/shields/chalice/chalice.overlay index 6778588bf13..85c9b1ed657 100644 --- a/app/boards/shields/chalice/chalice.overlay +++ b/app/boards/shields/chalice/chalice.overlay @@ -44,7 +44,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/clog/clog.dtsi b/app/boards/shields/clog/clog.dtsi index 40e9a39fd02..bcc08c71bea 100644 --- a/app/boards/shields/clog/clog.dtsi +++ b/app/boards/shields/clog/clog.dtsi @@ -26,7 +26,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; input-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> diff --git a/app/boards/shields/clueboard_california/clueboard_california.overlay b/app/boards/shields/clueboard_california/clueboard_california.overlay index dfa5d9cf926..8cea791e2c0 100644 --- a/app/boards/shields/clueboard_california/clueboard_california.overlay +++ b/app/boards/shields/clueboard_california/clueboard_california.overlay @@ -12,8 +12,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; - input-gpios = <&gpioa 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&gpioa 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> diff --git a/app/boards/shields/contra/contra.overlay b/app/boards/shields/contra/contra.overlay index 21e19425b29..0ac042d6357 100644 --- a/app/boards/shields/contra/contra.overlay +++ b/app/boards/shields/contra/contra.overlay @@ -11,7 +11,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/corne/boards/nice_nano.overlay b/app/boards/shields/corne/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/corne/boards/nice_nano.overlay +++ b/app/boards/shields/corne/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/corne/boards/nice_nano_v2.overlay b/app/boards/shields/corne/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/corne/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi index 0e9eddf967f..5058f67a617 100644 --- a/app/boards/shields/corne/corne.dtsi +++ b/app/boards/shields/corne/corne.dtsi @@ -47,7 +47,6 @@ 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 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -68,7 +67,6 @@ 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 oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/cradio/cradio.dtsi b/app/boards/shields/cradio/cradio.dtsi index 57dcfd4b271..3f7ed01cc2c 100644 --- a/app/boards/shields/cradio/cradio.dtsi +++ b/app/boards/shields/cradio/cradio.dtsi @@ -27,7 +27,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; input-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> diff --git a/app/boards/shields/crbn/crbn.overlay b/app/boards/shields/crbn/crbn.overlay index 817a83d078b..5cc9ec6c1d5 100644 --- a/app/boards/shields/crbn/crbn.overlay +++ b/app/boards/shields/crbn/crbn.overlay @@ -13,7 +13,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios @@ -41,7 +40,6 @@ encoder: encoder { compatible = "alps,ec11"; - label = "ENCODER"; a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <2>; diff --git a/app/boards/shields/eek/eek.overlay b/app/boards/shields/eek/eek.overlay index f53c6b5bb87..8ec6714e033 100644 --- a/app/boards/shields/eek/eek.overlay +++ b/app/boards/shields/eek/eek.overlay @@ -26,7 +26,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/elephant42/boards/nice_nano.overlay b/app/boards/shields/elephant42/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/elephant42/boards/nice_nano.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/elephant42/boards/nice_nano_v2.overlay +++ b/app/boards/shields/elephant42/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/elephant42/elephant42.dtsi b/app/boards/shields/elephant42/elephant42.dtsi index b0e9a32ebc4..d364bef9a09 100644 --- a/app/boards/shields/elephant42/elephant42.dtsi +++ b/app/boards/shields/elephant42/elephant42.dtsi @@ -26,7 +26,6 @@ RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -45,7 +44,6 @@ RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/ergodash/ergodash.dtsi b/app/boards/shields/ergodash/ergodash.dtsi index d109fa66ec9..7b9ac0125c2 100644 --- a/app/boards/shields/ergodash/ergodash.dtsi +++ b/app/boards/shields/ergodash/ergodash.dtsi @@ -35,7 +35,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,12 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/eternal_keypad/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/eternal_keypad/eternal_keypad.dtsi b/app/boards/shields/eternal_keypad/eternal_keypad.dtsi index 6319d9e03a2..14e877e54f5 100644 --- a/app/boards/shields/eternal_keypad/eternal_keypad.dtsi +++ b/app/boards/shields/eternal_keypad/eternal_keypad.dtsi @@ -14,7 +14,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/fourier/fourier.dtsi b/app/boards/shields/fourier/fourier.dtsi index 0902d6878ef..fdd54901d82 100644 --- a/app/boards/shields/fourier/fourier.dtsi +++ b/app/boards/shields/fourier/fourier.dtsi @@ -30,7 +30,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) /**/ RC(3,6) RC(3,9 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/helix/boards/nice_nano.overlay +++ b/app/boards/shields/helix/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/helix/boards/nice_nano_v2.overlay b/app/boards/shields/helix/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/helix/boards/nice_nano_v2.overlay +++ b/app/boards/shields/helix/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/helix/helix.dtsi b/app/boards/shields/helix/helix.dtsi index bbaec636080..2ee68e0fab7 100644 --- a/app/boards/shields/helix/helix.dtsi +++ b/app/boards/shields/helix/helix.dtsi @@ -32,7 +32,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/hummingbird/hummingbird.overlay b/app/boards/shields/hummingbird/hummingbird.overlay index 1b40acba7c4..661e9489836 100644 --- a/app/boards/shields/hummingbird/hummingbird.overlay +++ b/app/boards/shields/hummingbird/hummingbird.overlay @@ -29,7 +29,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "row2col"; col-gpios diff --git a/app/boards/shields/iris/iris.dtsi b/app/boards/shields/iris/iris.dtsi index a0caf1ad56e..8c5bb447d81 100644 --- a/app/boards/shields/iris/iris.dtsi +++ b/app/boards/shields/iris/iris.dtsi @@ -32,7 +32,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/jian/jian.dtsi b/app/boards/shields/jian/jian.dtsi index 8e772791689..1962ae1536a 100644 --- a/app/boards/shields/jian/jian.dtsi +++ b/app/boards/shields/jian/jian.dtsi @@ -62,7 +62,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/jiran/jiran.dtsi b/app/boards/shields/jiran/jiran.dtsi index b7e74c27c63..55ba2cb0776 100644 --- a/app/boards/shields/jiran/jiran.dtsi +++ b/app/boards/shields/jiran/jiran.dtsi @@ -67,7 +67,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/jorne/boards/nice_nano.overlay b/app/boards/shields/jorne/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/jorne/boards/nice_nano.overlay +++ b/app/boards/shields/jorne/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/jorne/boards/nice_nano_v2.overlay b/app/boards/shields/jorne/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/jorne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/jorne/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index 1d12b85c90f..e5300c86263 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -63,7 +63,6 @@ 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 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -84,7 +83,6 @@ 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 oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/knob_goblin/knob_goblin.overlay b/app/boards/shields/knob_goblin/knob_goblin.overlay index 03051ce5820..53372738773 100644 --- a/app/boards/shields/knob_goblin/knob_goblin.overlay +++ b/app/boards/shields/knob_goblin/knob_goblin.overlay @@ -14,7 +14,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -36,7 +35,6 @@ top_encoder: encoder_top { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -45,7 +43,6 @@ bottom_encoder: encoder_bottom { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -66,7 +63,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/kyria/boards/nice_nano.overlay b/app/boards/shields/kyria/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/kyria/boards/nice_nano.overlay +++ b/app/boards/shields/kyria/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/kyria/boards/nice_nano_v2.overlay b/app/boards/shields/kyria/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/kyria/boards/nice_nano_v2.overlay +++ b/app/boards/shields/kyria/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/kyria/boards/nrfmicro_11.overlay b/app/boards/shields/kyria/boards/nrfmicro_11.overlay index 8754dec63bf..dba8377ec2a 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay index 8754dec63bf..dba8377ec2a 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/kyria/boards/nrfmicro_13.overlay b/app/boards/shields/kyria/boards/nrfmicro_13.overlay index 8754dec63bf..dba8377ec2a 100644 --- a/app/boards/shields/kyria/boards/nrfmicro_13.overlay +++ b/app/boards/shields/kyria/boards/nrfmicro_13.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/kyria/kyria_common.dtsi b/app/boards/shields/kyria/kyria_common.dtsi index 1056794d584..f68b743e742 100644 --- a/app/boards/shields/kyria/kyria_common.dtsi +++ b/app/boards/shields/kyria/kyria_common.dtsi @@ -15,21 +15,18 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; }; left_encoder: encoder_left { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; steps = <80>; status = "disabled"; }; @@ -49,7 +46,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <64>; segment-offset = <0>; diff --git a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay index 5c451b73eaf..e95fac9dcdb 100644 --- a/app/boards/shields/leeloo/boards/nice_nano_v2.overlay +++ b/app/boards/shields/leeloo/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/leeloo/leeloo_common.dtsi b/app/boards/shields/leeloo/leeloo_common.dtsi index ef775cfbe61..7c4ab22d8c1 100644 --- a/app/boards/shields/leeloo/leeloo_common.dtsi +++ b/app/boards/shields/leeloo/leeloo_common.dtsi @@ -32,7 +32,6 @@ 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) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; @@ -47,7 +46,6 @@ 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) left_encoder: left_encoder { compatible = "alps,ec11"; - 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)>; steps = <120>; @@ -56,7 +54,6 @@ 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) right_encoder: right_encoder { compatible = "alps,ec11"; - 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)>; steps = <120>; @@ -77,7 +74,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay index be5dc54ec29..ba29cb2c06b 100644 --- a/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay +++ b/app/boards/shields/leeloo_micro/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi index ab68a6153f1..c07c5093cd2 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.dtsi +++ b/app/boards/shields/leeloo_micro/leeloo_micro.dtsi @@ -31,7 +31,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; @@ -45,7 +44,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) left_encoder: left_encoder { compatible = "alps,ec11"; - 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)>; status = "disabled"; @@ -54,7 +52,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) right_encoder: right_encoder { compatible = "alps,ec11"; - 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)>; status = "disabled"; @@ -75,7 +72,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/lily58/boards/nice_nano.overlay +++ b/app/boards/shields/lily58/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/lily58/boards/nice_nano_v2.overlay b/app/boards/shields/lily58/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/lily58/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index eb427a581ba..bd6d04e6d67 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -33,7 +33,6 @@ 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) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -48,7 +47,6 @@ 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) left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -67,7 +65,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/lotus58/lotus58.dtsi b/app/boards/shields/lotus58/lotus58.dtsi index 8b1c66f98df..c58e9404265 100644 --- a/app/boards/shields/lotus58/lotus58.dtsi +++ b/app/boards/shields/lotus58/lotus58.dtsi @@ -33,7 +33,6 @@ 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 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -47,7 +46,6 @@ 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 left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -56,7 +54,6 @@ 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 right_encoder: encoder_right { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -76,7 +73,6 @@ 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 oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/m60/m60.overlay b/app/boards/shields/m60/m60.overlay index a2ab259321b..7757abefe62 100644 --- a/app/boards/shields/m60/m60.overlay +++ b/app/boards/shields/m60/m60.overlay @@ -14,7 +14,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/microdox/boards/nice_nano.overlay b/app/boards/shields/microdox/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/microdox/boards/nice_nano.overlay +++ b/app/boards/shields/microdox/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/microdox/boards/nice_nano_v2.overlay b/app/boards/shields/microdox/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/microdox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/microdox/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/microdox/microdox.dtsi b/app/boards/shields/microdox/microdox.dtsi index 57247e68159..4869cfeabbd 100644 --- a/app/boards/shields/microdox/microdox.dtsi +++ b/app/boards/shields/microdox/microdox.dtsi @@ -9,7 +9,6 @@ / { kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> diff --git a/app/boards/shields/microdox/microdox_common.dtsi b/app/boards/shields/microdox/microdox_common.dtsi index 0460e012287..1a762aae6de 100644 --- a/app/boards/shields/microdox/microdox_common.dtsi +++ b/app/boards/shields/microdox/microdox_common.dtsi @@ -38,7 +38,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/microdox/microdox_v2.dtsi b/app/boards/shields/microdox/microdox_v2.dtsi index 93fa44459db..6eb7efa58f4 100644 --- a/app/boards/shields/microdox/microdox_v2.dtsi +++ b/app/boards/shields/microdox/microdox_v2.dtsi @@ -9,7 +9,6 @@ / { kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; }; }; diff --git a/app/boards/shields/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano.overlay index ac6c51d5c90..be8ff5290fb 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay index ac6c51d5c90..be8ff5290fb 100644 --- a/app/boards/shields/murphpad/boards/nice_nano_v2.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index f175c55e1c0..f098ec8b017 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -14,7 +14,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -36,7 +35,6 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -45,7 +43,6 @@ encoder_2: encoder_2 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -60,7 +57,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/naked60/naked60.overlay b/app/boards/shields/naked60/naked60.overlay index 2260a4afc9f..843c867f109 100644 --- a/app/boards/shields/naked60/naked60.overlay +++ b/app/boards/shields/naked60/naked60.overlay @@ -11,7 +11,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/nibble/boards/nice_nano.overlay b/app/boards/shields/nibble/boards/nice_nano.overlay index 45c552633ff..3849a8fb1a2 100644 --- a/app/boards/shields/nibble/boards/nice_nano.overlay +++ b/app/boards/shields/nibble/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/nibble/boards/nice_nano_v2.overlay b/app/boards/shields/nibble/boards/nice_nano_v2.overlay index 45c552633ff..3849a8fb1a2 100644 --- a/app/boards/shields/nibble/boards/nice_nano_v2.overlay +++ b/app/boards/shields/nibble/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index 43be6c766fc..8b5a90dac7b 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -15,7 +15,6 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -24,7 +23,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-demux"; - label = "KSCAN"; polling-interval-msec = <25>; input-gpios = <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> @@ -62,7 +60,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,6) RC(4,9) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/nice_view/nice_view.overlay b/app/boards/shields/nice_view/nice_view.overlay index 49ce0f23ad3..e1965569f56 100644 --- a/app/boards/shields/nice_view/nice_view.overlay +++ b/app/boards/shields/nice_view/nice_view.overlay @@ -8,7 +8,6 @@ status = "okay"; nice_view: ls0xx@0 { compatible = "sharp,ls0xx"; - label = "DISPLAY"; spi-max-frequency = <1000000>; reg = <0>; width = <160>; diff --git a/app/boards/shields/osprette/osprette.overlay b/app/boards/shields/osprette/osprette.overlay index 546df783760..e972e4daa42 100644 --- a/app/boards/shields/osprette/osprette.overlay +++ b/app/boards/shields/osprette/osprette.overlay @@ -26,7 +26,6 @@ RC(0,0) 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) kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "row2col"; col-gpios diff --git a/app/boards/shields/pancake/pancake.overlay b/app/boards/shields/pancake/pancake.overlay index 6fae463f424..0ceb2d5c6f7 100644 --- a/app/boards/shields/pancake/pancake.overlay +++ b/app/boards/shields/pancake/pancake.overlay @@ -11,7 +11,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 76ee5ba7673..814e5e1a0a1 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -27,7 +27,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/quefrency/quefrency_left.overlay b/app/boards/shields/quefrency/quefrency_left.overlay index a0f483efae9..cf7958410c6 100644 --- a/app/boards/shields/quefrency/quefrency_left.overlay +++ b/app/boards/shields/quefrency/quefrency_left.overlay @@ -12,7 +12,6 @@ */ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/quefrency/quefrency_right.overlay b/app/boards/shields/quefrency/quefrency_right.overlay index bf97d34b761..446a614a229 100644 --- a/app/boards/shields/quefrency/quefrency_right.overlay +++ b/app/boards/shields/quefrency/quefrency_right.overlay @@ -17,7 +17,6 @@ */ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/redox/boards/nice_nano.overlay b/app/boards/shields/redox/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/redox/boards/nice_nano.overlay +++ b/app/boards/shields/redox/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/redox/boards/nice_nano_v2.overlay b/app/boards/shields/redox/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/redox/boards/nice_nano_v2.overlay +++ b/app/boards/shields/redox/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/redox/redox.dtsi b/app/boards/shields/redox/redox.dtsi index d2d72d0ff1f..bf5ec9e843a 100644 --- a/app/boards/shields/redox/redox.dtsi +++ b/app/boards/shields/redox/redox.dtsi @@ -32,7 +32,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay index b8d21398448..d14b95db76b 100644 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay index 46d85996738..6b1eb16f0fb 100644 --- a/app/boards/shields/reviung34/reviung34.overlay +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -38,7 +38,6 @@ 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(3,7) kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/reviung41/boards/nice_nano.overlay b/app/boards/shields/reviung41/boards/nice_nano.overlay index 8590149e2bd..59180064278 100644 --- a/app/boards/shields/reviung41/boards/nice_nano.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay index 8590149e2bd..59180064278 100644 --- a/app/boards/shields/reviung41/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung41/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/reviung41/reviung41.overlay b/app/boards/shields/reviung41/reviung41.overlay index 55900cc9d47..0aecf61959d 100644 --- a/app/boards/shields/reviung41/reviung41.overlay +++ b/app/boards/shields/reviung41/reviung41.overlay @@ -27,7 +27,6 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3) kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/reviung5/reviung5.overlay b/app/boards/shields/reviung5/reviung5.overlay index 8b885245485..b21a634a1b7 100644 --- a/app/boards/shields/reviung5/reviung5.overlay +++ b/app/boards/shields/reviung5/reviung5.overlay @@ -22,7 +22,6 @@ kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios @@ -40,7 +39,6 @@ encoder: encoder { compatible = "alps,ec11"; - label = "encoder"; a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; diff --git a/app/boards/shields/reviung53/boards/nice_nano.overlay b/app/boards/shields/reviung53/boards/nice_nano.overlay index 4df91903c68..24905ac2e91 100644 --- a/app/boards/shields/reviung53/boards/nice_nano.overlay +++ b/app/boards/shields/reviung53/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay index 4df91903c68..24905ac2e91 100644 --- a/app/boards/shields/reviung53/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung53/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/reviung53/reviung53.overlay b/app/boards/shields/reviung53/reviung53.overlay index 213b3b81c72..8c11c061de2 100644 --- a/app/boards/shields/reviung53/reviung53.overlay +++ b/app/boards/shields/reviung53/reviung53.overlay @@ -28,7 +28,6 @@ RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index 480d3f84650..3d99e51bfe9 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -13,7 +13,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/romac_plus/boards/nice_nano.overlay b/app/boards/shields/romac_plus/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay +++ b/app/boards/shields/romac_plus/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 5324174b54f..12fd4387c90 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -27,7 +27,6 @@ RC(3,0) RC(3,1) RC(3,2) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -40,7 +39,6 @@ RC(3,0) RC(3,1) RC(3,2) left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; diff --git a/app/boards/shields/romac_plus/romac_plus.overlay b/app/boards/shields/romac_plus/romac_plus.overlay index 2308e284c7d..229b4a2cfe8 100644 --- a/app/boards/shields/romac_plus/romac_plus.overlay +++ b/app/boards/shields/romac_plus/romac_plus.overlay @@ -13,7 +13,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/settings_reset/settings_reset.overlay b/app/boards/shields/settings_reset/settings_reset.overlay index 48a5f223b65..1c3b7145b24 100644 --- a/app/boards/shields/settings_reset/settings_reset.overlay +++ b/app/boards/shields/settings_reset/settings_reset.overlay @@ -13,7 +13,6 @@ kscan0: kscan { compatible = "zmk,kscan-mock"; - label = "KSCAN"; columns = <1>; rows = <0>; diff --git a/app/boards/shields/snap/boards/nice_nano.overlay b/app/boards/shields/snap/boards/nice_nano.overlay index 1a51eb16736..924151c719f 100644 --- a/app/boards/shields/snap/boards/nice_nano.overlay +++ b/app/boards/shields/snap/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/snap/boards/nice_nano_v2.overlay b/app/boards/shields/snap/boards/nice_nano_v2.overlay index 1a51eb16736..924151c719f 100644 --- a/app/boards/shields/snap/boards/nice_nano_v2.overlay +++ b/app/boards/shields/snap/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/snap/snap.dtsi b/app/boards/shields/snap/snap.dtsi index 7523f35b06c..ef466723b9e 100644 --- a/app/boards/shields/snap/snap.dtsi +++ b/app/boards/shields/snap/snap.dtsi @@ -15,14 +15,12 @@ left_encoder: encoder_left { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; steps = <80>; status = "disabled"; }; right_encoder: encoder_right { compatible = "alps,ec11"; - label = "RIGHT_ENCODER"; steps = <80>; status = "disabled"; }; @@ -51,7 +49,6 @@ RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) kscan_composite: kscan { compatible = "zmk,kscan-composite"; - label = "KSCAN"; rows = <6>; columns = <17>; @@ -62,7 +59,6 @@ RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) kscan_demux: kscan_demux { compatible = "zmk,kscan-gpio-demux"; - label = "DEMUX"; polling-interval-msec = <25>; }; }; @@ -73,7 +69,6 @@ RC(5,7) RC(5,6) RC(5,5) RC(5,4) RC(5,2) RC(5,0) RC(5,15) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/snap/snap_right.overlay b/app/boards/shields/snap/snap_right.overlay index ad04ae24057..b303316a906 100644 --- a/app/boards/shields/snap/snap_right.overlay +++ b/app/boards/shields/snap/snap_right.overlay @@ -9,7 +9,6 @@ / { kscan_direct: kscan_direct { compatible = "zmk,kscan-gpio-direct"; - label = "DIRECT"; input-gpios = <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; diff --git a/app/boards/shields/sofle/boards/nice_nano.overlay b/app/boards/shields/sofle/boards/nice_nano.overlay index 336be4b0d96..f00f59f4397 100644 --- a/app/boards/shields/sofle/boards/nice_nano.overlay +++ b/app/boards/shields/sofle/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/sofle/boards/nice_nano_v2.overlay b/app/boards/shields/sofle/boards/nice_nano_v2.overlay index 336be4b0d96..f00f59f4397 100644 --- a/app/boards/shields/sofle/boards/nice_nano_v2.overlay +++ b/app/boards/shields/sofle/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/sofle/boards/nrfmicro_11.overlay b/app/boards/shields/sofle/boards/nrfmicro_11.overlay index 336be4b0d96..f00f59f4397 100644 --- a/app/boards/shields/sofle/boards/nrfmicro_11.overlay +++ b/app/boards/shields/sofle/boards/nrfmicro_11.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/sofle/boards/nrfmicro_13.overlay b/app/boards/shields/sofle/boards/nrfmicro_13.overlay index 336be4b0d96..f00f59f4397 100644 --- a/app/boards/shields/sofle/boards/nrfmicro_13.overlay +++ b/app/boards/shields/sofle/boards/nrfmicro_13.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 4917ca321ed..c9bf5c8eb37 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -33,7 +33,6 @@ 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) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -47,7 +46,6 @@ 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) left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -56,7 +54,6 @@ 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) right_encoder: encoder_right { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -76,7 +73,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_corne/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi index 3eefdc6aeed..7911f151814 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne.dtsi @@ -47,7 +47,6 @@ 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"; steps = <80>; status = "disabled"; @@ -57,7 +56,6 @@ 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"; steps = <80>; status = "disabled"; @@ -78,7 +76,6 @@ 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 oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay index 89563f42917..df930cd2547 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_left.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay index e05df223f5b..3823cdfb76e 100644 --- a/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay +++ b/app/boards/shields/splitkb_aurora_corne/splitkb_aurora_corne_right.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay index 8f1629ced14..8228d530c82 100644 --- a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay index 8f1629ced14..8228d530c82 100644 --- a/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_helix/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi index e580e87daba..29b6dddea36 100644 --- a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix.dtsi @@ -33,7 +33,6 @@ left_encoder: left_encoder { compatible = "alps,ec11"; - label = "L_ENCODER"; steps = <144>; status = "disabled"; @@ -43,7 +42,6 @@ right_encoder: right_encoder { compatible = "alps,ec11"; - label = "R_ENCODER"; steps = <144>; status = "disabled"; @@ -64,7 +62,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay index c9830658b00..59d825530ef 100644 --- a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_left.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay index 48572de902d..95cea9ecc3c 100644 --- a/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay +++ b/app/boards/shields/splitkb_aurora_helix/splitkb_aurora_helix_right.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay index 0eafa704333..fa6ac6dc34b 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano.overlay @@ -26,7 +26,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay index 6601d27d4d8..0845226602b 100644 --- a/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi index 06b3ef3955c..fb993dbb633 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58.dtsi @@ -33,7 +33,6 @@ 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"; steps = <80>; status = "disabled"; @@ -43,7 +42,6 @@ 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"; steps = <80>; status = "disabled"; @@ -64,7 +62,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay index c4f12ddaf98..fc38bbcbc76 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_left.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "row2col"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay index 09da298cd7d..c9a96491ee9 100644 --- a/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay +++ b/app/boards/shields/splitkb_aurora_lily58/splitkb_aurora_lily58_right.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "row2col"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay index 8f1629ced14..8228d530c82 100644 --- a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay index 8f1629ced14..8228d530c82 100644 --- a/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi index 798cd84e5f3..c064456a235 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi @@ -33,7 +33,6 @@ 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) left_encoder: left_encoder { compatible = "alps,ec11"; - label = "L_ENCODER"; steps = <144>; status = "disabled"; @@ -43,7 +42,6 @@ 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) right_encoder: right_encoder { compatible = "alps,ec11"; - label = "R_ENCODER"; steps = <144>; status = "disabled"; @@ -64,7 +62,6 @@ 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) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay index 1adaf401563..024c9e75b29 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay index 3249b94193c..58df0026f06 100644 --- a/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay +++ b/app/boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "col2row"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay index 810340f9af4..424a617b237 100644 --- a/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi index c5483af5476..404782c74c4 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep.dtsi @@ -27,28 +27,24 @@ left_encoder1: left_encoder1 { compatible = "alps,ec11"; - label = "L_ENCODER1"; steps = <80>; status = "disabled"; }; left_encoder2: left_encoder2 { compatible = "alps,ec11"; - label = "L_ENCODER2"; steps = <80>; status = "disabled"; }; right_encoder1: right_encoder1 { compatible = "alps,ec11"; - label = "R_ENCODER1"; steps = <80>; status = "disabled"; }; right_encoder2: right_encoder2 { compatible = "alps,ec11"; - label = "R_ENCODER2"; steps = <80>; status = "disabled"; }; @@ -66,7 +62,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay index f62d24fa4ae..4a1bec902af 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_left.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "row2col"; row-gpios diff --git a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay index ff1d16d329e..c3655477617 100644 --- a/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay +++ b/app/boards/shields/splitkb_aurora_sweep/splitkb_aurora_sweep_right.overlay @@ -13,8 +13,6 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - - label = "KSCAN"; diode-direction = "row2col"; row-gpios diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index abc3b7f7d27..4a1a58a5ba2 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -34,7 +34,6 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "row2col"; row-gpios diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano.overlay index 85ab6fbc260..84441899991 100644 --- a/app/boards/shields/tg4x/boards/nice_nano.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay index 85ab6fbc260..84441899991 100644 --- a/app/boards/shields/tg4x/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tg4x/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/tg4x/tg4x.overlay b/app/boards/shields/tg4x/tg4x.overlay index c0b1b3bc807..e53275c644b 100644 --- a/app/boards/shields/tg4x/tg4x.overlay +++ b/app/boards/shields/tg4x/tg4x.overlay @@ -9,7 +9,6 @@ / { kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; diff --git a/app/boards/shields/tidbit/boards/nice_nano.overlay b/app/boards/shields/tidbit/boards/nice_nano.overlay index 75514ac47db..b0895433933 100644 --- a/app/boards/shields/tidbit/boards/nice_nano.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay index 75514ac47db..b0895433933 100644 --- a/app/boards/shields/tidbit/boards/nice_nano_v2.overlay +++ b/app/boards/shields/tidbit/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index c7af200137d..110c3fc8734 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -9,7 +9,6 @@ / { kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "row2col"; @@ -46,7 +45,6 @@ encoder_1_top_row: encoder_1_top_row { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -55,7 +53,6 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -64,7 +61,6 @@ encoder_2: encoder_2 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -73,7 +69,6 @@ encoder_3: encoder_3 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -82,7 +77,6 @@ encoder_4: encoder_4 { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -102,7 +96,6 @@ oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <32>; segment-offset = <0>; diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay index 75514ac47db..b0895433933 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay index 75514ac47db..b0895433933 100644 --- a/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay +++ b/app/boards/shields/two_percent_milk/boards/nice_nano_v2.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay index d20e58e7d89..26079169c83 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay index 3167898038c..e1218ffd1f2 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_11_flipped.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay index d20e58e7d89..26079169c83 100644 --- a/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay +++ b/app/boards/shields/two_percent_milk/boards/nrfmicro_13.overlay @@ -25,7 +25,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ diff --git a/app/boards/shields/two_percent_milk/two_percent_milk.overlay b/app/boards/shields/two_percent_milk/two_percent_milk.overlay index 8d4a244a424..474150ef2fa 100644 --- a/app/boards/shields/two_percent_milk/two_percent_milk.overlay +++ b/app/boards/shields/two_percent_milk/two_percent_milk.overlay @@ -12,8 +12,6 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; - label = "KSCAN"; - input-gpios = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> diff --git a/app/boards/shields/waterfowl/waterfowl.dtsi b/app/boards/shields/waterfowl/waterfowl.dtsi index 3d9140941b4..bbe60acd5b7 100644 --- a/app/boards/shields/waterfowl/waterfowl.dtsi +++ b/app/boards/shields/waterfowl/waterfowl.dtsi @@ -31,7 +31,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -44,7 +43,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) roller_left_encoder: encoder_left_roller { compatible = "alps,ec11"; - label = "ROLLER_LEFT_ENCODER"; a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -53,7 +51,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) dial_left_encoder: encoder_left_dial { compatible = "alps,ec11"; - label = "DIAL_LEFT_ENCODER"; a-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -62,7 +59,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) roller_right_encoder: encoder_right_roller { compatible = "alps,ec11"; - label = "ROLLER_RIGHT_ENCODER"; a-gpios = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -71,7 +67,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) dial_right_encoder: encoder_right_dial { compatible = "alps,ec11"; - label = "DIAL_RIGHT_ENCODER"; a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; steps = <80>; @@ -98,7 +93,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <64>; segment-offset = <0>; diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index b21b83aeeb9..6d487adbad9 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -61,10 +61,8 @@ nice_view_spi: &arduino_spi { backlight: gpioleds { compatible = "gpio-leds"; - label = "Backlight LEDs"; gpio_led_0 { gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; }; }; @@ -97,8 +95,6 @@ nice_view_spi: &arduino_spi { rows = <1>; columns = <7>; - label = "KSCAN_MATRIX_COMP"; - matrix { kscan = <&kscan_matrix>; }; @@ -112,8 +108,6 @@ nice_view_spi: &arduino_spi { kscan_direct_comp: kscan_direct_comp { compatible = "zmk,kscan-composite"; - - label = "KSCAN_DIRECT_COMP"; status = "disabled"; matrix { @@ -169,7 +163,6 @@ nice_view_spi: &arduino_spi { }; encoder: encoder { - label = "ENCODER"; steps = <80>; compatible = "alps,ec11"; a-gpios = <&arduino_header 15 GPIO_PULL_UP>; diff --git a/app/boards/shields/zodiark/zodiark.dtsi b/app/boards/shields/zodiark/zodiark.dtsi index 66ebb7b47f9..6e91778e7ad 100644 --- a/app/boards/shields/zodiark/zodiark.dtsi +++ b/app/boards/shields/zodiark/zodiark.dtsi @@ -33,7 +33,6 @@ 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 kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -47,7 +46,6 @@ 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 left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -56,7 +54,6 @@ 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 right_encoder: encoder_right { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -76,7 +73,6 @@ 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 oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "DISPLAY"; width = <128>; height = <64>; segment-offset = <0>; diff --git a/app/boards/usb_console.dtsi b/app/boards/usb_console.dtsi index 3cc76ad313b..adf3bd19bf1 100644 --- a/app/boards/usb_console.dtsi +++ b/app/boards/usb_console.dtsi @@ -14,7 +14,6 @@ &usbd { cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; diff --git a/app/tests/backlight/behavior_keymap.dtsi b/app/tests/backlight/behavior_keymap.dtsi index 771072ac4ec..4433f28ce06 100644 --- a/app/tests/backlight/behavior_keymap.dtsi +++ b/app/tests/backlight/behavior_keymap.dtsi @@ -12,17 +12,14 @@ compatible = "gpio-leds"; led_0 { gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; }; led_1 { gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 1"; }; }; keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/backlight/cycle/native_posix_64.keymap b/app/tests/backlight/cycle/native_posix_64.keymap index 00615e3546d..dcc23aa5f6d 100644 --- a/app/tests/backlight/cycle/native_posix_64.keymap +++ b/app/tests/backlight/cycle/native_posix_64.keymap @@ -12,17 +12,14 @@ compatible = "gpio-leds"; led_0 { gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 0"; }; led_1 { gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; - label = "Backlight LED 1"; }; }; keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/caps-word/behavior_keymap.dtsi b/app/tests/caps-word/behavior_keymap.dtsi index 855406fc72f..2e404afbfe3 100644 --- a/app/tests/caps-word/behavior_keymap.dtsi +++ b/app/tests/caps-word/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap b/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap index bbbdac10c9b..fe5360e6989 100644 --- a/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap +++ b/app/tests/caps-word/continue-with-modifiers/native_posix_64.keymap @@ -6,7 +6,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap index 3438f9bc77d..6f9f9860f27 100644 --- a/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-0/native_posix_64.keymap @@ -24,7 +24,6 @@ first so the decision to hold or tap can be made. keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap index 9120e8c3b4a..0982d34befa 100644 --- a/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-1/native_posix_64.keymap @@ -19,7 +19,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap index a227fe4c91f..6feebf2f76f 100644 --- a/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-2/native_posix_64.keymap @@ -26,7 +26,6 @@ keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap index 4fbf24071e6..fbbd7a9e501 100644 --- a/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-3/native_posix_64.keymap @@ -18,7 +18,6 @@ keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap index 59f4391f288..b3e987cf277 100644 --- a/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap +++ b/app/tests/combo/combos-and-holdtaps-4/native_posix_64.keymap @@ -22,7 +22,6 @@ ZMK_COMBO(tilde, &kp TILDE, 3 4, 50) / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/layer-filter-0/native_posix_64.keymap b/app/tests/combo/layer-filter-0/native_posix_64.keymap index 68077849a34..12946183249 100644 --- a/app/tests/combo/layer-filter-0/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-0/native_posix_64.keymap @@ -31,7 +31,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/layer-filter-1/native_posix_64.keymap b/app/tests/combo/layer-filter-1/native_posix_64.keymap index a11b86ad4d9..6d4a3021278 100644 --- a/app/tests/combo/layer-filter-1/native_posix_64.keymap +++ b/app/tests/combo/layer-filter-1/native_posix_64.keymap @@ -18,7 +18,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/multiple-timeouts/native_posix_64.keymap b/app/tests/combo/multiple-timeouts/native_posix_64.keymap index a2edc32fcc3..0e3ae996a19 100644 --- a/app/tests/combo/multiple-timeouts/native_posix_64.keymap +++ b/app/tests/combo/multiple-timeouts/native_posix_64.keymap @@ -19,7 +19,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap index e89a3f22d33..a9a229fb3a2 100644 --- a/app/tests/combo/overlapping-combos-0/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-0/native_posix_64.keymap @@ -37,7 +37,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap index 4b0166bee15..f3b0ab975b1 100644 --- a/app/tests/combo/overlapping-combos-1/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-1/native_posix_64.keymap @@ -26,7 +26,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap index 5c38bcfc403..beed222e890 100644 --- a/app/tests/combo/overlapping-combos-2/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-2/native_posix_64.keymap @@ -27,7 +27,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap index 48e3397f4a6..2e7e4225bb2 100644 --- a/app/tests/combo/overlapping-combos-3/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-3/native_posix_64.keymap @@ -28,7 +28,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap b/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap index 8967207987b..06a67b88134 100644 --- a/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap +++ b/app/tests/combo/overlapping-combos-4-different-timeouts/native_posix_64.keymap @@ -32,7 +32,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap index 55e8f1e77b6..d3151382ece 100644 --- a/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap +++ b/app/tests/combo/partially-overlapping-combos/native_posix_64.keymap @@ -26,7 +26,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap index da2e9483ff7..85cb6475cae 100644 --- a/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-complete/native_posix_64.keymap @@ -14,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap index b1494cecf20..49b92968602 100644 --- a/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-incomplete/native_posix_64.keymap @@ -14,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap index 8769286413b..61787322cf5 100644 --- a/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap +++ b/app/tests/combo/press-release-long-combo-wrong-last-key/native_posix_64.keymap @@ -14,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press-release/native_posix_64.keymap b/app/tests/combo/press-release/native_posix_64.keymap index 26cd241b0bb..783dcf00437 100644 --- a/app/tests/combo/press-release/native_posix_64.keymap +++ b/app/tests/combo/press-release/native_posix_64.keymap @@ -14,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press-timeout/native_posix_64.keymap b/app/tests/combo/press-timeout/native_posix_64.keymap index a71de45a7d2..c9cd2331e34 100644 --- a/app/tests/combo/press-timeout/native_posix_64.keymap +++ b/app/tests/combo/press-timeout/native_posix_64.keymap @@ -14,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap index 2e0a67a3e7f..55d93823dfe 100644 --- a/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release1-release2/native_posix_64.keymap @@ -20,7 +20,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap index 8d4838eb511..ace63a16a80 100644 --- a/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap +++ b/app/tests/combo/press1-press2-release2-release1/native_posix_64.keymap @@ -20,7 +20,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap index 9c75e5705b1..8b59792b047 100644 --- a/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap +++ b/app/tests/combo/press1-release1-press2-release2/native_posix_64.keymap @@ -20,7 +20,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/require-prior-idle/native_posix_64.keymap b/app/tests/combo/require-prior-idle/native_posix_64.keymap index fcd94056c4d..72801f74950 100644 --- a/app/tests/combo/require-prior-idle/native_posix_64.keymap +++ b/app/tests/combo/require-prior-idle/native_posix_64.keymap @@ -21,7 +21,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap index 46b35be02ee..cfea0cd60e4 100644 --- a/app/tests/combo/slowrelease-disabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-disabled/native_posix_64.keymap @@ -15,7 +15,6 @@ keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap index d64876da557..e57bae60c88 100644 --- a/app/tests/combo/slowrelease-enabled/native_posix_64.keymap +++ b/app/tests/combo/slowrelease-enabled/native_posix_64.keymap @@ -15,7 +15,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/gresc/gresc-press-release/native_posix_64.keymap b/app/tests/gresc/gresc-press-release/native_posix_64.keymap index c472dd6d4ad..5280543d9e3 100644 --- a/app/tests/gresc/gresc-press-release/native_posix_64.keymap +++ b/app/tests/gresc/gresc-press-release/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap index 14adcf45c8e..5cb0695c7bc 100644 --- a/app/tests/gresc/gresc-two-instances/native_posix_64.keymap +++ b/app/tests/gresc/gresc-two-instances/native_posix_64.keymap @@ -13,7 +13,6 @@ The first gresc that is released releases the key. / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap index 51995f8d905..f9bda1cfd99 100644 --- a/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/6-retro-tap/native_posix_64.keymap @@ -6,7 +6,6 @@ behaviors { ht_bal: behavior_balanced { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "balanced"; tapping_term_ms = <300>; @@ -17,7 +16,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi index c750f8e30c8..9acf5a1b58d 100644 --- a/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/7-positional/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht_bal: behavior_hold_tap_balanced { compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; #binding-cells = <2>; flavor = "balanced"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi index 670bdcc2650..0bcb27c5d9f 100644 --- a/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/8-require-prior-idle/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht_bal: behavior_balanced { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "balanced"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/balanced/behavior_keymap.dtsi b/app/tests/hold-tap/balanced/behavior_keymap.dtsi index 9f338ebc99b..350dfaf3266 100644 --- a/app/tests/hold-tap/balanced/behavior_keymap.dtsi +++ b/app/tests/hold-tap/balanced/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht_bal: behavior_hold_tap_balanced { compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; #binding-cells = <2>; flavor = "balanced"; tapping-term-ms = <300>; @@ -17,7 +16,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap index 4bac8b8334d..cfbb128fadf 100644 --- a/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap +++ b/app/tests/hold-tap/balanced/many-nested/native_posix_64.keymap @@ -6,7 +6,6 @@ behaviors { ht_bal: behavior_hold_tap_balanced { compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP_BALANCED"; #binding-cells = <2>; flavor = "balanced"; tapping-term-ms = <300>; @@ -16,7 +15,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap index 8dbc7d82c6b..8aa29dec443 100644 --- a/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap +++ b/app/tests/hold-tap/hold-preferred/6-retro-tap/native_posix_64.keymap @@ -6,7 +6,6 @@ behaviors { hp: behavior_hold_preferred { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "hold-preferred"; tapping_term_ms = <300>; @@ -17,7 +16,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi index 71f3aba5773..65e7f9aa217 100644 --- a/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/7-positional/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht_hold: behavior_hold_hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "hold_hold_tap"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi index a99eb3f56f8..bdc6838ae87 100644 --- a/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/8-require-prior-idle/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { hp: behavior_hold_preferred { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi b/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi index da6b8362da1..702a96b4ef3 100644 --- a/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi +++ b/app/tests/hold-tap/hold-preferred/behavior_keymap.dtsi @@ -8,7 +8,6 @@ behaviors { ht_hold: behavior_hold_hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "hold_hold_tap"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <300>; @@ -19,7 +18,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap index 500d2670b96..85c9a9590b7 100644 --- a/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap +++ b/app/tests/hold-tap/tap-preferred/6-nested-timeouts/native_posix_64.keymap @@ -12,7 +12,6 @@ behaviors { tp_short: short_tap { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP_SHORT"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <100>; @@ -21,7 +20,6 @@ }; tp_long: long_tap { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP_LONG"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; @@ -32,7 +30,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi index 79a88eb2c51..3e891f2c2cc 100644 --- a/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/7-positional/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { tp: behavior_tap_preferred { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi index c66dc934092..23ecd2df53e 100644 --- a/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/8-require-prior-idle/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { tp: behavior_tap_preferred { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi b/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi index df307740199..fbe6c95da9a 100644 --- a/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-preferred/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { tp: behavior_tap_preferred { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <300>; @@ -17,7 +16,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi index 7aa3940833f..6a78d588248 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-unless-interrupted/6-require-prior-idle/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht_tui: behavior_hold_tap_tap_unless_interrupted { compatible = "zmk,behavior-hold-tap"; - label = "hold_tap_tap_unless_interrupted"; #binding-cells = <2>; flavor = "tap-unless-interrupted"; tapping-term-ms = <300>; @@ -18,7 +17,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi b/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi index b24de6dd257..7616c46287f 100644 --- a/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi +++ b/app/tests/hold-tap/tap-unless-interrupted/behavior_keymap.dtsi @@ -8,7 +8,6 @@ behaviors { ht_tui: behavior_hold_tap_tap_unless_interrupted { compatible = "zmk,behavior-hold-tap"; - label = "hold_tap_tap_unless_interrupted"; #binding-cells = <2>; flavor = "tap-unless-interrupted"; tapping-term-ms = <300>; @@ -19,7 +18,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/key-repeat/behavior_keymap.dtsi b/app/tests/key-repeat/behavior_keymap.dtsi index c8e2d9c427b..a0e5c8f9849 100644 --- a/app/tests/key-repeat/behavior_keymap.dtsi +++ b/app/tests/key-repeat/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/keypress/behavior_keymap.dtsi b/app/tests/keypress/behavior_keymap.dtsi index 52f9421c2fb..5f7cfd2dfeb 100644 --- a/app/tests/keypress/behavior_keymap.dtsi +++ b/app/tests/keypress/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/keytoggle/behavior_keymap.dtsi b/app/tests/keytoggle/behavior_keymap.dtsi index 45d48164b0c..a8e751364e3 100644 --- a/app/tests/keytoggle/behavior_keymap.dtsi +++ b/app/tests/keytoggle/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap index 4f70b591105..78b4e455476 100644 --- a/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-alt-tab/native_posix_64.keymap @@ -36,7 +36,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap index b07f297f795..0621b33ad63 100644 --- a/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap +++ b/app/tests/keytoggle/kt-modded-alpha/native_posix_64.keymap @@ -26,7 +26,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/macros/behavior_keymap.dtsi b/app/tests/macros/behavior_keymap.dtsi index 90322e42818..25414216af2 100644 --- a/app/tests/macros/behavior_keymap.dtsi +++ b/app/tests/macros/behavior_keymap.dtsi @@ -49,7 +49,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap index bdf89abfdc9..d9d186ce2fc 100644 --- a/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-from-hold-tap/native_posix_64.keymap @@ -24,7 +24,6 @@ behaviors { mth: macro_tap_hold { compatible = "zmk,behavior-hold-tap"; - label = "MACRO_TAP_HOLD"; #binding-cells = <2>; flavor = "tap-unless-interrupted"; tapping-term-ms = <200>; @@ -34,7 +33,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap index 4cc60bf5b00..bb06d2c3754 100644 --- a/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap +++ b/app/tests/macros/mo-plus-modifier-macro/native_posix_64.keymap @@ -23,7 +23,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/macros/place-holder-parameters/native_posix_64.keymap b/app/tests/macros/place-holder-parameters/native_posix_64.keymap index 59d78b5e8fb..c6fcd5c6b86 100644 --- a/app/tests/macros/place-holder-parameters/native_posix_64.keymap +++ b/app/tests/macros/place-holder-parameters/native_posix_64.keymap @@ -12,7 +12,6 @@ macros { slash_macro: slash_macro { #binding-cells = <2>; - label = "ZM_SLASH"; compatible = "zmk,behavior-macro-two-param"; wait-ms = <40>; tap-ms = <40>; @@ -24,7 +23,6 @@ to_second_macro: to_second_macro { #binding-cells = <2>; - label = "ZMK_TO_SECOND"; compatible = "zmk,behavior-macro-two-param"; wait-ms = <40>; tap-ms = <40>; @@ -35,7 +33,6 @@ quote_letter_macro: quote_letter_macro { #binding-cells = <1>; - label = "ZMK_QLET"; compatible = "zmk,behavior-macro-one-param"; wait-ms = <40>; tap-ms = <40>; @@ -48,7 +45,6 @@ keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap index 66fb1ed0f58..8f7b2cdb02a 100644 --- a/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap +++ b/app/tests/mod-morph/2b-masked-morph-implicit-overwrite/native_posix_64.keymap @@ -6,7 +6,6 @@ behaviors { mod_morph: mod_morph { compatible = "zmk,behavior-mod-morph"; - label = "MOD_MORPH_TEST"; #binding-cells = <0>; bindings = <&kp A>, <&kp LS(B)>; // implict mod overwrite mods = <(MOD_LSFT|MOD_RSFT)>; @@ -15,7 +14,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap index 9b7f4fe1826..4f9f491086a 100644 --- a/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap +++ b/app/tests/mod-morph/2d-masked-morph-into-hold-tap-tap/native_posix_64.keymap @@ -16,7 +16,6 @@ behaviors { mod_morph: mod_morph { compatible = "zmk,behavior-mod-morph"; - label = "MOD_MORPH_TEST"; #binding-cells = <0>; bindings = <&kp A>, << 1 B>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -26,7 +25,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap index e0c1d1e57b3..77067f341bc 100644 --- a/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap +++ b/app/tests/mod-morph/2e-masked-morph-into-hold-tap-hold/native_posix_64.keymap @@ -18,7 +18,6 @@ behaviors { mod_morph: mod_morph { compatible = "zmk,behavior-mod-morph"; - label = "MOD_MORPH_TEST"; #binding-cells = <0>; bindings = <&kp A>, << 1 B>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -28,7 +27,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap b/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap index a20c04d5dfc..d2ad5670c03 100644 --- a/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap +++ b/app/tests/mod-morph/3-unmasked-morph/native_posix_64.keymap @@ -6,7 +6,6 @@ behaviors { mod_morph: mod_morph { compatible = "zmk,behavior-mod-morph"; - label = "MOD_MORPH_TEST"; #binding-cells = <0>; bindings = <&kp A>, <&kp B>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -16,7 +15,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/mod-morph/behavior_keymap.dtsi b/app/tests/mod-morph/behavior_keymap.dtsi index 2f880540564..86150307762 100644 --- a/app/tests/mod-morph/behavior_keymap.dtsi +++ b/app/tests/mod-morph/behavior_keymap.dtsi @@ -2,7 +2,6 @@ behaviors { mod_morph: mod_morph { compatible = "zmk,behavior-mod-morph"; - label = "MOD_MORPH_TEST"; #binding-cells = <0>; bindings = <&kp A>, <&kp B>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -11,7 +10,6 @@ keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap index 72b218f510f..8060f18f611 100644 --- a/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-hyper-dn-a-dn-a-up-hyper-up/native_posix_64.keymap @@ -16,7 +16,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap index d68f89213d9..503c3519960 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-dn-lctl-up-lctl-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap index c2d12eb2104..362754c8353 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lctl-up/native_posix_64.keymap @@ -13,7 +13,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap index 7be62b9455d..f25996f6670 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lctl-up-lsft-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap index 8d1d773efbd..15cdc5c9d9e 100644 --- a/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/explicit/kp-lctl-dn-lsft-dn-lsft-up-lctl-up/native_posix_64.keymap @@ -16,7 +16,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap index 87101d837e0..17d949e7308 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod1-up-mod2-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap index 6b40fef158a..fa34be426b3 100644 --- a/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-mod1-dn-mod2-dn-mod2-up-mod1-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap index 3926eb57a29..214cff49642 100644 --- a/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap +++ b/app/tests/modifiers/implicit/kp-rolling-symbols-same-key/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap index 4b2ca139da9..01387e54f11 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-lctl-up-mod-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap index a256476252d..113fc488ee1 100644 --- a/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap +++ b/app/tests/modifiers/mixed/kp-lctl-dn-mod-dn-mod-up-lctl-up/native_posix_64.keymap @@ -15,7 +15,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/1-normal/native_posix_64.keymap b/app/tests/momentary-layer/1-normal/native_posix_64.keymap index 387a1322ff1..88c70da98b4 100644 --- a/app/tests/momentary-layer/1-normal/native_posix_64.keymap +++ b/app/tests/momentary-layer/1-normal/native_posix_64.keymap @@ -6,7 +6,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap index 776fc761be5..48da33e60e7 100644 --- a/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap +++ b/app/tests/momentary-layer/2-early-key-release/native_posix_64.keymap @@ -6,7 +6,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/3-covered/native_posix_64.keymap b/app/tests/momentary-layer/3-covered/native_posix_64.keymap index a7939d9e95e..42548533d1b 100644 --- a/app/tests/momentary-layer/3-covered/native_posix_64.keymap +++ b/app/tests/momentary-layer/3-covered/native_posix_64.keymap @@ -9,7 +9,6 @@ and the original key is "covered". / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/4-nested/native_posix_64.keymap b/app/tests/momentary-layer/4-nested/native_posix_64.keymap index 1f4f0aea219..12fb6cdc7c7 100644 --- a/app/tests/momentary-layer/4-nested/native_posix_64.keymap +++ b/app/tests/momentary-layer/4-nested/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap b/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap index 4c8f789089d..f1f0afcbc40 100644 --- a/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap +++ b/app/tests/momentary-layer/5-nested-early-key-release/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/momentary-layer/behavior_keymap.dtsi b/app/tests/momentary-layer/behavior_keymap.dtsi index 63127a393d1..8d63bc13502 100644 --- a/app/tests/momentary-layer/behavior_keymap.dtsi +++ b/app/tests/momentary-layer/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/mouse-keys/mkp/native_posix.keymap b/app/tests/mouse-keys/mkp/native_posix.keymap index 04316eb34bb..8e3071d4317 100644 --- a/app/tests/mouse-keys/mkp/native_posix.keymap +++ b/app/tests/mouse-keys/mkp/native_posix.keymap @@ -6,7 +6,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/mouse-keys/mkp/native_posix_64.keymap b/app/tests/mouse-keys/mkp/native_posix_64.keymap index 04316eb34bb..8e3071d4317 100644 --- a/app/tests/mouse-keys/mkp/native_posix_64.keymap +++ b/app/tests/mouse-keys/mkp/native_posix_64.keymap @@ -6,7 +6,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/none/behavior_keymap.dtsi b/app/tests/none/behavior_keymap.dtsi index 7a4c099bfb1..162ca992fdf 100644 --- a/app/tests/none/behavior_keymap.dtsi +++ b/app/tests/none/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap index bc541824a82..560c8424e1a 100644 --- a/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-callum-mods-quick-release/native_posix_64.keymap @@ -9,7 +9,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap index 9121b1880ec..28f2db3d140 100644 --- a/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-callum-mods/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap index bafdbe38d39..42bb9cfd23f 100644 --- a/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap +++ b/app/tests/sticky-keys/10-sl-sl-kp/native_posix_64.keymap @@ -10,7 +10,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap index 38c8fb4c91c..93239797c71 100644 --- a/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap +++ b/app/tests/sticky-keys/2-sl-dn-up-kcdn-kcup/native_posix_64.keymap @@ -10,7 +10,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap index 4da4ad98a19..69db16352af 100644 --- a/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap +++ b/app/tests/sticky-keys/8-lsk-osk-combination-quick-release/native_posix_64.keymap @@ -9,7 +9,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap index d9c49014b3f..9523a75e98d 100644 --- a/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap +++ b/app/tests/sticky-keys/8-lsk-osk-combination/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap index 74678256aff..67efb6afe5c 100644 --- a/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap +++ b/app/tests/sticky-keys/9-sk-dn-up-dn-up/native_posix_64.keymap @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/sticky-keys/behavior_keymap.dtsi b/app/tests/sticky-keys/behavior_keymap.dtsi index 9322cb141be..182ef58e1a8 100644 --- a/app/tests/sticky-keys/behavior_keymap.dtsi +++ b/app/tests/sticky-keys/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/tap-dance/behavior_keymap.dtsi b/app/tests/tap-dance/behavior_keymap.dtsi index ce80e958d23..66ffdf2e0cc 100644 --- a/app/tests/tap-dance/behavior_keymap.dtsi +++ b/app/tests/tap-dance/behavior_keymap.dtsi @@ -6,7 +6,6 @@ behaviors { ht: hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "HOLD_TAP"; #binding-cells = <2>; tapping-term-ms = <200>; quick_tap_ms = <0>; @@ -16,7 +15,6 @@ tdm: tap_dance_mixed { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_MOD"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&ht LSHIFT A>, <&ht LALT B>, <&ht LGUI C>; @@ -24,7 +22,6 @@ tdb: tap_dance_basic { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_BASIC"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp N1>, <&kp N2>, <&kp N3>; @@ -32,7 +29,6 @@ td2: tap_dance_basic_2 { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_BASIC_2"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp A>, <&kp B>, <&kp C>; @@ -40,7 +36,6 @@ tds: tap_dance_single { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_SINGlE"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp S>; @@ -59,7 +54,6 @@ keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/to-layer/behavior_keymap.dtsi b/app/tests/to-layer/behavior_keymap.dtsi index 7dc857fe143..0be9cb9641f 100644 --- a/app/tests/to-layer/behavior_keymap.dtsi +++ b/app/tests/to-layer/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/toggle-layer/behavior_keymap.dtsi b/app/tests/toggle-layer/behavior_keymap.dtsi index 1ecf8599259..1ff4a81f3e4 100644 --- a/app/tests/toggle-layer/behavior_keymap.dtsi +++ b/app/tests/toggle-layer/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/transparent/behavior_keymap.dtsi b/app/tests/transparent/behavior_keymap.dtsi index dd5ded90b6c..b70c84218c2 100644 --- a/app/tests/transparent/behavior_keymap.dtsi +++ b/app/tests/transparent/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < diff --git a/app/tests/wpm/behavior_keymap.dtsi b/app/tests/wpm/behavior_keymap.dtsi index 52f9421c2fb..5f7cfd2dfeb 100644 --- a/app/tests/wpm/behavior_keymap.dtsi +++ b/app/tests/wpm/behavior_keymap.dtsi @@ -5,7 +5,6 @@ / { keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < From d4e8dee44479864af5bef1b88a71d40b9e8edabf Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 6 Oct 2023 20:04:41 -0500 Subject: [PATCH 44/65] refactor(keymaps): Rename layer label to "display-name" Changed the property used to define a layer name for displays from "label" (which affects other things in Zephyr and is deprecated) to "display-name". (It cannot be named simply "name", because that has special meaning in newer versions of the devicetree compiler.) "label" is still supported as a fallback, so no changes need to be made to existing keymaps. --- app/boards/arm/corneish_zen/corneish_zen.keymap | 6 +++--- app/boards/arm/corneish_zen/widgets/layer_status.c | 2 +- app/boards/shields/hummingbird/hummingbird.keymap | 6 +++--- app/boards/shields/leeloo/leeloo.keymap | 6 +++--- app/boards/shields/leeloo/leeloo_rev2.keymap | 6 +++--- app/boards/shields/leeloo_micro/leeloo_micro.keymap | 12 ++++++------ app/boards/shields/murphpad/murphpad.keymap | 4 ++-- app/boards/shields/nibble/nibble.keymap | 4 ++-- app/boards/shields/nice_view/widgets/status.c | 2 +- app/boards/shields/reviung34/reviung34.keymap | 10 +++++----- app/boards/shields/reviung5/reviung5.keymap | 4 ++-- app/boards/shields/snap/snap.keymap | 4 ++-- app/boards/shields/sofle/sofle.keymap | 8 ++++---- app/dts/bindings/zmk,keymap.yaml | 9 ++++++++- app/include/zmk/keymap.h | 2 +- app/src/display/widgets/layer_status.c | 2 +- app/src/keymap.c | 6 +++--- docs/docs/config/keymap.md | 2 +- 18 files changed, 51 insertions(+), 44 deletions(-) diff --git a/app/boards/arm/corneish_zen/corneish_zen.keymap b/app/boards/arm/corneish_zen/corneish_zen.keymap index 24c925e8233..d2549819c03 100644 --- a/app/boards/arm/corneish_zen/corneish_zen.keymap +++ b/app/boards/arm/corneish_zen/corneish_zen.keymap @@ -21,7 +21,7 @@ compatible = "zmk,keymap"; default_layer { - label = "QWERTY"; + display-name = "QWERTY"; // -------------------------------------------------------------------------------- // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | @@ -36,7 +36,7 @@ }; lower_layer { - label = "NUMBER"; + display-name = "NUMBER"; // ----------------------------------------------------------------------------------------- // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | @@ -51,7 +51,7 @@ }; raise_layer { - label = "SYMBOL"; + display-name = "SYMBOL"; // ----------------------------------------------------------------------------------------- // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP | // | CTRL | | | | | | | - | = | [ | ] | \ | ` | diff --git a/app/boards/arm/corneish_zen/widgets/layer_status.c b/app/boards/arm/corneish_zen/widgets/layer_status.c index 3dc33613441..86418318092 100644 --- a/app/boards/arm/corneish_zen/widgets/layer_status.c +++ b/app/boards/arm/corneish_zen/widgets/layer_status.c @@ -45,7 +45,7 @@ static void layer_status_update_cb(struct layer_status_state state) { static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)}; + return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, diff --git a/app/boards/shields/hummingbird/hummingbird.keymap b/app/boards/shields/hummingbird/hummingbird.keymap index 990d79094d4..7a7171e8fb7 100644 --- a/app/boards/shields/hummingbird/hummingbird.keymap +++ b/app/boards/shields/hummingbird/hummingbird.keymap @@ -66,7 +66,7 @@ }; nav_layer { - label = "Nav"; + display-name = "Nav"; bindings = < &trans &trans &trans &trans &trans &trans &kp HOME &kp UARW &kp PG_UP &trans &trans &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp RARW &trans @@ -76,7 +76,7 @@ }; num_layer { - label = "Num"; + display-name = "Num"; bindings = < &kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans &kp SEMI &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans @@ -86,7 +86,7 @@ }; sym_layer { - label = "Sym"; + display-name = "Sym"; bindings = < &kp LBRC &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp RBRC &trans &trans &trans &trans &trans &kp COLON &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp PLUS &trans &trans &trans &trans &trans diff --git a/app/boards/shields/leeloo/leeloo.keymap b/app/boards/shields/leeloo/leeloo.keymap index bdbf8988cc8..91e4f333448 100644 --- a/app/boards/shields/leeloo/leeloo.keymap +++ b/app/boards/shields/leeloo/leeloo.keymap @@ -25,7 +25,7 @@ compatible = "zmk,keymap"; default_layer { - label = " QWERTY"; + display-name = " QWERTY"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp GRAV @@ -38,7 +38,7 @@ }; lower_layer { - label = " Lower"; + display-name = " Lower"; bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &trans &kp F12 @@ -51,7 +51,7 @@ }; raise_layer { - label = " Raise"; + display-name = " Raise"; bindings = < &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader diff --git a/app/boards/shields/leeloo/leeloo_rev2.keymap b/app/boards/shields/leeloo/leeloo_rev2.keymap index a66205b64cc..a2eda050f2b 100644 --- a/app/boards/shields/leeloo/leeloo_rev2.keymap +++ b/app/boards/shields/leeloo/leeloo_rev2.keymap @@ -37,7 +37,7 @@ compatible = "zmk,keymap"; default_layer { - label = " QWERTY"; + display-name = " QWERTY"; bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSLH &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp GRAV @@ -50,7 +50,7 @@ }; lower_layer { - label = " Lower"; + display-name = " Lower"; bindings = < &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &trans &kp F12 @@ -63,7 +63,7 @@ }; raise_layer { - label = " Raise"; + display-name = " Raise"; bindings = < &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &sys_reset &bootloader diff --git a/app/boards/shields/leeloo_micro/leeloo_micro.keymap b/app/boards/shields/leeloo_micro/leeloo_micro.keymap index 8526f5ac2a8..2317015c106 100644 --- a/app/boards/shields/leeloo_micro/leeloo_micro.keymap +++ b/app/boards/shields/leeloo_micro/leeloo_micro.keymap @@ -73,7 +73,7 @@ compatible = "zmk,keymap"; default_layer { - label = " QWERTY"; + display-name = " QWERTY"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI @@ -85,7 +85,7 @@ }; lower_layer { - label = " Lower"; + display-name = " Lower"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp QUOT @@ -97,7 +97,7 @@ }; raise_layer { - label = " Raise"; + display-name = " Raise"; bindings = < &kp TAB &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP &kp END &kp BSLH &kp CAPS &trans &trans &trans &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp GRAVE @@ -109,7 +109,7 @@ }; adjust_layer { - label = " Adjust"; + display-name = " Adjust"; bindings = < &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &trans &trans &trans &trans @@ -122,7 +122,7 @@ }; numpad_layer { - label = " NumPad"; + display-name = " NumPad"; bindings = < &trans &none &none &none &none &kp SLASH &kp N7 &kp N8 &kp N9 &kp MINUS @@ -135,7 +135,7 @@ RGBOFF RGBEFF RGBHUD RGBSAD RGBBRD &trans &trans &no }; ble_layer { - label = " BLE"; + display-name = " BLE"; bindings = < &bt BT0 &bt BT1 &bt BT2 &bt BT3 &bt BT4 &bt BT0 &bt BT1 &bt BT2 &bt BT3 &bt BT4 diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index 74a852a8719..069eeea3ba8 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -56,7 +56,7 @@ compatible = "zmk,keymap"; default_layer { - label = "default layer"; + display-name = "default layer"; bindings = < &bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) &rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS @@ -70,7 +70,7 @@ }; fn_layer { - label = "fn layer"; + display-name = "fn layer"; bindings = < &trans &trans &trans &trans &trans &trans &kp KP_NUM &trans &trans &trans diff --git a/app/boards/shields/nibble/nibble.keymap b/app/boards/shields/nibble/nibble.keymap index 4cb6f5b021a..8b25c5a4133 100644 --- a/app/boards/shields/nibble/nibble.keymap +++ b/app/boards/shields/nibble/nibble.keymap @@ -19,7 +19,7 @@ compatible = "zmk,keymap"; default_layer { - label = "Default"; + display-name = "Default"; sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; @@ -32,7 +32,7 @@ >; }; function_layer { - label = "Function"; + display-name = "Function"; sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index 453fd650039..96b7d450a7d 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -276,7 +276,7 @@ static void layer_status_update_cb(struct layer_status_state state) { static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)}; + return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap index eefc510a1c4..9a0d982dcd7 100644 --- a/app/boards/shields/reviung34/reviung34.keymap +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -25,7 +25,7 @@ compatible = "zmk,keymap"; base { - label = "Base"; + display-name = "Base"; bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI @@ -35,7 +35,7 @@ }; lower { - label = "Lower"; + display-name = "Lower"; bindings = < &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans &kp TILDE &kp DQT &kp PIPE &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC @@ -45,7 +45,7 @@ }; upper { - label = "Upper"; + display-name = "Upper"; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans &kp GRAVE &kp SQT &kp BSLH &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT @@ -55,7 +55,7 @@ }; function { - label = "Function"; + display-name = "Function"; bindings = < &kp TAB &trans &kp C_VOL_UP &trans &trans &trans &trans &trans &trans &kp ENTER &kp ESC &kp C_BRI_DN &kp C_VOL_DN &kp C_BRI_UP &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT @@ -65,7 +65,7 @@ }; meta { - label = "Meta"; + display-name = "Meta"; bindings = < &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &none &none &none &none &none &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 diff --git a/app/boards/shields/reviung5/reviung5.keymap b/app/boards/shields/reviung5/reviung5.keymap index 936694790cf..31c89cbcef3 100644 --- a/app/boards/shields/reviung5/reviung5.keymap +++ b/app/boards/shields/reviung5/reviung5.keymap @@ -17,7 +17,7 @@ compatible = "zmk,keymap"; base_layer { - label = "BASE"; + display-name = "BASE"; bindings = < // ╭─────────────┬──────────────┬──────────────────┬─────────────┬─────────────╮ &mo BLE &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_NEXT &kp C_MUTE @@ -27,7 +27,7 @@ }; ble_layer { - label = "BLE"; + display-name = "BLE"; bindings = < // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ &trans &out OUT_TOG &bt BT_PRV &bt BT_NXT &bt BT_CLR diff --git a/app/boards/shields/snap/snap.keymap b/app/boards/shields/snap/snap.keymap index febaff97bba..8a95beda153 100644 --- a/app/boards/shields/snap/snap.keymap +++ b/app/boards/shields/snap/snap.keymap @@ -20,7 +20,7 @@ compatible = "zmk,keymap"; default_layer { - label = "Default"; + display-name = "Default"; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; bindings = < &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp KP_NUM &kp PAUSE_BREAK @@ -33,7 +33,7 @@ }; function_layer { - label = "Function"; + display-name = "Function"; sensor-bindings = <&inc_dec_kp C_NEXT C_PREV &inc_dec_kp C_NEXT C_PREV>; bindings = < &bootloader &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader diff --git a/app/boards/shields/sofle/sofle.keymap b/app/boards/shields/sofle/sofle.keymap index fbb0af7fb00..ed9f0f4f42c 100644 --- a/app/boards/shields/sofle/sofle.keymap +++ b/app/boards/shields/sofle/sofle.keymap @@ -30,7 +30,7 @@ compatible = "zmk,keymap"; default_layer { - label = "default"; + display-name = "default"; // ------------------------------------------------------------------------------------------------------------ // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | @@ -49,7 +49,7 @@ }; lower_layer { - label = "lower"; + display-name = "lower"; // TODO: Some binds are waiting for shifted keycode support. // ------------------------------------------------------------------------------------------------------------ // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -69,7 +69,7 @@ }; raise_layer { - label = "raise"; + display-name = "raise"; // ------------------------------------------------------------------------------------------------------------ // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | @@ -94,7 +94,7 @@ // | | RGB_BRD | RGB_BRI | | | | | | | | | | | // | | | | | | | RGB_TOG | | | | | | | | | // | | | | | | | | | | | | - label = "adjust"; + display-name = "adjust"; bindings = < &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &none &ext_power EP_TOG &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_EFF &none &none &none &none &none &none diff --git a/app/dts/bindings/zmk,keymap.yaml b/app/dts/bindings/zmk,keymap.yaml index 56821ded17d..4c675d21237 100644 --- a/app/dts/bindings/zmk,keymap.yaml +++ b/app/dts/bindings/zmk,keymap.yaml @@ -7,12 +7,19 @@ child-binding: description: "A layer to be used in a keymap" properties: - label: + display-name: type: string required: false + description: The name of this layer to show on displays bindings: type: phandle-array required: true sensor-bindings: type: phandle-array required: false + + label: + type: string + required: false + deprecated: true + description: Deprecated. Use "name" instead. diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 43e8aef141f..9bf81e1e60f 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -22,7 +22,7 @@ int zmk_keymap_layer_activate(uint8_t layer); int zmk_keymap_layer_deactivate(uint8_t layer); int zmk_keymap_layer_toggle(uint8_t layer); int zmk_keymap_layer_to(uint8_t layer); -const char *zmk_keymap_layer_label(uint8_t layer); +const char *zmk_keymap_layer_name(uint8_t layer); int zmk_keymap_position_state_changed(uint8_t source, uint32_t position, bool pressed, int64_t timestamp); diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index c3ddd07cf4d..73c2268e4cc 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -45,7 +45,7 @@ static void layer_status_update_cb(struct layer_status_state state) { static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) { uint8_t index = zmk_keymap_highest_layer_active(); - return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_label(index)}; + return (struct layer_status_state){.index = index, .label = zmk_keymap_layer_name(index)}; } ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, diff --git a/app/src/keymap.c b/app/src/keymap.c index ca41e34adcc..f2aa3426854 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -52,7 +52,7 @@ static uint8_t _zmk_keymap_layer_default = 0; #endif /* ZMK_KEYMAP_HAS_SENSORS */ -#define LAYER_LABEL(node) DT_PROP_OR(node, label, NULL) +#define LAYER_NAME(node) DT_PROP_OR(node, display_name, DT_PROP_OR(node, label, NULL)) // State @@ -65,7 +65,7 @@ static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_ DT_INST_FOREACH_CHILD_SEP(0, TRANSFORMED_LAYER, (, ))}; static const char *zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN] = { - DT_INST_FOREACH_CHILD_SEP(0, LAYER_LABEL, (, ))}; + DT_INST_FOREACH_CHILD_SEP(0, LAYER_NAME, (, ))}; #if ZMK_KEYMAP_HAS_SENSORS @@ -145,7 +145,7 @@ bool is_active_layer(uint8_t layer, zmk_keymap_layers_state_t layer_state) { return (layer_state & BIT(layer)) == BIT(layer) || layer == _zmk_keymap_layer_default; } -const char *zmk_keymap_layer_label(uint8_t layer) { +const char *zmk_keymap_layer_name(uint8_t layer) { if (layer >= ZMK_KEYMAP_LAYERS_LEN) { return NULL; } diff --git a/docs/docs/config/keymap.md b/docs/docs/config/keymap.md index b4e81f5edcb..4992438949d 100644 --- a/docs/docs/config/keymap.md +++ b/docs/docs/config/keymap.md @@ -19,7 +19,7 @@ Each child node can have the following properties: | Property | Type | Description | | ----------------- | ------------- | ---------------------------------------------------------------------- | -| `label` | string | Unique label for the node | +| `display-name` | string | Name for the layer on displays | | `bindings` | phandle-array | List of [key behaviors](../features/keymaps.md#behaviors), one per key | | `sensor-bindings` | phandle-array | List of sensor behaviors, one per sensor | From 5ecd3521f52bc08a811324d26f3b539cfeb2158c Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 6 Oct 2023 20:49:58 -0500 Subject: [PATCH 45/65] docs: Remove label property from documentation --- docs/blog/2020-10-03-bootloader-fix.md | 6 +++-- docs/blog/2021-01-27-zmk-sotf-4.md | 6 ++++- docs/blog/2022-04-02-zephyr-3-0.md | 7 +++--- docs/blog/2022-04-10-zmk-sotf-5.md | 5 +++- docs/blog/2023-06-18-encoder-refactors.md | 6 +++-- docs/blog/2023-10-05-zmk-sotf-6.md | 8 ++++--- docs/docs/behaviors/caps-word.md | 3 +-- docs/docs/behaviors/hold-tap.md | 10 +------- docs/docs/behaviors/macros.md | 3 --- docs/docs/behaviors/mod-morph.md | 2 -- docs/docs/behaviors/sensor-rotate.md | 4 +--- docs/docs/behaviors/sticky-key.md | 1 - docs/docs/behaviors/tap-dance.md | 2 -- docs/docs/config/battery.md | 6 ++--- docs/docs/config/behaviors.md | 25 +++++++------------ docs/docs/config/encoders.md | 1 - docs/docs/config/index.md | 1 - docs/docs/config/kscan.md | 29 +++++++++-------------- docs/docs/config/power.md | 1 - docs/docs/development/new-behavior.md | 1 - docs/docs/development/new-shield.md | 3 --- docs/docs/features/backlight.md | 1 - docs/docs/features/battery.md | 1 - docs/docs/features/underglow.md | 2 -- 24 files changed, 51 insertions(+), 83 deletions(-) diff --git a/docs/blog/2020-10-03-bootloader-fix.md b/docs/blog/2020-10-03-bootloader-fix.md index 435034cfbfb..aceee49012d 100644 --- a/docs/blog/2020-10-03-bootloader-fix.md +++ b/docs/blog/2020-10-03-bootloader-fix.md @@ -176,7 +176,6 @@ this to all of the `.dts` files for the boards that were affected by this issue. ```diff code_partition: partition@26000 { - label = "code_partition"; - reg = <0x00026000 0x000d2000>; + reg = <0x00026000 0x000c6000>; }; @@ -184,7 +183,6 @@ this to all of the `.dts` files for the boards that were affected by this issue. - storage_partition: partition@f8000 { + storage_partition: partition@ec000 { - label = "storage"; - reg = <0x000f8000 0x00008000>; + reg = <0x000ec000 0x00008000>; }; @@ -193,3 +191,7 @@ this to all of the `.dts` files for the boards that were affected by this issue. And with those changes, we should no longer run into this issue! In the process of these changes, we lost 48KB of space for application code, but we're only using around 20% of it anyways. 🎉 + +## Article Updates + +- 12/2023: Removed the deprecated `label` property from code snippets. diff --git a/docs/blog/2021-01-27-zmk-sotf-4.md b/docs/blog/2021-01-27-zmk-sotf-4.md index fbb53e4031e..823c4c5fdca 100644 --- a/docs/blog/2021-01-27-zmk-sotf-4.md +++ b/docs/blog/2021-01-27-zmk-sotf-4.md @@ -98,7 +98,7 @@ There has been lots of work to get display support complete enough for use by en #### Highest Layer Display -[mcrosson] has contributed the next display widget, showing the highest active layer in the keymap. [petejohanson] then added a small follow up to allow layers in keymaps to add a `label` property to each layer, e.g. `label = "Nav";` and have that label be displayed in the widget instead of the numeric layer number. +[mcrosson] has contributed the next display widget, showing the highest active layer in the keymap. [petejohanson] then added a small follow up to allow layers in keymaps to add a `name` property to each layer, e.g. `name = "Nav";` and have that name be displayed in the widget instead of the numeric layer number. #### WPM @@ -192,3 +192,7 @@ Thanks again to the numerous contributors, testers, and users who have made work [petejohanson]: https://github.com/petejohanson [innovaker]: https://github.com/innovaker [joelspadin]: https://github.com/joelspadin + +## Article Updates + +- 12/2023: The `label` property for keymap layers was renamed to `display-name`. diff --git a/docs/blog/2022-04-02-zephyr-3-0.md b/docs/blog/2022-04-02-zephyr-3-0.md index 6ec4c904f87..3b16b87ea78 100644 --- a/docs/blog/2022-04-02-zephyr-3-0.md +++ b/docs/blog/2022-04-02-zephyr-3-0.md @@ -79,7 +79,6 @@ Zephyr's WS2812 `led_strip` driver added a new required property. When adding [u ```dts led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ @@ -115,7 +114,6 @@ For example, for a shield with: oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; - label = "SSD1306"; width = <128>; height = <32>; segment-offset = <0>; @@ -153,7 +151,6 @@ Underneath the USB device, add the CDC ACM node: status = "okay"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; ``` @@ -226,3 +223,7 @@ This will also enable us to support the XIAO compatible Adafruit Qt Py RP2040 an Thanks to all the testers who have helped verify ZMK functionality on the newer Zephyr version. [petejohanson]: https://github.com/petejohanson + +## Article Updates + +- 12/2023: Removed the deprecated `label` property from code snippets. diff --git a/docs/blog/2022-04-10-zmk-sotf-5.md b/docs/blog/2022-04-10-zmk-sotf-5.md index 4ea62a31b87..43cb4e67209 100644 --- a/docs/blog/2022-04-10-zmk-sotf-5.md +++ b/docs/blog/2022-04-10-zmk-sotf-5.md @@ -55,7 +55,6 @@ a user taps a single key in their keymap, e.g. behaviors { td0: tap_dance_0 { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_0"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp N1>, <&kp N2>, <&kp N3>; @@ -263,3 +262,7 @@ As we approach the two year birthday for ZMK, I am reminded of how far we have c [joelspadin]: https://github.com/joelspadin [bcat]: https://github.com/bcat [dxmh]: https://github.com/dxmh + +## Article Updates + +- 12/2023: Removed the deprecated `label` property from code snippets. diff --git a/docs/blog/2023-06-18-encoder-refactors.md b/docs/blog/2023-06-18-encoder-refactors.md index 14be81c8700..db544d38bc8 100644 --- a/docs/blog/2023-06-18-encoder-refactors.md +++ b/docs/blog/2023-06-18-encoder-refactors.md @@ -38,7 +38,6 @@ Previously, an encoder configuration looked like: ```dts left_encoder: encoder_left { compatible = "alps,ec11"; - 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>; @@ -61,7 +60,6 @@ That was the entirety of the configuration for encoders. ```dts left_encoder: encoder_left { compatible = "alps,ec11"; - 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)>; steps = <80>; @@ -117,3 +115,7 @@ The old configuration will be supported for a period of one month, and then remo [petejohanson]: https://github.com/petejohanson [joelspadin]: https://github.com/joelspadin + +## Article Updates + +- 12/2023: Removed the deprecated `label` property from code snippets. diff --git a/docs/blog/2023-10-05-zmk-sotf-6.md b/docs/blog/2023-10-05-zmk-sotf-6.md index 5aa1567a90a..fb8dc131d21 100644 --- a/docs/blog/2023-10-05-zmk-sotf-6.md +++ b/docs/blog/2023-10-05-zmk-sotf-6.md @@ -34,7 +34,6 @@ As an example, you can now define a mod-morph that swaps `;` and `:` so that the ```dts col_semi: colon_semicolon { compatible = "zmk,behavior-mod-morph"; - label = "COLON_SEMICOLON"; #binding-cells = <0>; bindings = <&kp COLON>, <&kp SEMI>; mods = <(MOD_LSFT|MOD_RSFT)>; @@ -48,9 +47,8 @@ As an example, you can now define a mod-morph that swaps `;` and `:` so that the As a simple example, you could define a macro that puts any keycode provided between double quotes as below, then use it like `&ql A` in your keymap: ```dts - ql: quoted_letter_macro { + ql: quoted_letter { #binding-cells = <1>; - label = "QUOTED_LETTER"; compatible = "zmk,behavior-macro-one-param"; bindings = <&kp DQT>, @@ -293,3 +291,7 @@ Also a big thank you to contributors that submit patches and perform reviews, te [urob]: https://github.com/urob [filterpaper]: https://github.com/filterpaper [ReFil]: https://github.com/ReFil + +## Article Updates + +- 12/2023: Removed the deprecated `label` property from code snippets. diff --git a/docs/docs/behaviors/caps-word.md b/docs/docs/behaviors/caps-word.md index 0233de526b6..77c8fd20d2a 100644 --- a/docs/docs/behaviors/caps-word.md +++ b/docs/docs/behaviors/caps-word.md @@ -59,9 +59,8 @@ If you want to use multiple caps breaks with different codes to break the caps, ```dts / { - prog_caps: behavior_prog_caps_word { + prog_caps: prog_caps { compatible = "zmk,behavior-caps-word"; - label = "PROG_CAPS"; #binding-cells = <0>; continue-list = ; }; diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 96e03a0e397..64fb9396c12 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -58,7 +58,6 @@ For example, the following hold-tap configuration enables `require-prior-idle-ms ```dts rpi: require_prior_idle { compatible = "zmk,behavior-hold-tap"; - label = "REQUIRE_PRIOR_IDLE"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; @@ -104,7 +103,6 @@ See the following example, which uses a hold-tap behavior definition, configured behaviors { pht: positional_hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "POSITIONAL_HOLD_TAP"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <400>; @@ -115,7 +113,6 @@ See the following example, which uses a hold-tap behavior definition, configured }; keymap { compatible = "zmk,keymap"; - label ="Default keymap"; default_layer { bindings = < // position 0 position 1 position 2 @@ -172,9 +169,8 @@ The following are suggested hold-tap configurations that work well with home row / { behaviors { - lh_pht: left_hand_positional_hold_tap { + lh_pht: left_positional_hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "LEFT_POSITIONAL_HOLD_TAP"; #binding-cells = <2>; flavor = "tap-unless-interrupted"; tapping-term-ms = <100>; // <---[[produces tap if held longer than tapping-term-ms]] @@ -206,7 +202,6 @@ The following are suggested hold-tap configurations that work well with home row behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; #binding-cells = <2>; tapping-term-ms = <150>; quick-tap-ms = <0>; @@ -236,7 +231,6 @@ The following are suggested hold-tap configurations that work well with home row behaviors { bhm: balanced_homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; #binding-cells = <2>; tapping-term-ms = <200>; // <---[[moderate duration]] quick-tap-ms = <0>; @@ -272,7 +266,6 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr behaviors { as: auto_shift { compatible = "zmk,behavior-hold-tap"; - label = "AUTO_SHIFT"; #binding-cells = <2>; tapping_term_ms = <135>; quick_tap_ms = <0>; @@ -308,7 +301,6 @@ This hold-tap example implements a [momentary-layer](layers.md/#momentary-layer) behaviors { mo_tog: behavior_mo_tog { compatible = "zmk,behavior-hold-tap"; - label = "mo_tog"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <200>; diff --git a/docs/docs/behaviors/macros.md b/docs/docs/behaviors/macros.md index 7ce968e9b9a..37ca80ffbb5 100644 --- a/docs/docs/behaviors/macros.md +++ b/docs/docs/behaviors/macros.md @@ -18,7 +18,6 @@ A macro definition looks like: / { macros { zed_em_kay: zed_em_kay { - label = "ZM_zed_em_kay"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings @@ -239,7 +238,6 @@ To achieve this, a combination of a 0ms wait time and splitting the press and re * `&lm NUM_LAYER LSHIFT` */ lm: lm { - label = "LAYER_MOD"; compatible = "zmk,behavior-macro-two-param"; wait-ms = <0>; tap-ms = <0>; @@ -323,7 +321,6 @@ This can be used instead of a complete macro definition. During the firmware bui ```dts my_zero_param_macro: my_zero_param_macro { compatible = "zmk,behavior-macro"; - label = "ZM_my_macro"; #binding-cells = <0>; wait-ms = <30>; tap-ms = <40>; diff --git a/docs/docs/behaviors/mod-morph.md b/docs/docs/behaviors/mod-morph.md index 6099b4281fd..d5b3d589b71 100644 --- a/docs/docs/behaviors/mod-morph.md +++ b/docs/docs/behaviors/mod-morph.md @@ -23,7 +23,6 @@ An example of how to implement the mod-morph "Grave Escape": behaviors { gresc: grave_escape { compatible = "zmk,behavior-mod-morph"; - label = "GRAVE_ESCAPE"; #binding-cells = <0>; bindings = <&kp ESC>, <&kp GRAVE>; mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; @@ -79,7 +78,6 @@ For example, the following configuration morphs `LEFT_SHIFT` + `BACKSPACE` into behaviors { bspc_del: backspace_delete { compatible = "zmk,behavior-mod-morph"; - label = "BACKSPACE_DELETE"; #binding-cells = <0>; bindings = <&kp BACKSPACE>, <&kp DELETE>; mods = <(MOD_LSFT|MOD_RSFT)>; diff --git a/docs/docs/behaviors/sensor-rotate.md b/docs/docs/behaviors/sensor-rotate.md index 3ff69dc6d02..f8476baeb70 100644 --- a/docs/docs/behaviors/sensor-rotate.md +++ b/docs/docs/behaviors/sensor-rotate.md @@ -24,7 +24,6 @@ Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/under behaviors { rgb_encoder: rgb_encoder { compatible = "zmk,behavior-sensor-rotate"; - label = "RGB_ENCODER"; #sensor-binding-cells = <0>; bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; }; @@ -58,9 +57,8 @@ First, defining the sensor rotation itself, binding the [Key Press Behavior](/do ```dts / { behaviors { - rot_kp: behavior_sensor_rotate_kp { + rot_kp: sensor_rotate_kp { compatible = "zmk,behavior-sensor-rotate-var"; - label = "ENC_KP"; #sensor-binding-cells = <2>; bindings = <&kp>, <&kp>; }; diff --git a/docs/docs/behaviors/sticky-key.md b/docs/docs/behaviors/sticky-key.md index 8b003f55e39..f40bb521e10 100644 --- a/docs/docs/behaviors/sticky-key.md +++ b/docs/docs/behaviors/sticky-key.md @@ -61,7 +61,6 @@ This configuration would apply to all sticky keys. This may not be appropriate i behaviors { skq: sticky_key_quick_release { compatible = "zmk,behavior-sticky-key"; - label = "STICKY_KEY_QUICK_RELEASE"; #binding-cells = <1>; bindings = <&kp>; release-after-ms = <1000>; diff --git a/docs/docs/behaviors/tap-dance.md b/docs/docs/behaviors/tap-dance.md index ac85b3dab6f..1566cf18faa 100644 --- a/docs/docs/behaviors/tap-dance.md +++ b/docs/docs/behaviors/tap-dance.md @@ -45,7 +45,6 @@ This example configures a tap-dance named `td0` that outputs the number of times behaviors { td0: tap_dance_0 { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_0"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&kp N1>, <&kp N2>, <&kp N3>; @@ -86,7 +85,6 @@ This example configures a mod-tap inside a tap-dance named `td_mt` that outputs behaviors { td_mt: tap_dance_mod_tap { compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_MOD_TAP"; #binding-cells = <0>; tapping-term-ms = <200>; bindings = <&mt LSHIFT CAPSLOCK>, <&kp LCTRL>; diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md index 8d65a00a039..50f16cfea7e 100644 --- a/docs/docs/config/battery.md +++ b/docs/docs/config/battery.md @@ -48,7 +48,7 @@ See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/late ## nRF VDDH Battery Sensor -Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. This driver has no configuration except for the required `label` property. +Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. ### Devicetree @@ -56,6 +56,4 @@ Applies to: `compatible = "zmk,battery-nrf-vddh"` 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 | -| -------- | ------ | ------------------------- | -| `label` | string | Unique label for the node | +This driver has no configuration. diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index f3f1f563ec8..10096a41f63 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -29,12 +29,11 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-caps-word.yaml](ht Applies to: `compatible = "zmk,behavior-caps-word"` -| Property | Type | Description | Default | -| ---------------- | ------ | ------------------------------------------------------------------ | ------------------------------- | -| `label` | string | Unique label for the node | | -| `#binding-cells` | int | Must be `<0>` | | -| `continue-list` | array | List of [key codes](/docs/codes) which do not deactivate caps lock | `` | -| `mods` | int | A bit field of modifiers to apply | `` | +| Property | Type | Description | Default | +| ---------------- | ----- | ------------------------------------------------------------------ | ------------------------------- | +| `#binding-cells` | int | Must be `<0>` | | +| `continue-list` | array | List of [key codes](/docs/codes) which do not deactivate caps lock | `` | +| `mods` | int | A bit field of modifiers to apply | `` | `continue-list` is treated as if it always includes alphanumeric characters (A-Z, 0-9). @@ -60,7 +59,6 @@ Applies to: `compatible = "zmk,behavior-hold-tap"` | Property | Type | Description | Default | | ---------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------ | -| `label` | string | Unique label for the node | | | `#binding-cells` | int | Must be `<2>` | | | `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | | | `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` | @@ -100,11 +98,10 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-key-repeat.yaml](h Applies to: `compatible = "zmk,behavior-key-repeat"` -| Property | Type | Description | Default | -| ---------------- | ------ | -------------------------------- | ----------------- | -| `label` | string | Unique label for the node | | -| `#binding-cells` | int | Must be `<0>` | | -| `usage-pages` | array | List of HID usage pages to track | `` | +| Property | Type | Description | Default | +| ---------------- | ----- | -------------------------------- | ----------------- | +| `#binding-cells` | int | Must be `<0>` | | +| `usage-pages` | array | List of HID usage pages to track | `` | For the `usage-pages` property, use the `HID_USAGE_*` defines from [dt-bindings/zmk/hid_usage_pages.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/hid_usage_pages.h). @@ -133,7 +130,6 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-macro.yaml](https: | Property | Type | Description | Default | | ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| `label` | string | Unique label for the node | | | `compatible` | string | Macro type, **must be _one_ of**:
• `"zmk,behavior-macro"`
• `"zmk,behavior-macro-one-param"`
• `"zmk,behavior-macro-two-param"` | | | `#binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:
• `<0>`
• `<1>`
• `<2>` | | | `bindings` | phandle array | List of behaviors to trigger | | @@ -169,7 +165,6 @@ Applies to: `compatible = "zmk,behavior-mod-morph"` | Property | Type | Description | | ---------------- | ------------- | --------------------------------------------------------------------------------- | -| `label` | string | Unique label for the node | | `#binding-cells` | int | Must be `<0>` | | `bindings` | phandle array | A list of two behaviors: one for normal press and one for mod morphed press | | `mods` | int | A bit field of modifiers. The morph behavior is used if any of these are pressed. | @@ -196,7 +191,6 @@ Applies to: `compatible = "zmk,behavior-sticky-key"` | Property | Type | Description | Default | | ------------------ | ------------- | ------------------------------------------------------------------------ | ------- | -| `label` | string | Unique label for the node | | | `#binding-cells` | int | Must match the number of parameters the `bindings` behavior uses | | | `bindings` | phandle array | A behavior (without parameters) to trigger | | | `release-after-ms` | int | Releases the key after this many milliseconds if no other key is pressed | 1000 | @@ -222,7 +216,6 @@ Applies to: `compatible = "zmk,behavior-tap-dance"` | Property | Type | Description | Default | | ----------------- | ------------- | -------------------------------------------------------------------------------------------- | ------- | -| `label` | string | Unique label for the node | | | `#binding-cells` | int | Must be `<0>` | | | `bindings` | phandle array | A list of behaviors from which to select | | | `tapping-term-ms` | int | The maximum time (in milliseconds) between taps before an item from `bindings` is triggered. | 200 | diff --git a/docs/docs/config/encoders.md b/docs/docs/config/encoders.md index 3044b392943..b242f49b5ba 100644 --- a/docs/docs/config/encoders.md +++ b/docs/docs/config/encoders.md @@ -77,7 +77,6 @@ Definition file: [zmk/app/module/dts/bindings/sensor/alps,ec11.yaml](https://git | 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 | | diff --git a/docs/docs/config/index.md b/docs/docs/config/index.md index 3d7aeb48bc2..d8a2aecffef 100644 --- a/docs/docs/config/index.md +++ b/docs/docs/config/index.md @@ -122,7 +122,6 @@ Devicetree files look like this: kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; }; }; ``` diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 00360c46978..96a483ff902 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -48,7 +48,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](h | Property | Type | Description | Default | | ----------------------- | ---------- | -------------------------------- | ------- | -| `label` | string | Unique label for the node | | | `input-gpios` | GPIO array | Input GPIOs | | | `output-gpios` | GPIO array | Demultiplexer address GPIOs | | | `debounce-period` | int | Debounce period in milliseconds | 5 | @@ -74,7 +73,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml]( | Property | Type | Description | Default | | ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- | -| `label` | string | Unique label for the node | | | `input-gpios` | GPIO array | Input GPIOs (one per key) | | | `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | | `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | @@ -118,7 +116,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml]( | Property | Type | Description | Default | | ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- | -| `label` | string | Unique label for the node | | | `row-gpios` | GPIO array | Matrix row GPIOs in order, starting from the top row | | | `col-gpios` | GPIO array | Matrix column GPIOs in order, starting from the leftmost row | | | `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | @@ -162,17 +159,15 @@ Applies to : `compatible = "zmk,kscan-composite"` Definition file: [zmk/app/dts/bindings/zmk,kscan-composite.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk,kscan-composite.yaml) -| Property | Type | Description | Default | -| -------- | ------ | --------------------------------------------- | ------- | -| `label` | string | Unique label for the node | | -| `rows` | int | The number of rows in the composite matrix | | -| `cols` | int | The number of columns in the composite matrix | | +| Property | Type | Description | Default | +| -------- | ---- | --------------------------------------------- | ------- | +| `rows` | int | The number of rows in the composite matrix | | +| `cols` | int | The number of columns in the composite matrix | | The `zmk,kscan-composite` node should have one child node per keyboard scan driver that should be composited. Each child node can have the following properties: | Property | Type | Description | Default | | --------------- | ------- | ------------------------------------------------------------------------------ | ------- | -| `label` | string | Unique label for the node | | | `kscan` | phandle | Label of the kscan driver to include | | | `row-offset` | int | Shifts row 0 of the included driver to a new row in the composite matrix | 0 | | `column-offset` | int | Shifts column 0 of the included driver to a new column in the composite matrix | 0 | @@ -237,7 +232,6 @@ One possible way to do this is a 3x4 matrix where the direct GPIO keys are shift kscan0: kscan_composite { compatible = "zmk,kscan-composite"; - label = "KSCAN0"; rows = <4>; columns = <3>; @@ -275,14 +269,13 @@ Applies to: `compatible = "zmk,kscan-mock"` Definition file: [zmk/app/dts/bindings/zmk,kscan-mock.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Ckscan-mock.yaml) -| Property | Type | Description | Default | -| -------------- | ------ | --------------------------------------------- | ------- | -| `label` | string | Unique label for the node | | -| `event-period` | int | Milliseconds between each generated event | | -| `events` | array | List of key events to simulate | | -| `rows` | int | The number of rows in the composite matrix | | -| `cols` | int | The number of columns in the composite matrix | | -| `exit-after` | bool | Exit the program after running all events | false | +| Property | Type | Description | Default | +| -------------- | ----- | --------------------------------------------- | ------- | +| `event-period` | int | Milliseconds between each generated event | | +| `events` | array | List of key events to simulate | | +| `rows` | int | The number of rows in the composite matrix | | +| `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 [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). diff --git a/docs/docs/config/power.md b/docs/docs/config/power.md index e09045ed09d..75e1b26ab8b 100644 --- a/docs/docs/config/power.md +++ b/docs/docs/config/power.md @@ -42,6 +42,5 @@ Applies to: `compatible = "zmk,ext-power-generic"` | Property | Type | Description | | --------------- | ---------- | ------------------------------------------------------------- | -| `label` | string | Unique label for the node | | `control-gpios` | GPIO array | List of GPIOs which should be active to enable external power | | `init-delay-ms` | int | number of milliseconds to delay after initializing the driver | diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index aab056c1a93..c0346132b6f 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -370,7 +370,6 @@ For the purpose of this section, we will discuss the structure of `app/dts/behav behaviors { /omit-if-no-ref/ gresc: grave_escape { compatible = "zmk,behavior-mod-morph"; - label = "GRAVE_ESCAPE"; #binding-cells = <0>; bindings = <&kp ESC>, <&kp GRAVE>; mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 7f6a8644e11..748cb9a241c 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -144,7 +144,6 @@ this might look something like: kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; col-gpios @@ -203,7 +202,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; diode-direction = "col2row"; row-gpios @@ -432,7 +430,6 @@ In your device tree file you will need to add the following lines to define the ```dts left_encoder: encoder_left { compatible = "alps,ec11"; - label = "LEFT_ENCODER"; a-gpios = ; b-gpios = ; steps = <80>; diff --git a/docs/docs/features/backlight.md b/docs/docs/features/backlight.md index 8a23a67af6a..eae4d2f9a2e 100644 --- a/docs/docs/features/backlight.md +++ b/docs/docs/features/backlight.md @@ -242,7 +242,6 @@ Add each of your LEDs to the backlight node in the same manner as for one LED, u ```dts backlight: pwmleds { compatible = "pwm-leds"; - label = "Backlight LEDs"; pwm_led_0: pwm_led_0 { pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>; }; diff --git a/docs/docs/features/battery.md b/docs/docs/features/battery.md index 8bf7820799c..4bfeb129994 100644 --- a/docs/docs/features/battery.md +++ b/docs/docs/features/battery.md @@ -34,7 +34,6 @@ Once you have the sensor driver defined, add a `zmk,battery` property to the `ch vbatt: vbatt { compatible = "zmk,battery-nrf-vddh"; - label = "VBATT"; }; } ``` diff --git a/docs/docs/features/underglow.md b/docs/docs/features/underglow.md index b5c4c70392e..13f0d8c71e6 100644 --- a/docs/docs/features/underglow.md +++ b/docs/docs/features/underglow.md @@ -98,7 +98,6 @@ Here's an example on a definition that uses P0.06: led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ @@ -142,7 +141,6 @@ Here's another example for a non-nRF52 board on `spi3`: led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; From 36eda571b77fb03e0af51caf4f5f1d2c7d43b3d5 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 18 Nov 2023 19:19:15 -0600 Subject: [PATCH 46/65] refactor(behaviors): Create a list to lookup behaviors Added BEHAVIOR_DT_DEFINE() and BEHAVIOR_DT_INST_DEFINE(), which work exactly like the DEVICE_*_DEFINE() macros, except they also register the device as a behavior by adding a pointer to it to a memory section. Added zmk_behavior_get_binding(), which works like device_get_binding() except that it only searches the devices that have been registered as behaviors. This ensures that behaviors cannot have name collisions with other devices defined by the SoC, which will be important when we remove the label property from behaviors so they are given their node names. As an added benefit, this is faster since it searches a smaller list. Some basic benchmark code I wrote indicates it takes 30-70% as long, depending on where the behavior is in the list and whether the name string is an exact pointer match. From now on, behaviors should use BEHAVIOR_*_DEFINe() instead of DEVICE_*_DEFINE(), and any code that looks up a behavior by name should use zmk_behavior_get_binding() instead of device_get_binding(). --- app/CMakeLists.txt | 2 + app/include/drivers/behavior.h | 50 ++++++++++++-- app/include/linker/zmk-behaviors.ld | 9 +++ app/include/zmk/behavior.h | 18 ++++- app/src/behavior.c | 69 +++++++++++++++++++ app/src/behaviors/behavior_backlight.c | 4 +- app/src/behaviors/behavior_bt.c | 4 +- app/src/behaviors/behavior_caps_word.c | 8 +-- app/src/behaviors/behavior_ext_power.c | 4 +- app/src/behaviors/behavior_hold_tap.c | 8 +-- app/src/behaviors/behavior_key_press.c | 4 +- app/src/behaviors/behavior_key_repeat.c | 10 +-- app/src/behaviors/behavior_key_toggle.c | 4 +- app/src/behaviors/behavior_macro.c | 10 +-- app/src/behaviors/behavior_mod_morph.c | 10 +-- app/src/behaviors/behavior_momentary_layer.c | 4 +- app/src/behaviors/behavior_mouse_key_press.c | 6 +- app/src/behaviors/behavior_none.c | 4 +- app/src/behaviors/behavior_outputs.c | 4 +- app/src/behaviors/behavior_reset.c | 8 +-- app/src/behaviors/behavior_rgb_underglow.c | 4 +- app/src/behaviors/behavior_sensor_rotate.c | 8 +-- .../behaviors/behavior_sensor_rotate_common.c | 4 +- .../behaviors/behavior_sensor_rotate_var.c | 2 +- app/src/behaviors/behavior_sticky_key.c | 8 +-- app/src/behaviors/behavior_tap_dance.c | 8 +-- app/src/behaviors/behavior_to_layer.c | 4 +- app/src/behaviors/behavior_toggle_layer.c | 4 +- app/src/behaviors/behavior_transparent.c | 4 +- app/src/keymap.c | 4 +- docs/docs/development/new-behavior.md | 34 ++++----- 31 files changed, 231 insertions(+), 93 deletions(-) create mode 100644 app/include/linker/zmk-behaviors.ld create mode 100644 app/src/behavior.c diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 41892915f13..433f2376b7b 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -15,6 +15,7 @@ list(APPEND ZEPHYR_EXTRA_MODULES find_package(Zephyr REQUIRED HINTS ../zephyr) project(zmk) +zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld) zephyr_linker_sources(RODATA include/linker/zmk-events.ld) # Add your source file to the "app" target. This must come after @@ -22,6 +23,7 @@ zephyr_linker_sources(RODATA include/linker/zmk-events.ld) target_include_directories(app PRIVATE include) target_sources(app PRIVATE src/stdlib.c) target_sources(app PRIVATE src/activity.c) +target_sources(app PRIVATE src/behavior.c) target_sources(app PRIVATE src/kscan.c) target_sources(app PRIVATE src/matrix_transform.c) target_sources(app PRIVATE src/sensors.c) diff --git a/app/include/drivers/behavior.h b/app/include/drivers/behavior.h index 066cc723ece..3936da5e4be 100644 --- a/app/include/drivers/behavior.h +++ b/app/include/drivers/behavior.h @@ -56,6 +56,46 @@ __subsystem struct behavior_driver_api { * @endcond */ +struct zmk_behavior_ref { + const struct device *device; +}; + +/** + * Registers @p node_id as a behavior. + */ +#define BEHAVIOR_DEFINE(node_id) \ + static const STRUCT_SECTION_ITERABLE(zmk_behavior_ref, \ + _CONCAT(zmk_behavior_, DEVICE_DT_NAME_GET(node_id))) = { \ + .device = DEVICE_DT_GET(node_id), \ + } + +/** + * @brief Like DEVICE_DT_DEFINE(), but also registers the device as a behavior. + * + * @param node_id The devicetree node identifier. + * @param ... Other parameters as expected by DEVICE_DT_DEFINE. + */ +#define BEHAVIOR_DT_DEFINE(node_id, ...) \ + DEVICE_DT_DEFINE(node_id, __VA_ARGS__); \ + BEHAVIOR_DEFINE(node_id) + +/** + * @brief Like DEVICE_DT_INST_DEFINE(), but also registers the device as a behavior. + * + * @param inst Instance number. + * @param ... Other parameters as expected by DEVICE_DT_DEFINE. + */ +#define BEHAVIOR_DT_INST_DEFINE(inst, ...) \ + DEVICE_DT_INST_DEFINE(inst, __VA_ARGS__); \ + BEHAVIOR_DEFINE(DT_DRV_INST(inst)) + +/** + * Syscall wrapper for zmk_behavior_get_binding(). + * + * Use zmk_behavior_get_binding() in application code instead. + */ +__syscall const struct device *behavior_get_binding(const char *name); + /** * @brief Handle the keymap binding which needs to be converted from relative "toggle" to absolute * "turn on" @@ -70,7 +110,7 @@ __syscall int behavior_keymap_binding_convert_central_state_dependent_params( static inline int z_impl_behavior_keymap_binding_convert_central_state_dependent_params( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_driver_api *api = (const struct behavior_driver_api *)dev->api; if (api->binding_convert_central_state_dependent_params == NULL) { @@ -116,7 +156,7 @@ __syscall int behavior_keymap_binding_pressed(struct zmk_behavior_binding *bindi static inline int z_impl_behavior_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); if (dev == NULL) { return -EINVAL; @@ -144,7 +184,7 @@ __syscall int behavior_keymap_binding_released(struct zmk_behavior_binding *bind static inline int z_impl_behavior_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); if (dev == NULL) { return -EINVAL; @@ -178,7 +218,7 @@ static inline int z_impl_behavior_sensor_keymap_binding_accept_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); if (dev == NULL) { return -EINVAL; @@ -214,7 +254,7 @@ static inline int z_impl_behavior_sensor_keymap_binding_process(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, enum behavior_sensor_binding_process_mode mode) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); if (dev == NULL) { return -EINVAL; diff --git a/app/include/linker/zmk-behaviors.ld b/app/include/linker/zmk-behaviors.ld new file mode 100644 index 00000000000..14ecee63c56 --- /dev/null +++ b/app/include/linker/zmk-behaviors.ld @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +ITERABLE_SECTION_ROM(zmk_behavior_ref, 4) diff --git a/app/include/zmk/behavior.h b/app/include/zmk/behavior.h index 31fb43edb35..ab95fd8e728 100644 --- a/app/include/zmk/behavior.h +++ b/app/include/zmk/behavior.h @@ -6,6 +6,8 @@ #pragma once +#include + #define ZMK_BEHAVIOR_OPAQUE 0 #define ZMK_BEHAVIOR_TRANSPARENT 1 @@ -19,4 +21,18 @@ struct zmk_behavior_binding_event { int layer; uint32_t position; int64_t timestamp; -}; \ No newline at end of file +}; + +/** + * @brief Get a const struct device* for a behavior from its @p name field. + * + * @param name Behavior name to search for. + * + * @retval Pointer to the device structure for the behavior with the given name. + * @retval NULL if the behavior is not found or its initialization function failed. + * + * @note This is equivalent to device_get_binding(), except it only searches + * behavior devices, so it is faster and there is no chance of it returning an + * unrelated node which shares the same name as a behavior. + */ +const struct device *zmk_behavior_get_binding(const char *name); diff --git a/app/src/behavior.c b/app/src/behavior.c new file mode 100644 index 00000000000..fd2b0ec1754 --- /dev/null +++ b/app/src/behavior.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +#include +#include + +#include +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +const struct device *zmk_behavior_get_binding(const char *name) { + return behavior_get_binding(name); +} + +const struct device *z_impl_behavior_get_binding(const char *name) { + if (name == NULL || name[0] == '\0') { + return NULL; + } + + STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { + if (z_device_is_ready(item->device) && item->device->name == name) { + return item->device; + } + } + + STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) { + if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) { + return item->device; + } + } + + return NULL; +} + +#if IS_ENABLED(CONFIG_LOG) +static int check_behavior_names(const struct device *dev) { + ARG_UNUSED(dev); + + // Behavior names must be unique, but we don't have a good way to enforce this + // at compile time, so log an error at runtime if they aren't unique. + ptrdiff_t count; + STRUCT_SECTION_COUNT(zmk_behavior_ref, &count); + + for (ptrdiff_t i = 0; i < count; i++) { + const struct zmk_behavior_ref *current; + STRUCT_SECTION_GET(zmk_behavior_ref, i, ¤t); + + for (ptrdiff_t j = i + 1; j < count; j++) { + const struct zmk_behavior_ref *other; + STRUCT_SECTION_GET(zmk_behavior_ref, j, &other); + + if (strcmp(current->device->name, other->device->name) == 0) { + LOG_ERR("Multiple behaviors have the same name '%s'", current->device->name); + } + } + } + + return 0; +} + +SYS_INIT(check_behavior_names, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); +#endif // IS_ENABLED(CONFIG_LOG) diff --git a/app/src/behaviors/behavior_backlight.c b/app/src/behaviors/behavior_backlight.c index fe2155b7fd0..42967e398c3 100644 --- a/app/src/behaviors/behavior_backlight.c +++ b/app/src/behaviors/behavior_backlight.c @@ -91,7 +91,7 @@ static const struct behavior_driver_api behavior_backlight_driver_api = { .locality = BEHAVIOR_LOCALITY_GLOBAL, }; -DEVICE_DT_INST_DEFINE(0, behavior_backlight_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_backlight_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_bt.c b/app/src/behaviors/behavior_bt.c index bf98532ce93..18a626b9bae 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -52,7 +52,7 @@ static const struct behavior_driver_api behavior_bt_driver_api = { .binding_released = on_keymap_binding_released, }; -DEVICE_DT_INST_DEFINE(0, behavior_bt_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_bt_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_bt_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_bt_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_caps_word.c b/app/src/behaviors/behavior_caps_word.c index 4c9fd71186d..53ea489f846 100644 --- a/app/src/behaviors/behavior_caps_word.c +++ b/app/src/behaviors/behavior_caps_word.c @@ -55,7 +55,7 @@ static void deactivate_caps_word(const struct device *dev) { static int on_caps_word_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior_caps_word_data *data = dev->data; if (data->active) { @@ -181,9 +181,9 @@ static int behavior_caps_word_init(const struct device *dev) { .continuations = {LISTIFY(DT_INST_PROP_LEN(n, continue_list), BREAK_ITEM, (, ), n)}, \ .continuations_count = DT_INST_PROP_LEN(n, continue_list), \ }; \ - DEVICE_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \ - &behavior_caps_word_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_caps_word_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_caps_word_init, NULL, &behavior_caps_word_data_##n, \ + &behavior_caps_word_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_caps_word_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_ext_power.c b/app/src/behaviors/behavior_ext_power.c index 690ac97175e..0af30b0081b 100644 --- a/app/src/behaviors/behavior_ext_power.c +++ b/app/src/behaviors/behavior_ext_power.c @@ -74,7 +74,7 @@ static const struct behavior_driver_api behavior_ext_power_driver_api = { .locality = BEHAVIOR_LOCALITY_GLOBAL, }; -DEVICE_DT_INST_DEFINE(0, behavior_ext_power_init, NULL, NULL, NULL, APPLICATION, - CONFIG_APPLICATION_INIT_PRIORITY, &behavior_ext_power_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_ext_power_init, NULL, NULL, NULL, APPLICATION, + CONFIG_APPLICATION_INIT_PRIORITY, &behavior_ext_power_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index 26c190b6613..ea0448a4fd5 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -511,7 +511,7 @@ static void update_hold_status_for_retro_tap(uint32_t ignore_position) { static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_hold_tap_config *cfg = dev->config; if (undecided_hold_tap != NULL) { @@ -715,9 +715,9 @@ static int behavior_hold_tap_init(const struct device *dev) { .hold_trigger_key_positions = DT_INST_PROP(n, hold_trigger_key_positions), \ .hold_trigger_key_positions_len = DT_INST_PROP_LEN(n, hold_trigger_key_positions), \ }; \ - DEVICE_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, NULL, &behavior_hold_tap_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_hold_tap_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, NULL, &behavior_hold_tap_config_##n, \ + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_hold_tap_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_key_press.c b/app/src/behaviors/behavior_key_press.c index 2765db9f3ca..5549b4b462b 100644 --- a/app/src/behaviors/behavior_key_press.c +++ b/app/src/behaviors/behavior_key_press.c @@ -36,7 +36,7 @@ static const struct behavior_driver_api behavior_key_press_driver_api = { .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; #define KP_INST(n) \ - DEVICE_DT_INST_DEFINE(n, behavior_key_press_init, NULL, NULL, NULL, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_press_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_key_press_init, NULL, NULL, NULL, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_press_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_key_repeat.c b/app/src/behaviors/behavior_key_repeat.c index 033f498b875..85377f3faf3 100644 --- a/app/src/behaviors/behavior_key_repeat.c +++ b/app/src/behaviors/behavior_key_repeat.c @@ -32,7 +32,7 @@ struct behavior_key_repeat_data { static int on_key_repeat_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior_key_repeat_data *data = dev->data; if (data->last_keycode_pressed.usage_page == 0) { @@ -50,7 +50,7 @@ static int on_key_repeat_binding_pressed(struct zmk_behavior_binding *binding, static int on_key_repeat_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior_key_repeat_data *data = dev->data; if (data->current_keycode_pressed.usage_page == 0) { @@ -116,9 +116,9 @@ static int behavior_key_repeat_init(const struct device *dev) { .usage_pages = DT_INST_PROP(n, usage_pages), \ .usage_pages_count = DT_INST_PROP_LEN(n, usage_pages), \ }; \ - DEVICE_DT_INST_DEFINE(n, behavior_key_repeat_init, NULL, &behavior_key_repeat_data_##n, \ - &behavior_key_repeat_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_repeat_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_key_repeat_init, NULL, &behavior_key_repeat_data_##n, \ + &behavior_key_repeat_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_repeat_driver_api); DT_INST_FOREACH_STATUS_OKAY(KR_INST) diff --git a/app/src/behaviors/behavior_key_toggle.c b/app/src/behaviors/behavior_key_toggle.c index cbbdd0d91ac..0ab1bd02362 100644 --- a/app/src/behaviors/behavior_key_toggle.c +++ b/app/src/behaviors/behavior_key_toggle.c @@ -38,7 +38,7 @@ static const struct behavior_driver_api behavior_key_toggle_driver_api = { }; #define KT_INST(n) \ - DEVICE_DT_INST_DEFINE(n, behavior_key_toggle_init, NULL, NULL, NULL, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_toggle_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_key_toggle_init, NULL, NULL, NULL, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_key_toggle_driver_api); DT_INST_FOREACH_STATUS_OKAY(KT_INST) diff --git a/app/src/behaviors/behavior_macro.c b/app/src/behaviors/behavior_macro.c index e6a789b6dc3..1cb76dbd1bc 100644 --- a/app/src/behaviors/behavior_macro.c +++ b/app/src/behaviors/behavior_macro.c @@ -184,7 +184,7 @@ static void queue_macro(uint32_t position, const struct zmk_behavior_binding bin static int on_macro_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_macro_config *cfg = dev->config; struct behavior_macro_state *state = dev->data; struct behavior_macro_trigger_state trigger_state = {.mode = MACRO_MODE_TAP, @@ -200,7 +200,7 @@ static int on_macro_binding_pressed(struct zmk_behavior_binding *binding, static int on_macro_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_macro_config *cfg = dev->config; struct behavior_macro_state *state = dev->data; @@ -224,9 +224,9 @@ static const struct behavior_driver_api behavior_macro_driver_api = { .default_tap_ms = DT_PROP_OR(inst, tap_ms, CONFIG_ZMK_MACRO_DEFAULT_TAP_MS), \ .count = DT_PROP_LEN(inst, bindings), \ .bindings = TRANSFORMED_BEHAVIORS(inst)}; \ - DEVICE_DT_DEFINE(inst, behavior_macro_init, NULL, &behavior_macro_state_##inst, \ - &behavior_macro_config_##inst, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api); + BEHAVIOR_DT_DEFINE(inst, behavior_macro_init, NULL, &behavior_macro_state_##inst, \ + &behavior_macro_config_##inst, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_macro_driver_api); DT_FOREACH_STATUS_OKAY(zmk_behavior_macro, MACRO_INST) DT_FOREACH_STATUS_OKAY(zmk_behavior_macro_one_param, MACRO_INST) diff --git a/app/src/behaviors/behavior_mod_morph.c b/app/src/behaviors/behavior_mod_morph.c index f0832514122..176b0f696ec 100644 --- a/app/src/behaviors/behavior_mod_morph.c +++ b/app/src/behaviors/behavior_mod_morph.c @@ -36,7 +36,7 @@ struct behavior_mod_morph_data { static int on_mod_morph_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_mod_morph_config *cfg = dev->config; struct behavior_mod_morph_data *data = dev->data; @@ -56,7 +56,7 @@ static int on_mod_morph_binding_pressed(struct zmk_behavior_binding *binding, static int on_mod_morph_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior_mod_morph_data *data = dev->data; if (data->pressed_binding == NULL) { @@ -97,9 +97,9 @@ static int behavior_mod_morph_init(const struct device *dev) { return 0; } (DT_INST_PROP(n, mods) & ~DT_INST_PROP(n, keep_mods))), \ }; \ static struct behavior_mod_morph_data behavior_mod_morph_data_##n = {}; \ - DEVICE_DT_INST_DEFINE(n, behavior_mod_morph_init, NULL, &behavior_mod_morph_data_##n, \ - &behavior_mod_morph_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mod_morph_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_mod_morph_init, NULL, &behavior_mod_morph_data_##n, \ + &behavior_mod_morph_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mod_morph_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_momentary_layer.c b/app/src/behaviors/behavior_momentary_layer.c index c2bd0ffcb98..94da6441e76 100644 --- a/app/src/behaviors/behavior_momentary_layer.c +++ b/app/src/behaviors/behavior_momentary_layer.c @@ -39,5 +39,5 @@ static const struct behavior_mo_config behavior_mo_config = {}; static struct behavior_mo_data behavior_mo_data; -DEVICE_DT_INST_DEFINE(0, behavior_mo_init, NULL, &behavior_mo_data, &behavior_mo_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_mo_init, NULL, &behavior_mo_data, &behavior_mo_config, + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mo_driver_api); diff --git a/app/src/behaviors/behavior_mouse_key_press.c b/app/src/behaviors/behavior_mouse_key_press.c index 6718155768c..e79bb74771d 100644 --- a/app/src/behaviors/behavior_mouse_key_press.c +++ b/app/src/behaviors/behavior_mouse_key_press.c @@ -39,9 +39,9 @@ static const struct behavior_driver_api behavior_mouse_key_press_driver_api = { .binding_pressed = on_keymap_binding_pressed, .binding_released = on_keymap_binding_released}; #define MKP_INST(n) \ - DEVICE_DT_INST_DEFINE(n, behavior_mouse_key_press_init, NULL, NULL, NULL, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_mouse_key_press_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_mouse_key_press_init, NULL, NULL, NULL, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_mouse_key_press_driver_api); DT_INST_FOREACH_STATUS_OKAY(MKP_INST) diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c index 613ecbad7e6..57208f36ae1 100644 --- a/app/src/behaviors/behavior_none.c +++ b/app/src/behaviors/behavior_none.c @@ -33,7 +33,7 @@ static const struct behavior_driver_api behavior_none_driver_api = { .binding_released = on_keymap_binding_released, }; -DEVICE_DT_INST_DEFINE(0, behavior_none_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_none_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_none_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_none_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_outputs.c b/app/src/behaviors/behavior_outputs.c index 6ae81a0fdd7..1185aaabf2c 100644 --- a/app/src/behaviors/behavior_outputs.c +++ b/app/src/behaviors/behavior_outputs.c @@ -42,7 +42,7 @@ static const struct behavior_driver_api behavior_outputs_driver_api = { .binding_pressed = on_keymap_binding_pressed, }; -DEVICE_DT_INST_DEFINE(0, behavior_out_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_outputs_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_out_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_outputs_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c index 0b983c84709..6a2731ecad4 100644 --- a/app/src/behaviors/behavior_reset.c +++ b/app/src/behaviors/behavior_reset.c @@ -25,7 +25,7 @@ static int behavior_reset_init(const struct device *dev) { return 0; }; static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_reset_config *cfg = dev->config; // TODO: Correct magic code for going into DFU? @@ -43,9 +43,9 @@ static const struct behavior_driver_api behavior_reset_driver_api = { #define RST_INST(n) \ static const struct behavior_reset_config behavior_reset_config_##n = { \ .type = DT_INST_PROP(n, type)}; \ - DEVICE_DT_INST_DEFINE(n, behavior_reset_init, NULL, NULL, &behavior_reset_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_reset_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_reset_init, NULL, NULL, &behavior_reset_config_##n, \ + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_reset_driver_api); DT_INST_FOREACH_STATUS_OKAY(RST_INST) diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c index 0af07f8146d..7a478eb781f 100644 --- a/app/src/behaviors/behavior_rgb_underglow.c +++ b/app/src/behaviors/behavior_rgb_underglow.c @@ -149,7 +149,7 @@ static const struct behavior_driver_api behavior_rgb_underglow_driver_api = { .locality = BEHAVIOR_LOCALITY_GLOBAL, }; -DEVICE_DT_INST_DEFINE(0, behavior_rgb_underglow_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_rgb_underglow_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_rgb_underglow_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_rgb_underglow_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_sensor_rotate.c b/app/src/behaviors/behavior_sensor_rotate.c index eb138fe23ab..f77beca188d 100644 --- a/app/src/behaviors/behavior_sensor_rotate.c +++ b/app/src/behaviors/behavior_sensor_rotate.c @@ -35,9 +35,9 @@ static int behavior_sensor_rotate_init(const struct device *dev) { return 0; }; .override_params = false, \ }; \ static struct behavior_sensor_rotate_data behavior_sensor_rotate_data_##n = {}; \ - DEVICE_DT_INST_DEFINE(n, behavior_sensor_rotate_init, NULL, &behavior_sensor_rotate_data_##n, \ - &behavior_sensor_rotate_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_sensor_rotate_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_sensor_rotate_init, NULL, \ + &behavior_sensor_rotate_data_##n, &behavior_sensor_rotate_config_##n, \ + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_sensor_rotate_driver_api); DT_INST_FOREACH_STATUS_OKAY(SENSOR_ROTATE_INST) diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c index 98b4aec1267..94bf40c18d4 100644 --- a/app/src/behaviors/behavior_sensor_rotate_common.c +++ b/app/src/behaviors/behavior_sensor_rotate_common.c @@ -15,7 +15,7 @@ int zmk_behavior_sensor_rotate_common_accept_data( struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, const struct zmk_sensor_config *sensor_config, size_t channel_data_size, const struct zmk_sensor_channel_data *channel_data) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior_sensor_rotate_data *data = dev->data; const struct sensor_value value = channel_data[0].value; @@ -58,7 +58,7 @@ int zmk_behavior_sensor_rotate_common_accept_data( int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event, enum behavior_sensor_binding_process_mode mode) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_sensor_rotate_config *cfg = dev->config; struct behavior_sensor_rotate_data *data = dev->data; diff --git a/app/src/behaviors/behavior_sensor_rotate_var.c b/app/src/behaviors/behavior_sensor_rotate_var.c index 8263a693813..0d3d22b29e0 100644 --- a/app/src/behaviors/behavior_sensor_rotate_var.c +++ b/app/src/behaviors/behavior_sensor_rotate_var.c @@ -26,7 +26,7 @@ static int behavior_sensor_rotate_var_init(const struct device *dev) { return 0; .override_params = true, \ }; \ static struct behavior_sensor_rotate_data behavior_sensor_rotate_var_data_##n = {}; \ - DEVICE_DT_INST_DEFINE( \ + BEHAVIOR_DT_INST_DEFINE( \ n, behavior_sensor_rotate_var_init, NULL, &behavior_sensor_rotate_var_data_##n, \ &behavior_sensor_rotate_var_config_##n, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ &behavior_sensor_rotate_var_driver_api); diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 6697b9b1bbb..c6731d32040 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -129,7 +129,7 @@ static int stop_timer(struct active_sticky_key *sticky_key) { static int on_sticky_key_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_sticky_key_config *cfg = dev->config; struct active_sticky_key *sticky_key; sticky_key = find_sticky_key(event.position); @@ -293,9 +293,9 @@ static struct behavior_sticky_key_data behavior_sticky_key_data; .ignore_modifiers = DT_INST_PROP(n, ignore_modifiers), \ .quick_release = DT_INST_PROP(n, quick_release), \ }; \ - DEVICE_DT_INST_DEFINE(n, behavior_sticky_key_init, NULL, &behavior_sticky_key_data, \ - &behavior_sticky_key_config_##n, APPLICATION, \ - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sticky_key_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_sticky_key_init, NULL, &behavior_sticky_key_data, \ + &behavior_sticky_key_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_sticky_key_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_tap_dance.c b/app/src/behaviors/behavior_tap_dance.c index fc685124860..306d5ca760b 100644 --- a/app/src/behaviors/behavior_tap_dance.c +++ b/app/src/behaviors/behavior_tap_dance.c @@ -125,7 +125,7 @@ static inline int release_tap_dance_behavior(struct active_tap_dance *tap_dance, static int on_tap_dance_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_tap_dance_config *cfg = dev->config; struct active_tap_dance *tap_dance; tap_dance = find_tap_dance(event.position); @@ -250,9 +250,9 @@ static int behavior_tap_dance_init(const struct device *dev) { .tapping_term_ms = DT_INST_PROP(n, tapping_term_ms), \ .behaviors = behavior_tap_dance_config_##n##_bindings, \ .behavior_count = DT_INST_PROP_LEN(n, bindings)}; \ - DEVICE_DT_INST_DEFINE(n, behavior_tap_dance_init, NULL, NULL, &behavior_tap_dance_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_tap_dance_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_tap_dance_init, NULL, NULL, \ + &behavior_tap_dance_config_##n, APPLICATION, \ + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tap_dance_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) diff --git a/app/src/behaviors/behavior_to_layer.c b/app/src/behaviors/behavior_to_layer.c index c05b83eab94..9a58bf602c7 100644 --- a/app/src/behaviors/behavior_to_layer.c +++ b/app/src/behaviors/behavior_to_layer.c @@ -37,7 +37,7 @@ static const struct behavior_driver_api behavior_to_driver_api = { .binding_released = to_keymap_binding_released, }; -DEVICE_DT_INST_DEFINE(0, behavior_to_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_to_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_to_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_to_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c index 73a700eda5f..154cf9cdf40 100644 --- a/app/src/behaviors/behavior_toggle_layer.c +++ b/app/src/behaviors/behavior_toggle_layer.c @@ -43,7 +43,7 @@ static const struct behavior_tog_config behavior_tog_config = {}; static struct behavior_tog_data behavior_tog_data; -DEVICE_DT_INST_DEFINE(0, behavior_tog_init, NULL, &behavior_tog_data, &behavior_tog_config, - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tog_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_tog_init, NULL, &behavior_tog_data, &behavior_tog_config, + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_tog_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/behaviors/behavior_transparent.c b/app/src/behaviors/behavior_transparent.c index eeb2242db6b..ddf62ce0ae8 100644 --- a/app/src/behaviors/behavior_transparent.c +++ b/app/src/behaviors/behavior_transparent.c @@ -33,7 +33,7 @@ static const struct behavior_driver_api behavior_transparent_driver_api = { .binding_released = on_keymap_binding_released, }; -DEVICE_DT_INST_DEFINE(0, behavior_transparent_init, NULL, NULL, NULL, APPLICATION, - CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_transparent_driver_api); +BEHAVIOR_DT_INST_DEFINE(0, behavior_transparent_init, NULL, NULL, NULL, APPLICATION, + CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_transparent_driver_api); #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ diff --git a/app/src/keymap.c b/app/src/keymap.c index f2aa3426854..d275feafbb5 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -176,7 +176,7 @@ int zmk_keymap_apply_position_state(uint8_t source, int layer, uint32_t position LOG_DBG("layer: %d position: %d, binding name: %s", layer, position, binding.behavior_dev); - behavior = device_get_binding(binding.behavior_dev); + behavior = zmk_behavior_get_binding(binding.behavior_dev); if (!behavior) { LOG_WRN("No behavior assigned to %d on layer %d", position, layer); @@ -256,7 +256,7 @@ int zmk_keymap_sensor_event(uint8_t sensor_index, LOG_DBG("layer: %d sensor_index: %d, binding name: %s", layer, sensor_index, binding->behavior_dev); - const struct device *behavior = device_get_binding(binding->behavior_dev); + const struct device *behavior = zmk_behavior_get_binding(binding->behavior_dev); if (!behavior) { LOG_DBG("No behavior assigned to %d on layer %d", sensor_index, layer); continue; diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index c0346132b6f..129ba324817 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -171,12 +171,12 @@ static const struct behavior_driver_api _driver_api = { }; -DEVICE_DT_INST_DEFINE(0, // Instance Number (Equal to 0 for behaviors that don't require multiple instances, - // Equal to n for behaviors that do make use of multiple instances) - _init, NULL, // Initialization Function, Power Management Device Pointer - &_data, &_config, // Behavior Data Pointer, Behavior Configuration Pointer (Both Optional) - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, // Initialization Level, Device Priority - &_driver_api); // API Structure +BEHAVIOR_DT_INST_DEFINE(0, // Instance Number (Equal to 0 for behaviors that don't require multiple instances, + // Equal to n for behaviors that do make use of multiple instances) + _init, NULL, // Initialization Function, Power Management Device Pointer + &_data, &_config, // Behavior Data Pointer, Behavior Configuration Pointer (Both Optional) + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, // Initialization Level, Device Priority + &_driver_api); // API Structure #endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ @@ -244,13 +244,15 @@ Listeners, defined by the `ZMK_LISTENER(mod, cb)` function, take in a listener n - `ZMK_EVENT_RELEASE(ev)`: Continue handling this event (`ev`) at the next registered event listener. - `ZMK_EVENT_FREE(ev)`: Free the memory associated with the event (`ev`). -#### `DEVICE_DT_INST_DEFINE` +#### `BEHAVIOR_DT_INST_DEFINE` + +`BEHAVIOR_DT_INST_DEFINE` is a special ZMK macro. It forwards all the parameters to Zephyr's `DEVICE_DT_INST_DEFINE` macro to define the driver instance, then it adds the driver to a list of ZMK behaviors so they can be found by `zmk_behavior_get_binding()`. :::info For more information on this function, refer to [Zephyr's documentation on the Device Driver Model](https://docs.zephyrproject.org/latest/kernel/drivers/index.html#c.DEVICE_DT_INST_DEFINE). ::: -The example `DEVICE_DT_INST_DEFINE` call can be left as is with the first parameter, the instance number, equal to `0` for behaviors that only require a single instance (e.g. external power, backlighting, accessing layers). For behaviors that can have multiple instances (e.g. hold-taps, tap-dances, sticky-keys), `DEVICE_DT_INST_DEFINE` can be placed inside a `#define` statement, usually formatted as `#define _INST(n)`, that sets up any [data pointers](#data-pointers-optional) and/or [configuration pointers](#configuration-pointers-optional) that are unique to each instance. +The example `BEHAVIOR_DT_INST_DEFINE` call can be left as is with the first parameter, the instance number, equal to `0` for behaviors that only require a single instance (e.g. external power, backlighting, accessing layers). For behaviors that can have multiple instances (e.g. hold-taps, tap-dances, sticky-keys), `BEHAVIOR_DT_INST_DEFINE` can be placed inside a `#define` statement, usually formatted as `#define _INST(n)`, that sets up any [data pointers](#data-pointers-optional) and/or [configuration pointers](#configuration-pointers-optional) that are unique to each instance. An example of this can be seen below, taking the `#define KP_INST(n)` from the hold-tap driver. @@ -266,16 +268,16 @@ An example of this can be seen below, taking the `#define KP_INST(n)` from the h .hold_trigger_key_positions = DT_INST_PROP(n, hold_trigger_key_positions), \ .hold_trigger_key_positions_len = DT_INST_PROP_LEN(n, hold_trigger_key_positions), \ }; \ - DEVICE_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, NULL, &behavior_hold_tap_config_##n, \ - APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ - &behavior_hold_tap_driver_api); + BEHAVIOR_DT_INST_DEFINE(n, behavior_hold_tap_init, NULL, NULL, &behavior_hold_tap_config_##n, \ + APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ + &behavior_hold_tap_driver_api); DT_INST_FOREACH_STATUS_OKAY(KP_INST) ``` Note that in the hold-tap example, the instance number, `0`, has been replaced by `n`, signifying the unique `node_id` of each instance of a behavior. Furthermore, the DT_INST_FOREACH_STATUS_OKAY(KP_INST) macro iterates through each compatible, non-disabled devicetree node, creating and applying the proper values to any instance-specific configurations or data by invoking the KP_INST macro for each instance of the new behavior. -Behaviors also require the following parameters of `DEVICE_DT_INST_DEFINE` to be changed: +Behaviors also require the following parameters of `BEHAVIOR_DT_INST_DEFINE` to be changed: ##### Initialization Function @@ -300,19 +302,19 @@ Comes in the form `static const struct behavior_driver_api _drive The data `struct` stores additional data required for **each new instance** of the behavior. Regardless of the instance number, `n`, `behavior__data_##n` is typically initialized as an empty `struct`. The data respective to each instance of the behavior can be accessed in functions like [`on__binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event)`](#dependencies) by extracting the behavior device from the keybind like so: ```c -const struct device *dev = device_get_binding(binding->behavior_dev); +const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); struct behavior__data *data = dev->data; ``` The variables stored inside the data `struct`, `data`, can be then modified as necessary. -The fourth cell of `DEVICE_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific data is not required. +The fourth cell of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific data is not required. ##### Configuration Pointers (Optional) -The configuration `struct` stores the properties declared from the behavior's `.yaml` for **each new instance** of the behavior. As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/latest/build/dts/api/api.html#instance-based-apis), which extract the values from the `properties` of each instance of the [devicetree binding](#creating-the-devicetree-binding-yaml) from a user's keymap or [predefined use-case `.dtsi` files](#defining-common-use-cases-for-the-behavior-dtsi-optional) stored in `app/dts/behaviors/`. We illustrate this further by comparing the [`#define KP_INST(n)` from the hold-tap driver](#device_dt_inst_define) and the [`properties` of the hold-tap devicetree binding.](#creating-the-devicetree-binding-yaml) +The configuration `struct` stores the properties declared from the behavior's `.yaml` for **each new instance** of the behavior. As seen in the `#define KP_INST(n)` of the hold-tap example, the configuration `struct`, `behavior__config_##n`, for each instance number, `n`, can be initialized using the [Zephyr Devicetree Instance-based APIs](https://docs.zephyrproject.org/latest/build/dts/api/api.html#instance-based-apis), which extract the values from the `properties` of each instance of the [devicetree binding](#creating-the-devicetree-binding-yaml) from a user's keymap or [predefined use-case `.dtsi` files](#defining-common-use-cases-for-the-behavior-dtsi-optional) stored in `app/dts/behaviors/`. We illustrate this further by comparing the [`#define KP_INST(n)` from the hold-tap driver](#behavior_dt_inst_define) and the [`properties` of the hold-tap devicetree binding.](#creating-the-devicetree-binding-yaml) -The fifth cell of `DEVICE_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific configurations are not required. +The fifth cell of `BEHAVIOR_DT_INST_DEFINE` can be set to `NULL` instead if instance-specific configurations are not required. :::caution Remember that `.c` files should be formatted according to `clang-format` to ensure that checks run smoothly once the pull request is submitted. From 23ecf081192959f66f5cc064ed81c69f2988e3e7 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 18 Nov 2023 00:47:01 -0600 Subject: [PATCH 47/65] refactor(behaviors)!: Remove labels from behaviors Removed the label property from built-in behaviors, custom behaviors defined in a few keymaps, and macros generated with ZMK_MACRO(). Now that node names are used to identify behaviors, and names only need to be unique within the set of behaviors, the names of all behaviors have been shortened to be similar to their original labels. This means that any keymaps which reference behavior nodes by name instead of by label will need to be updated. Keymaps typically use the labels though, so most keymaps should be unaffected by this change. --- app/boards/arm/ferris/ferris_rev02.keymap | 1 - app/boards/shields/cradio/cradio.keymap | 1 - .../shields/hummingbird/hummingbird.keymap | 1 - app/boards/shields/lotus58/lotus58.keymap | 3 --- app/boards/shields/qaz/qaz.keymap | 1 - app/boards/shields/tg4x/tg4x.keymap | 1 - app/dts/behaviors/backlight.dtsi | 4 ++-- app/dts/behaviors/bluetooth.dtsi | 3 +-- app/dts/behaviors/caps_word.dtsi | 3 +-- app/dts/behaviors/ext_power.dtsi | 4 ++-- app/dts/behaviors/gresc.dtsi | 1 - app/dts/behaviors/key_press.dtsi | 3 +-- app/dts/behaviors/key_repeat.dtsi | 3 +-- app/dts/behaviors/key_toggle.dtsi | 3 +-- app/dts/behaviors/layer_tap.dtsi | 3 +-- app/dts/behaviors/macros.dtsi | 24 ++++--------------- app/dts/behaviors/mod_tap.dtsi | 3 +-- app/dts/behaviors/momentary_layer.dtsi | 3 +-- app/dts/behaviors/none.dtsi | 3 +-- app/dts/behaviors/outputs.dtsi | 3 +-- app/dts/behaviors/reset.dtsi | 8 +++---- app/dts/behaviors/rgb_underglow.dtsi | 4 ++-- .../behaviors/sensor_rotate_key_press.dtsi | 3 +-- app/dts/behaviors/sticky_key.dtsi | 6 ++--- app/dts/behaviors/to_layer.dtsi | 3 +-- app/dts/behaviors/toggle_layer.dtsi | 3 +-- app/dts/behaviors/transparent.dtsi | 3 +-- app/src/behaviors/behavior_sticky_key.c | 4 +++- .../macros/basic/keycode_events.snapshot | 12 +++++----- .../press-mid-macro/keycode_events.snapshot | 8 +++---- .../timing-override/keycode_events.snapshot | 12 +++++----- .../keycode_events.snapshot | 8 +++---- 32 files changed, 54 insertions(+), 91 deletions(-) diff --git a/app/boards/arm/ferris/ferris_rev02.keymap b/app/boards/arm/ferris/ferris_rev02.keymap index 18fad42328e..dc298ec8d52 100644 --- a/app/boards/arm/ferris/ferris_rev02.keymap +++ b/app/boards/arm/ferris/ferris_rev02.keymap @@ -20,7 +20,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping_term_ms = <200>; flavor = "tap-preferred"; diff --git a/app/boards/shields/cradio/cradio.keymap b/app/boards/shields/cradio/cradio.keymap index 47bf0422a5a..ab4591babb6 100644 --- a/app/boards/shields/cradio/cradio.keymap +++ b/app/boards/shields/cradio/cradio.keymap @@ -12,7 +12,6 @@ / { behaviors { ht: hold_tap { - label = "hold_tap"; compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; flavor = "tap-preferred"; diff --git a/app/boards/shields/hummingbird/hummingbird.keymap b/app/boards/shields/hummingbird/hummingbird.keymap index 7a7171e8fb7..9f1a24c2d03 100644 --- a/app/boards/shields/hummingbird/hummingbird.keymap +++ b/app/boards/shields/hummingbird/hummingbird.keymap @@ -19,7 +19,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping_term_ms = <225>; flavor = "tap-preferred"; diff --git a/app/boards/shields/lotus58/lotus58.keymap b/app/boards/shields/lotus58/lotus58.keymap index fae463c92a8..e9846e81798 100644 --- a/app/boards/shields/lotus58/lotus58.keymap +++ b/app/boards/shields/lotus58/lotus58.keymap @@ -23,21 +23,18 @@ behaviors { fofunc: four_ffour { compatible = "zmk,behavior-mod-morph"; - label = "FOUR_FUNCFOUR"; #binding-cells = <0>; bindings = <&kp N4>, <&kp F4>; mods = <(MOD_LALT|MOD_RALT)>; }; sleft: s_left { compatible = "zmk,behavior-mod-morph"; - label = "S_LEFT"; #binding-cells = <0>; bindings = <&kp S>, <&kp LEFT>; mods = <(MOD_LGUI|MOD_RGUI)>; }; fright: f_right { compatible = "zmk,behavior-mod-morph"; - label = "R_RIGHT"; #binding-cells = <0>; bindings = <&kp F>, <&kp RIGHT>; mods = <(MOD_LGUI|MOD_RGUI)>; diff --git a/app/boards/shields/qaz/qaz.keymap b/app/boards/shields/qaz/qaz.keymap index e6794e7bcee..c887fb03329 100644 --- a/app/boards/shields/qaz/qaz.keymap +++ b/app/boards/shields/qaz/qaz.keymap @@ -16,7 +16,6 @@ behaviors { hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; #binding-cells = <2>; tapping-term-ms = <225>; flavor = "tap-preferred"; diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index 89a478ae52a..5c71ae5c91c 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -12,7 +12,6 @@ behaviors { ht: hold_tap { compatible = "zmk,behavior-hold-tap"; - label = "Hold Tap"; #binding-cells = <2>; tapping-term-ms = <200>; flavor = "tap-preferred"; diff --git a/app/dts/behaviors/backlight.dtsi b/app/dts/behaviors/backlight.dtsi index bebd6dfbf54..54c83ff44c1 100644 --- a/app/dts/behaviors/backlight.dtsi +++ b/app/dts/behaviors/backlight.dtsi @@ -6,9 +6,9 @@ / { behaviors { - /omit-if-no-ref/ bl: behavior_backlight { + // Behavior can be invoked on peripherals, so name must be <= 8 characters. + /omit-if-no-ref/ bl: bcklight { compatible = "zmk,behavior-backlight"; - label = "BCKLGHT"; #binding-cells = <2>; }; }; diff --git a/app/dts/behaviors/bluetooth.dtsi b/app/dts/behaviors/bluetooth.dtsi index a49ff4d6f30..40557b7a28c 100644 --- a/app/dts/behaviors/bluetooth.dtsi +++ b/app/dts/behaviors/bluetooth.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ bt: behavior_bluetooth { + /omit-if-no-ref/ bt: bluetooth { compatible = "zmk,behavior-bluetooth"; - label = "BLUETOOTH"; #binding-cells = <2>; }; }; diff --git a/app/dts/behaviors/caps_word.dtsi b/app/dts/behaviors/caps_word.dtsi index 219300dc282..795fbc08439 100644 --- a/app/dts/behaviors/caps_word.dtsi +++ b/app/dts/behaviors/caps_word.dtsi @@ -8,9 +8,8 @@ / { behaviors { - /omit-if-no-ref/ caps_word: behavior_caps_word { + /omit-if-no-ref/ caps_word: caps_word { compatible = "zmk,behavior-caps-word"; - label = "CAPS_WORD"; #binding-cells = <0>; continue-list = ; }; diff --git a/app/dts/behaviors/ext_power.dtsi b/app/dts/behaviors/ext_power.dtsi index f61170dd5f3..2ae1daf84a8 100644 --- a/app/dts/behaviors/ext_power.dtsi +++ b/app/dts/behaviors/ext_power.dtsi @@ -6,9 +6,9 @@ / { behaviors { - ext_power: behavior_ext_power { + // Behavior can be invoked on peripherals, so name must be <= 8 characters. + ext_power: extpower { compatible = "zmk,behavior-ext-power"; - label = "EXTPOWER"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/gresc.dtsi b/app/dts/behaviors/gresc.dtsi index fa4c685b7df..59a7329178f 100644 --- a/app/dts/behaviors/gresc.dtsi +++ b/app/dts/behaviors/gresc.dtsi @@ -10,7 +10,6 @@ behaviors { /omit-if-no-ref/ gresc: grave_escape { compatible = "zmk,behavior-mod-morph"; - label = "GRAVE_ESCAPE"; #binding-cells = <0>; bindings = <&kp ESC>, <&kp GRAVE>; mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; diff --git a/app/dts/behaviors/key_press.dtsi b/app/dts/behaviors/key_press.dtsi index b0fc2db1017..ddaf7eed374 100644 --- a/app/dts/behaviors/key_press.dtsi +++ b/app/dts/behaviors/key_press.dtsi @@ -7,9 +7,8 @@ / { behaviors { /* DEPRECATED: `cp` will be removed in the future */ - /omit-if-no-ref/ cp: kp: behavior_key_press { + /omit-if-no-ref/ cp: kp: key_press { compatible = "zmk,behavior-key-press"; - label = "KEY_PRESS"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/key_repeat.dtsi b/app/dts/behaviors/key_repeat.dtsi index 795a77f6210..88910f6271c 100644 --- a/app/dts/behaviors/key_repeat.dtsi +++ b/app/dts/behaviors/key_repeat.dtsi @@ -8,9 +8,8 @@ / { behaviors { - /omit-if-no-ref/ key_repeat: behavior_key_repeat { + /omit-if-no-ref/ key_repeat: key_repeat { compatible = "zmk,behavior-key-repeat"; - label = "KEY_REPEAT"; #binding-cells = <0>; usage-pages = ; }; diff --git a/app/dts/behaviors/key_toggle.dtsi b/app/dts/behaviors/key_toggle.dtsi index df581014e08..a3e3f36f270 100644 --- a/app/dts/behaviors/key_toggle.dtsi +++ b/app/dts/behaviors/key_toggle.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ kt: behavior_key_toggle { + /omit-if-no-ref/ kt: key_toggle { compatible = "zmk,behavior-key-toggle"; - label = "KEY_TOGGLE"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/layer_tap.dtsi b/app/dts/behaviors/layer_tap.dtsi index 1d92245c643..dc953e9358b 100644 --- a/app/dts/behaviors/layer_tap.dtsi +++ b/app/dts/behaviors/layer_tap.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ lt: behavior_layer_tap { + /omit-if-no-ref/ lt: layer_tap { compatible = "zmk,behavior-hold-tap"; - label = "LAYER_TAP"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; diff --git a/app/dts/behaviors/macros.dtsi b/app/dts/behaviors/macros.dtsi index 36b4a8d33f3..44bc7ab777f 100644 --- a/app/dts/behaviors/macros.dtsi +++ b/app/dts/behaviors/macros.dtsi @@ -5,10 +5,8 @@ */ #define MACRO_PLACEHOLDER 0 -#define ZMK_MACRO_STRINGIFY(x) #x #define ZMK_MACRO(name,...) \ name: name { \ - label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ compatible = "zmk,behavior-macro"; \ #binding-cells = <0>; \ __VA_ARGS__ \ @@ -16,7 +14,6 @@ name: name { \ #define ZMK_MACRO1(name,...) \ name: name { \ - label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ compatible = "zmk,behavior-macro-one-param"; \ #binding-cells = <1>; \ __VA_ARGS__ \ @@ -24,7 +21,6 @@ name: name { \ #define ZMK_MACRO2(name,...) \ name: name { \ - label = ZMK_MACRO_STRINGIFY(ZM_ ## name); \ compatible = "zmk,behavior-macro-two-param"; \ #binding-cells = <2>; \ __VA_ARGS__ \ @@ -32,63 +28,53 @@ name: name { \ / { behaviors { - macro_tap: macro_control_mode_tap { + macro_tap: macro_tap { compatible = "zmk,macro-control-mode-tap"; - label = "MAC_TAP"; #binding-cells = <0>; }; - macro_press: macro_control_mode_press { + macro_press: macro_press { compatible = "zmk,macro-control-mode-press"; - label = "MAC_PRESS"; #binding-cells = <0>; }; - macro_release: macro_control_mode_release { + macro_release: macro_release { compatible = "zmk,macro-control-mode-release"; - label = "MAC_REL"; #binding-cells = <0>; }; - macro_tap_time: macro_control_tap_time { + macro_tap_time: macro_tap_time { compatible = "zmk,macro-control-tap-time"; - label = "MAC_TAP_TIME"; #binding-cells = <1>; }; - macro_wait_time: macro_control_wait_time { + macro_wait_time: macro_wait_time { compatible = "zmk,macro-control-wait-time"; - label = "MAC_WAIT_TIME"; #binding-cells = <1>; }; macro_pause_for_release: macro_pause_for_release { compatible = "zmk,macro-pause-for-release"; - label = "MAC_WAIT_REL"; #binding-cells = <0>; }; macro_param_1to1: macro_param_1to1 { compatible = "zmk,macro-param-1to1"; - label = "MAC_PARAM_1TO1"; #binding-cells = <0>; }; macro_param_1to2: macro_param_1to2 { compatible = "zmk,macro-param-1to2"; - label = "MAC_PARAM_1TO2"; #binding-cells = <0>; }; macro_param_2to1: macro_param_2to1 { compatible = "zmk,macro-param-2to1"; - label = "MAC_PARAM_2TO1"; #binding-cells = <0>; }; macro_param_2to2: macro_param_2to2 { compatible = "zmk,macro-param-2to2"; - label = "MAC_PARAM_2TO2"; #binding-cells = <0>; }; }; diff --git a/app/dts/behaviors/mod_tap.dtsi b/app/dts/behaviors/mod_tap.dtsi index d441a4f1157..38bb34fe5c4 100644 --- a/app/dts/behaviors/mod_tap.dtsi +++ b/app/dts/behaviors/mod_tap.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ mt: behavior_mod_tap { + /omit-if-no-ref/ mt: mod_tap { compatible = "zmk,behavior-hold-tap"; - label = "MOD_TAP"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <200>; diff --git a/app/dts/behaviors/momentary_layer.dtsi b/app/dts/behaviors/momentary_layer.dtsi index d1c91232f1d..6d85165dbb3 100644 --- a/app/dts/behaviors/momentary_layer.dtsi +++ b/app/dts/behaviors/momentary_layer.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ mo: behavior_momentary_layer { + /omit-if-no-ref/ mo: momentary_layer { compatible = "zmk,behavior-momentary-layer"; - label = "MO"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/none.dtsi b/app/dts/behaviors/none.dtsi index fc4890c3911..13d056f0cf2 100644 --- a/app/dts/behaviors/none.dtsi +++ b/app/dts/behaviors/none.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ none: behavior_none { + /omit-if-no-ref/ none: none { compatible = "zmk,behavior-none"; - label = "NONE"; #binding-cells = <0>; }; }; diff --git a/app/dts/behaviors/outputs.dtsi b/app/dts/behaviors/outputs.dtsi index 88e8f88275f..f7737196719 100644 --- a/app/dts/behaviors/outputs.dtsi +++ b/app/dts/behaviors/outputs.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ out: behavior_outputs { + /omit-if-no-ref/ out: outputs { compatible = "zmk,behavior-outputs"; - label = "OUTPUTS"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/reset.dtsi b/app/dts/behaviors/reset.dtsi index 2e775269aff..e407b107b90 100644 --- a/app/dts/behaviors/reset.dtsi +++ b/app/dts/behaviors/reset.dtsi @@ -8,15 +8,15 @@ / { behaviors { - sys_reset: behavior_reset { + // Behavior can be invoked on peripherals, so name must be <= 8 characters. + sys_reset: sysreset { compatible = "zmk,behavior-reset"; - label = "SYSRESET"; #binding-cells = <0>; }; - bootloader: behavior_reset_dfu { + // Behavior can be invoked on peripherals, so name must be <= 8 characters. + bootloader: bootload { compatible = "zmk,behavior-reset"; - label = "BOOTLOAD"; type = ; #binding-cells = <0>; }; diff --git a/app/dts/behaviors/rgb_underglow.dtsi b/app/dts/behaviors/rgb_underglow.dtsi index 6ffec2e6767..969518a6ff3 100644 --- a/app/dts/behaviors/rgb_underglow.dtsi +++ b/app/dts/behaviors/rgb_underglow.dtsi @@ -6,9 +6,9 @@ / { behaviors { - rgb_ug: behavior_rgb_underglow { + // Behavior can be invoked on peripherals, so name must be <= 8 characters. + rgb_ug: rgb_ug { compatible = "zmk,behavior-rgb-underglow"; - label = "RGB_UG"; #binding-cells = <2>; }; }; diff --git a/app/dts/behaviors/sensor_rotate_key_press.dtsi b/app/dts/behaviors/sensor_rotate_key_press.dtsi index dc30b7989b7..d9bdbfe543b 100644 --- a/app/dts/behaviors/sensor_rotate_key_press.dtsi +++ b/app/dts/behaviors/sensor_rotate_key_press.dtsi @@ -7,9 +7,8 @@ / { behaviors { /* DEPRECATED: `inc_dec_cp` will be removed in the future */ - /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { + /omit-if-no-ref/ inc_dec_cp: inc_dec_kp: enc_key_press { compatible = "zmk,behavior-sensor-rotate-var"; - label = "ENC_KEY_PRESS"; #sensor-binding-cells = <2>; bindings = <&kp>, <&kp>; }; diff --git a/app/dts/behaviors/sticky_key.dtsi b/app/dts/behaviors/sticky_key.dtsi index 72a80a903a1..c8973d4df2c 100644 --- a/app/dts/behaviors/sticky_key.dtsi +++ b/app/dts/behaviors/sticky_key.dtsi @@ -6,17 +6,15 @@ / { behaviors { - /omit-if-no-ref/ sk: behavior_sticky_key { + /omit-if-no-ref/ sk: sticky_key { compatible = "zmk,behavior-sticky-key"; - label = "STICKY_KEY"; #binding-cells = <1>; release-after-ms = <1000>; bindings = <&kp>; ignore-modifiers; }; - /omit-if-no-ref/ sl: behavior_sticky_layer { + /omit-if-no-ref/ sl: sticky_layer { compatible = "zmk,behavior-sticky-key"; - label = "STICKY_LAYER"; #binding-cells = <1>; release-after-ms = <1000>; bindings = <&mo>; diff --git a/app/dts/behaviors/to_layer.dtsi b/app/dts/behaviors/to_layer.dtsi index 0ea66fa9e3b..904f023da53 100644 --- a/app/dts/behaviors/to_layer.dtsi +++ b/app/dts/behaviors/to_layer.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ to: behavior_to_layer { + /omit-if-no-ref/ to: to_layer { compatible = "zmk,behavior-to-layer"; - label = "TO_LAYER"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/toggle_layer.dtsi b/app/dts/behaviors/toggle_layer.dtsi index 75730934e49..05f2988e08c 100644 --- a/app/dts/behaviors/toggle_layer.dtsi +++ b/app/dts/behaviors/toggle_layer.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ tog: behavior_toggle_layer { + /omit-if-no-ref/ tog: toggle_layer { compatible = "zmk,behavior-toggle-layer"; - label = "TOGGLE_LAYER"; #binding-cells = <1>; }; }; diff --git a/app/dts/behaviors/transparent.dtsi b/app/dts/behaviors/transparent.dtsi index 0dfaade29ca..3586f02afab 100644 --- a/app/dts/behaviors/transparent.dtsi +++ b/app/dts/behaviors/transparent.dtsi @@ -6,9 +6,8 @@ / { behaviors { - /omit-if-no-ref/ trans: behavior_transparent { + /omit-if-no-ref/ trans: transparent { compatible = "zmk,behavior-transparent"; - label = "TRANS"; #binding-cells = <0>; }; }; diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index c6731d32040..67f7728628e 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -24,6 +24,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) +#define KEY_PRESS DEVICE_DT_NAME(DT_INST(0, zmk_behavior_key_press)) + #define ZMK_BHV_STICKY_KEY_MAX_HELD 10 #define ZMK_BHV_STICKY_KEY_POSITION_FREE UINT32_MAX @@ -202,7 +204,7 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) { continue; } - if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 && + if (strcmp(sticky_key->config->behavior.behavior_dev, KEY_PRESS) == 0 && ZMK_HID_USAGE_ID(sticky_key->param1) == ev_copy.keycode && ZMK_HID_USAGE_PAGE(sticky_key->param1) == ev_copy.usage_page && SELECT_MODS(sticky_key->param1) == ev_copy.implicit_modifiers) { diff --git a/app/tests/macros/basic/keycode_events.snapshot b/app/tests/macros/basic/keycode_events.snapshot index b238a2fff23..5639f1d73b0 100644 --- a/app/tests/macros/basic/keycode_events.snapshot +++ b/app/tests/macros/basic/keycode_events.snapshot @@ -1,18 +1,18 @@ -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms diff --git a/app/tests/macros/press-mid-macro/keycode_events.snapshot b/app/tests/macros/press-mid-macro/keycode_events.snapshot index 22393a3ad63..0ec7ccb3cd6 100644 --- a/app/tests/macros/press-mid-macro/keycode_events.snapshot +++ b/app/tests/macros/press-mid-macro/keycode_events.snapshot @@ -1,8 +1,8 @@ -pos_state: layer: 0 position: 0, binding name: ZM_abc_macro +pos_state: layer: 0 position: 0, binding name: abc_macro kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 -pos_state: layer: 0 position: 0, binding name: ZM_abc_macro -pos_state: layer: 0 position: 1, binding name: MO -pos_state: layer: 0 position: 1, binding name: MO +pos_state: layer: 0 position: 0, binding name: abc_macro +pos_state: layer: 0 position: 1, binding name: momentary_layer +pos_state: layer: 0 position: 1, binding name: momentary_layer kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 diff --git a/app/tests/macros/timing-override/keycode_events.snapshot b/app/tests/macros/timing-override/keycode_events.snapshot index 0ff45904b25..e275cf9b39f 100644 --- a/app/tests/macros/timing-override/keycode_events.snapshot +++ b/app/tests/macros/timing-override/keycode_events.snapshot @@ -1,18 +1,18 @@ -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_pressed: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 30ms -queue_process_next: Invoking KEY_PRESS: 0x70004 0x00 +queue_process_next: Invoking key_press: 0x70004 0x00 kp_released: usage_page 0x07 keycode 0x04 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_pressed: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 20ms -queue_process_next: Invoking KEY_PRESS: 0x70005 0x00 +queue_process_next: Invoking key_press: 0x70005 0x00 kp_released: usage_page 0x07 keycode 0x05 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_pressed: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 20ms -queue_process_next: Invoking KEY_PRESS: 0x70006 0x00 +queue_process_next: Invoking key_press: 0x70006 0x00 kp_released: usage_page 0x07 keycode 0x06 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 50ms diff --git a/app/tests/macros/wait-macro-release/keycode_events.snapshot b/app/tests/macros/wait-macro-release/keycode_events.snapshot index 21d47a29991..abe9791f701 100644 --- a/app/tests/macros/wait-macro-release/keycode_events.snapshot +++ b/app/tests/macros/wait-macro-release/keycode_events.snapshot @@ -1,16 +1,16 @@ qm: Iterating macro bindings - starting: 0, count: 4 -queue_process_next: Invoking KEY_PRESS: 0x700e2 0x00 +queue_process_next: Invoking key_press: 0x700e2 0x00 kp_pressed: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms -queue_process_next: Invoking KEY_PRESS: 0x7002b 0x00 +queue_process_next: Invoking key_press: 0x7002b 0x00 kp_pressed: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 40ms -queue_process_next: Invoking KEY_PRESS: 0x7002b 0x00 +queue_process_next: Invoking key_press: 0x7002b 0x00 kp_released: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 10ms kp_pressed: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 kp_released: usage_page 0x07 keycode 0x2B implicit_mods 0x00 explicit_mods 0x00 qm: Iterating macro bindings - starting: 5, count: 2 -queue_process_next: Invoking KEY_PRESS: 0x700e2 0x00 +queue_process_next: Invoking key_press: 0x700e2 0x00 kp_released: usage_page 0x07 keycode 0xE2 implicit_mods 0x00 explicit_mods 0x00 queue_process_next: Processing next queued behavior in 0ms From 0fd8e25807b15eaac8edf818d46be8d004885f62 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 18 Nov 2023 19:49:49 -0600 Subject: [PATCH 48/65] docs: Document behavior name length limit Added a section to the new behavior guide to document that the names of behaviors invoked on the peripheral side of a split must be at most 8 characters long. --- docs/docs/development/new-behavior.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs/development/new-behavior.md b/docs/docs/development/new-behavior.md index 129ba324817..59872963f10 100644 --- a/docs/docs/development/new-behavior.md +++ b/docs/docs/development/new-behavior.md @@ -380,7 +380,20 @@ For the purpose of this section, we will discuss the structure of `app/dts/behav }; ``` -The format of a behavior's `.dtsi` file is identical to declaring an instance of the behavior in a user's keymap. The only major difference is that the value `/omit-if-no-ref/` should be placed adjacent to the name of the behavior, as seen in line 11 of the `gresc` example. +The format of a behavior's `.dtsi` file is identical to declaring an instance of the behavior in a user's keymap. The only major difference is that the value `/omit-if-no-ref/` should be placed adjacent to the label and name of the behavior, as seen in line 11 of the `gresc` example. + +:::caution + +If your behavior has its [`locality`](#api-structure) property set to anything other than `BEHAVIOR_LOCALITY_CENTRAL`, then the name of the node must be at most 8 characters long, or it will fail to be invoked on the peripheral half of a split keyboard. + +In the above example, `grave_escape` is too long, so it would need to be shortened, e.g. + +```dts +// Behavior can be invoked on peripherals, so name must be <= 8 characters. +/omit-if-no-ref/ gresc: gresc { ... }; +``` + +::: After creating the `.dtsi` from above, update `app/dts/behaviors.dtsi` to include your newly predefined behavior instance, making it accessible by the devicetree. From 17a6f0b1285030d2d2b5a7d5197a91ec0aae7aff Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Mon, 4 Dec 2023 18:31:42 -0600 Subject: [PATCH 49/65] refactor: Remove new uses of label property Removed new uses of the "label" property which were introduced after the previous commits on this branch were written. --- app/boards/arm/adv360pro/adv360pro.dtsi | 6 ------ app/boards/nrf52_bsim.overlay | 1 - app/dts/behaviors/mouse_key_press.dtsi | 3 +-- .../bond-clear-then-bond-second-client/nrf52_bsim.keymap | 1 - .../ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap | 1 - .../connnect-and-output-to-selection/nrf52_bsim.keymap | 1 - .../profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap | 1 - .../nrf52_bsim.keymap | 1 - .../reconnect-then-output-to-selection/nrf52_bsim.keymap | 1 - 9 files changed, 1 insertion(+), 15 deletions(-) diff --git a/app/boards/arm/adv360pro/adv360pro.dtsi b/app/boards/arm/adv360pro/adv360pro.dtsi index 85ff5d1cfd1..c837e518458 100644 --- a/app/boards/arm/adv360pro/adv360pro.dtsi +++ b/app/boards/arm/adv360pro/adv360pro.dtsi @@ -46,7 +46,6 @@ }; ext-power { compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; @@ -107,11 +106,9 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "softdevice"; reg = <0x00000000 0x00026000>; }; code_partition: partition@26000 { - label = "code_partition"; reg = <0x00026000 0x000c6000>; }; @@ -125,12 +122,10 @@ * if enabled. */ storage_partition: partition@ec000 { - label = "storage"; reg = <0x000ec000 0x00008000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; @@ -145,7 +140,6 @@ led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; - label = "WS2812"; /* SPI */ reg = <0>; diff --git a/app/boards/nrf52_bsim.overlay b/app/boards/nrf52_bsim.overlay index 482b048604a..ec7c49ae92a 100644 --- a/app/boards/nrf52_bsim.overlay +++ b/app/boards/nrf52_bsim.overlay @@ -9,7 +9,6 @@ kscan: kscan { compatible = "zmk,kscan-mock"; - label = "KSCAN_MOCK"; rows = <2>; columns = <2>; diff --git a/app/dts/behaviors/mouse_key_press.dtsi b/app/dts/behaviors/mouse_key_press.dtsi index 9cc16e81e75..975c24aaafb 100644 --- a/app/dts/behaviors/mouse_key_press.dtsi +++ b/app/dts/behaviors/mouse_key_press.dtsi @@ -1,8 +1,7 @@ / { behaviors { - /omit-if-no-ref/ mkp: behavior_mouse_key_press { + /omit-if-no-ref/ mkp: mouse_key_press { compatible = "zmk,behavior-mouse-key-press"; - label = "MOUSE_KEY_PRESS"; #binding-cells = <1>; }; }; diff --git a/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap b/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap index 3ddf226fc86..36eba046e03 100644 --- a/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/bond-clear-then-bond-second-client/nrf52_bsim.keymap @@ -14,7 +14,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap b/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap index b13fe6f9dd8..45e2aea0b1e 100644 --- a/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/bond-to-cleared-profile/nrf52_bsim.keymap @@ -14,7 +14,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap b/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap index 789cec44337..7c67425e6a2 100644 --- a/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/connnect-and-output-to-selection/nrf52_bsim.keymap @@ -14,7 +14,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap b/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap index 789cec44337..7c67425e6a2 100644 --- a/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/dont-bond-to-taken-profile/nrf52_bsim.keymap @@ -14,7 +14,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap index cc1420ee5ca..de6884ae11d 100644 --- a/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/first-and-second-profile-paired-then-send-data/nrf52_bsim.keymap @@ -16,7 +16,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < diff --git a/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap b/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap index 789cec44337..7c67425e6a2 100644 --- a/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap +++ b/app/tests/ble/profiles/reconnect-then-output-to-selection/nrf52_bsim.keymap @@ -14,7 +14,6 @@ / { keymap { compatible = "zmk,keymap"; - label = "Default keymap"; default_layer { bindings = < From 0ab6a0ad11d0eb65f2cdca959a840e3331aa599a Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 4 Dec 2023 19:11:12 +0000 Subject: [PATCH 50/65] feat(bt): Add new experimental Kconfig setting. * In order to have an easy way to test and phase in BT changes, add a new `ZMK_BLE_EXPERIMENTAL_FEATURES` Kconfig setting. --- app/Kconfig | 20 +++++++++++++++----- docs/docs/config/bluetooth.md | 9 +++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 63eff2ad4be..fff63a5b9fc 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -142,6 +142,21 @@ menuconfig ZMK_BLE if ZMK_BLE +config ZMK_BLE_EXPERIMENTAL_FEATURES + bool "Experimental: Enable experimental/advanced BLE settings/features" + select ZMK_BLE_PASSKEY_ENTRY + select BT_GATT_AUTO_SEC_REQ + select BT_SMP_ALLOW_UNAUTH_OVERWRITE + help + Enables a combination of settings that are planned to be default in future versions of ZMK. + This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, + and allowing overwrite of keys from previously paired hosts. + +config ZMK_BLE_PASSKEY_ENTRY + bool "Require passkey entry on the keyboard to complete pairing" + default n + select RING_BUFFER + # BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI config BT_TINYCRYPT_ECC default y if BT_HCI && !BT_CTLR @@ -189,11 +204,6 @@ config BT_GATT_AUTO_SEC_REQ config BT_DEVICE_APPEARANCE default 961 -config ZMK_BLE_PASSKEY_ENTRY - bool "Require passkey entry on the keyboard to complete pairing" - default n - select RING_BUFFER - config BT_PERIPHERAL_PREF_MIN_INT default 6 diff --git a/docs/docs/config/bluetooth.md b/docs/docs/config/bluetooth.md index d2ddefddbd1..f957b77e3a6 100644 --- a/docs/docs/config/bluetooth.md +++ b/docs/docs/config/bluetooth.md @@ -9,7 +9,8 @@ See [Configuration Overview](index.md) for instructions on how to change these s ## Kconfig -| Option | Type | Description | Default | -| ------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | -| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | +| Option | Type | Description | Default | +| -------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | +| `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, and allowing overwrite of keys from previously paired hosts. | n | +| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | +| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | From efd403a56773a59c01478037c5739ff6c35c9de8 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 6 Nov 2023 17:59:01 +0000 Subject: [PATCH 51/65] refactor: Hook into CMake loading in a better spot. * Shift to using an extra Zephyr module to do keymap location work after all board roots are resolved. This avoids duplicate work and allows us to load custom boards from Zephyr modules as well as user config setups. --- app/CMakeLists.txt | 9 +-------- .../modules/modules.cmake} | 2 -- app/keymap-module/zephyr/module.yml | 5 +++++ 3 files changed, 6 insertions(+), 10 deletions(-) rename app/{cmake/ZephyrBuildConfig.cmake => keymap-module/modules/modules.cmake} (99%) create mode 100644 app/keymap-module/zephyr/module.yml diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 433f2376b7b..40c654dbaa8 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -2,14 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) set(CONFIG_APPLICATION_DEFINED_SYSCALL true) -# Add our custom Zephyr module for drivers w/ syscalls, etc. -list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr) - -set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake) - -list(APPEND ZEPHYR_EXTRA_MODULES - ${CMAKE_CURRENT_SOURCE_DIR}/module -) +set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module") # Find Zephyr. This also loads Zephyr's build system. find_package(Zephyr REQUIRED HINTS ../zephyr) diff --git a/app/cmake/ZephyrBuildConfig.cmake b/app/keymap-module/modules/modules.cmake similarity index 99% rename from app/cmake/ZephyrBuildConfig.cmake rename to app/keymap-module/modules/modules.cmake index ade341990a0..e260da8fc37 100644 --- a/app/cmake/ZephyrBuildConfig.cmake +++ b/app/keymap-module/modules/modules.cmake @@ -5,8 +5,6 @@ # * single overlay, # * or per board/shield. -cmake_minimum_required(VERSION 3.15) - list(APPEND BOARD_ROOT ${APPLICATION_SOURCE_DIR}) list(APPEND DTS_ROOT ${APPLICATION_SOURCE_DIR}) diff --git a/app/keymap-module/zephyr/module.yml b/app/keymap-module/zephyr/module.yml new file mode 100644 index 00000000000..9daa3a18e44 --- /dev/null +++ b/app/keymap-module/zephyr/module.yml @@ -0,0 +1,5 @@ +# This ensures our modules/modules.cmake file is loaded *after* all the other modules, +# To set up the various keymap DTS and overridden .conf files are located and chosen. +build: + settings: + module_ext_root: "." From 3656ec63d01ef99258ed7c4ee6cb7132898ac71e Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sat, 25 Nov 2023 00:55:11 +0000 Subject: [PATCH 52/65] feat(build): Build unified config/mod repos. * Detect in our build script if our config repo is *also* a Zephyr module and if so pass to ZMK build in ZMK_EXTRA_MODULES define. * Copy config directory contents to new independent temp workspace to avoid Kconfig conflicts between the build repo's zephyr module directory and the checkout zephyr pulled in by `west update`. --- .github/workflows/build-user-config.yml | 64 ++++++++++++++++--------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 7373c9ff4c5..d6fbaa5ca68 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -52,6 +52,13 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }} steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Create build directory + run: | + echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV + - name: Prepare variables shell: sh -x {0} env: @@ -59,13 +66,22 @@ jobs: shield: ${{ matrix.shield }} artifact_name: ${{ matrix.artifact-name }} run: | + export new_tmp_dir=$(mktemp -d) + echo "tmp_dir=${new_tmp_dir}" >> $GITHUB_ENV + echo "tmp_config_dir=${new_tmp_dir}/config" >> $GITHUB_ENV + if [ -e zephyr/module.yml ]; then + export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'" + fi + echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV - echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV + echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV - - name: Checkout - uses: actions/checkout@v3 + - name: Copy config files to isolated temporary directory + run: | + mkdir "${{ env.tmp_config_dir }}" + cp -R ${{ inputs.config_path }}/* "${{ env.tmp_config_dir }}/" - name: Cache west modules uses: actions/cache@v3.0.11 @@ -74,11 +90,11 @@ jobs: cache_name: cache-zephyr-${{ env.zephyr_version }}-modules with: path: | - modules/ - tools/ - zephyr/ - bootloader/ - zmk/ + ${{ env.tmp_dir }}/modules/ + ${{ env.tmp_dir }}/tools/ + ${{ env.tmp_dir }}/zephyr/ + ${{ env.tmp_dir }}/bootloader/ + ${{ env.tmp_dir }}/zmk/ key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache_name }}- @@ -86,23 +102,27 @@ jobs: ${{ runner.os }}- - name: West Init - run: west init -l "${{ inputs.config_path }}" + working-directory: ${{ env.tmp_dir }} + run: west init -l "${{ env.tmp_config_dir }}" - name: West Update + working-directory: ${{ env.tmp_dir }} run: west update - name: West Zephyr export + working-directory: ${{ env.tmp_dir }} run: west zephyr-export - name: West Build (${{ env.display_name }}) + working-directory: ${{ env.tmp_dir }} shell: sh -x {0} - run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} + run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.tmp_config_dir }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} - name: ${{ env.display_name }} Kconfig file run: | - if [ -f build/zephyr/.config ] + if [ -f "${{ env.build_dir }}/zephyr/.config" ] then - grep -v -e "^#" -e "^$" build/zephyr/.config | sort + grep -v -e "^#" -e "^$" "${{ env.build_dir }}/zephyr/.config" | sort else echo "No Kconfig output" fi @@ -110,12 +130,12 @@ jobs: - name: ${{ env.display_name }} Devicetree file run: | - if [ -f build/zephyr/zephyr.dts ] + if [ -f "${{ env.build_dir }}/zephyr/zephyr.dts" ] then - cat build/zephyr/zephyr.dts - elif [ -f build/zephyr/zephyr.dts.pre ] + cat "${{ env.build_dir }}/zephyr/zephyr.dts" + elif [ -f "${{ env.build_dir }}/zephyr/zephyr.dts.pre" ] then - cat -s build/zephyr/zephyr.dts.pre + cat -s "${{ env.build_dir }}/zephyr/zephyr.dts.pre" else echo "No Devicetree output" fi @@ -124,17 +144,17 @@ jobs: - name: Rename artifacts shell: sh -x {0} run: | - mkdir build/artifacts - if [ -f build/zephyr/zmk.uf2 ] + mkdir "${{ env.build_dir }}/artifacts" + if [ -f "${{ env.build_dir }}/zephyr/zmk.uf2" ] then - cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2" - elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ] + cp "${{ env.build_dir }}/zephyr/zmk.uf2" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.uf2" + elif [ -f "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" ] then - cp "build/zephyr/zmk.${{ inputs.fallback_binary }}" "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}" + cp "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}" fi - name: Archive (${{ env.display_name }}) uses: actions/upload-artifact@v3 with: name: ${{ inputs.archive_name }} - path: build/artifacts + path: ${{ env.build_dir }}/artifacts From 291bbc22572fb91cc4c773cf7d6b0e88f49eee38 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 27 Nov 2023 01:57:17 +0000 Subject: [PATCH 53/65] refactor(docs): New shield guide to suggest modules * Update the new shield guide to position Zephyr module location as the default when creating new shields, with a note about using ZMK repository itself as a last resort. * Document building with additional Zephyr modules. Co-authored-by: Cem Aksoylar --- docs/docs/development/build-flash.md | 16 ++++ docs/docs/development/new-shield.md | 115 ++++++++++++++++++++++----- 2 files changed, 110 insertions(+), 21 deletions(-) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index 0243983c9d8..1699ac5ce4c 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -92,6 +92,22 @@ This produces `left` and `right` subfolders under the `build` directory and two Build times can be significantly reduced after the initial build by omitting all build arguments except the build directory, e.g. `west build -d build/left`. The additional options and intermediate build outputs from your initial build are cached and reused for unchanged files. ::: +### Building with external modules + +ZMK supports loading additional boards, shields, code, etc. from [external Zephyr modules](https://docs.zephyrproject.org/3.2.0/develop/modules.html), facilitating out-of-tree management and versioning independent of the ZMK repository. To build with any additional modules, use the `ZMK_EXTRA_MODULES` define added to your `west build` command. + +For instance, building with the `my-vendor-keebs-module` checked out to your documents directory, you would build like: + +``` +west build -b nice_nano_v2 -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module" +``` + +When adding multiple modules, make sure they are separated by a semicolon, e.g.: + +``` +west build -b nice_nano_v2 -- -DSHIELD=vendor_shield -DZMK_EXTRA_MODULES="C:/Users/myUser/Documents/my-vendor-keebs-module;C:/Users/myUser/Documents/my-other-keebs-module" +``` + ### Building from `zmk-config` Folder Instead of building .uf2 files using the default keymap and config files, you can build directly from your [`zmk-config` folder](../user-setup.md#github-repo) by adding diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 748cb9a241c..291a7f63e85 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -11,37 +11,58 @@ import Metadata from "@site/src/data/hardware-metadata.json"; ## Overview -This guide will walk through the steps necessary to add ZMK support for a keyboard the uses a (Pro Micro compatible) addon MCU board to provide the microprocessor. +This guide will walk through the steps necessary to add ZMK support for a keyboard that uses an add-on MCU board (e.g. Pro Micro compatible) to provide the microprocessor. + The high level steps are: +- From a template, create a new [Zephyr module](https://docs.zephyrproject.org/3.2.0/develop/modules.html) housed in a git repository containing one or more custom shields. - Create a new shield directory. - Add the base Kconfig files. - Add the shield overlay file to define the KSCAN driver for detecting key press/release. - (Optional) Add the matrix transform for mapping KSCAN row/column values to sane key positions. This is needed for non-rectangular keyboards, or where the underlying row/column pin arrangement does not map one to one with logical locations on the keyboard. - Add a default keymap, which users can override in their own configs as needed. +- Add a `.zmk.yml` metadata file to document the high level details of your shield, and the features it supports. +- Update the `build.yaml` file from the repository template to have some sample builds of the firmware to test. - Add support for features such as encoders, OLED displays, or RGB underglow. -It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/2.5.0/guides/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. +It may be helpful to review the upstream [shields documentation](https://docs.zephyrproject.org/3.2.0/guides/porting/shields.html#shields) to get a proper understanding of the underlying system before continuing. :::note ZMK support for split keyboards requires a few more files than single boards to ensure proper connectivity between the central and peripheral units. Check the following guides thoroughly to ensure that all the files are in place. ::: +## New Zephyr Module Repository + +The first step to creating the shield is to create a new Zephyr module repository from a template. + +:::note +This guide assumes you already have a configured GitHub account. If you don't yet have one, go ahead and [sign up](https://github.com/join) before continuing. +::: + +Follow these steps to create your new repository: + +- Visit https://github.com/zmkfirmware/unified-zmk-config-template +- Click the green "Use this template" button +- In the drop down that opens, click "Use this template". +- In the following screen, provide the following information: + - A repository name, e.g. `my-shield-module`. + - A brief description, e.g. `ZMK Support For MyShield Keyboard`. + - Select Public or Private, depending on your preference. +- Click the green "Create repository" button + ## New Shield Directory :::note -This guide describes how to add shield to the ZMK main repository. If you are building firmware for your -own prototype or handwired keyboard, it is recommended to use your own user config repository. Follow the -[user setup guide](user-setup.md) to create your user config repository first. When following the rest -of this guide, replace the `app/` directory in the ZMK main repository with the `config/` directory in your -user config repository. For example, `app/boards/shields/` should now be -`config/boards/shields/`. +This guide describes how to add a shield to an independently managed Zephyr module repository. This is the +preferred way to handle boards and shields moving forward in ZMK, although the tooling to make this easier +for users is still improving. ZMK does have a collection of boards/shields in the ZMK main repository, which are planned to be phased out, but until that is complete, there _may_ be a few select scenarios where adding your keyboard to ZMK itself is preferred. Due the volume of PRs and the focus of ZMK development not being merging of keyboard PRs, you are highly encouraged to use an out-of-tree Zephyr module repository to manage your definitions. Should you choose to try to get your keyboard included in ZMK main repository, the paths in the rest of the guide would be nested under the `app/` folder there instead. For example, `boards/shields/` should now be +`app/boards/shields/`. ::: -Shields for Zephyr applications go into the `boards/shields/` directory; since ZMK's Zephyr application lives in the `app/` subdirectory of the repository, that means the new shield directory should be: +Shields in Zephyr module "board root" go into the `boards/shields/` directory; that means the new shield directory in your module repository should be: ```bash -mkdir app/boards/shields/ +mkdir boards/shields/ ``` ## Base Kconfig Files @@ -346,9 +367,9 @@ See the [matrix transform section](../config/kscan.md#matrix-transform) in the K ## Default Keymap -Each keyboard should provide an OOTB default keymap to be used when building the firmware, which can be overridden and customized by user configs. For "shield keyboards", this should be placed in the `app/boards/shields//.keymap` file. The keymap is configured as an additional devicetree overlay that includes the following: +Each keyboard should provide a default keymap to be used when building the firmware, which can be overridden and customized by user configs. For "shield keyboards", this should be placed in the `boards/shields//.keymap` file. The keymap is configured as an additional devicetree overlay that includes the following: -- A node with `compatible="zmk,keymap"` where each child node is a layer with a `bindings` array that binds each key position to a given behavior (e.g. key press, momentarily layer, etc). +- A node with `compatible = "zmk,keymap"` where each child node is a layer with a `bindings` array that binds each key position to a given behavior (e.g. key press, momentary layer, etc). Here is an example simple keymap for the Kyria, with only one layer: @@ -360,12 +381,7 @@ The two `#include` lines at the top of the keymap are required in order to bring ### Keymap Behaviors -Further documentation on behaviors and bindings is forthcoming, but a summary of the current behaviors you can bind to key positions is as follows: - -- `kp` is the "key press" behavior, and takes a single binding argument of the key code from the 'keyboard/keypad" HID usage table. -- `mo` is the "momentary layer" behavior, and takes a single binding argument of the numeric ID of the layer to momentarily enable when that key is held. -- `trans` is the "transparent" behavior, useful to be place in higher layers above `mo` bindings to be sure the key release is handled by the lower layer. No binding arguments are required. -- `mt` is the "mod-tap" behavior, and takes two binding arguments, the modifier to use if held, and the keycode to send if tapped. +For the full documentation on the available behaviors for use in keymaps, start with reviewing [`kp`](../behaviors/key-press.md) and then use the sidebar to review the others available within ZMK. ## Metadata @@ -393,6 +409,40 @@ siblings: You should place a properly named `foo.zmk.yml` file in the directory next to your other shield values, and fill it out completely and accurately. See [Hardware Metadata Files](/docs/development/hardware-metadata-files) for the full details. +## Build File + +To help you test/verify your firmware, update the `build.yaml` to list your particular board/shield combinations you want built whenever changes are published to GitHub. Open `build.yaml` with your editor and add a combination, e.g.: + +```yaml +# This file generates the GitHub Actions matrix +# For simple board + shield combinations, add them +# to the top level board and shield arrays, for more +# control, add individual board + shield combinations to +# the `include` property, e.g: +# +# board: [ "nice_nano_v2" ] +# shield: [ "corne_left", "corne_right" ] +# include: +# - board: bdn9_rev2 +# - board: nice_nano_v2 +# shield: reviung41 +# +--- +include: + - board: nice_nano_v2 + shield: +``` + +For split keyboards, you will need to specify the halves/siblings separately, e.g.: + +```yaml +include: + - board: mikoto_520 + shield: _left + - board: mikoto_520 + shield: _right +``` + ## Adding Features ### Encoders @@ -486,17 +536,40 @@ Add additional bindings as necessary to match the default number of encoders on ## Testing +### GitHub Actions + +Using GitHub Actions to build your new firmware can save you from doing any local [development setup](./setup.md), +at the expense of a longer feedback loop if there are issues. To push your changes and trigger a build: + +- Add all your pending changes with `git add .` +- Commit your changes with `git commit -m "Initial shield"` +- Push the changes to GitHub with `git push` + +Once pushed, click on the "Actions" tab of the repo you created in the first step, and you should see a new build running. If the build is successful, there will be a new `firmware.zip` artifact shown on the summary screen you can download that will contain the new `.uf2` files that can be flashed to the device. + +### Local Build + +:::note +To build locally, be sure you've followed the [development setup](./setup.md) guide first. +::: + Once you've fully created the new keyboard shield definition, you should be able to test with a build command like: ```sh -west build --pristine -b nice_nano_v2 -- -DSHIELD=my_board +west build --pristine -b nice_nano_v2 -- -DSHIELD= -DZMK_EXTRA_MODULES=/full/path/to/your/module +# replace with e.g. _left for split keyboards, then repeat for _right ``` -The above build command generates `build/zephyr/zmk.uf2`. If your board +The above build command generates a `build/zephyr/zmk.uf2` file that you can flash using the steps from the following section. See the dedicated [building and flashing page](build-flash.md) for more details. + +### Flashing + +If your board supports USB Flashing Format (UF2), copy that file onto the root of the USB mass storage device for your board. The controller should flash your built firmware -and automatically restart once flashing is complete. +and automatically restart once flashing is complete. If you need to flash an updated +UF2 file with fixes, you can re-enter the bootloader by double tapping the reset button. Alternatively, if your board supports flashing and you're not developing from within a Dockerized environment, enable Device Firmware Upgrade (DFU) mode on From 88338a9b3cc9b87d48ad1845cffb51b57cffbcb3 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 6 Dec 2023 20:05:29 +0000 Subject: [PATCH 54/65] feat(shields): Add ZMK Uno split setup * Make it easier to test split code with ZMK Uno hardware by adding a split left/right setup as well. --- app/boards/shields/zmk_uno/Kconfig.defconfig | 2 +- app/boards/shields/zmk_uno/Kconfig.shield | 15 ++ app/boards/shields/zmk_uno/zmk_uno.dtsi | 172 ++++++++++++++++++ app/boards/shields/zmk_uno/zmk_uno.overlay | 160 +--------------- app/boards/shields/zmk_uno/zmk_uno_split.dtsi | 61 +++++++ .../shields/zmk_uno/zmk_uno_split.keymap | 66 +++++++ .../shields/zmk_uno/zmk_uno_split_left.conf | 18 ++ .../zmk_uno/zmk_uno_split_left.overlay | 11 ++ .../shields/zmk_uno/zmk_uno_split_right.conf | 18 ++ .../zmk_uno/zmk_uno_split_right.overlay | 19 ++ 10 files changed, 382 insertions(+), 160 deletions(-) create mode 100644 app/boards/shields/zmk_uno/zmk_uno.dtsi create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split.dtsi create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split.keymap create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split_left.conf create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split_left.overlay create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split_right.conf create mode 100644 app/boards/shields/zmk_uno/zmk_uno_split_right.overlay diff --git a/app/boards/shields/zmk_uno/Kconfig.defconfig b/app/boards/shields/zmk_uno/Kconfig.defconfig index 11c63a5a005..cccca1d2dee 100644 --- a/app/boards/shields/zmk_uno/Kconfig.defconfig +++ b/app/boards/shields/zmk_uno/Kconfig.defconfig @@ -1,7 +1,7 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT -if SHIELD_ZMK_UNO +if SHIELD_ZMK_UNO_BASE config ZMK_KEYBOARD_NAME default "ZMK Uno" diff --git a/app/boards/shields/zmk_uno/Kconfig.shield b/app/boards/shields/zmk_uno/Kconfig.shield index 958915f59c0..0b0b3d73f73 100644 --- a/app/boards/shields/zmk_uno/Kconfig.shield +++ b/app/boards/shields/zmk_uno/Kconfig.shield @@ -1,5 +1,20 @@ # Copyright (c) 2022 The ZMK Contributors # SPDX-License-Identifier: MIT +config SHIELD_ZMK_UNO_BASE + bool + config SHIELD_ZMK_UNO def_bool $(shields_list_contains,zmk_uno) + select SHIELD_ZMK_UNO_BASE + +config SHIELD_ZMK_UNO_SPLIT_LEFT + def_bool $(shields_list_contains,zmk_uno_split_left) + select SHIELD_ZMK_UNO_BASE + select ZMK_SPLIT + select ZMK_SPLIT_ROLE_CENTRAL + +config SHIELD_ZMK_UNO_SPLIT_RIGHT + def_bool $(shields_list_contains,zmk_uno_split_right) + select SHIELD_ZMK_UNO_BASE + select ZMK_SPLIT \ No newline at end of file diff --git a/app/boards/shields/zmk_uno/zmk_uno.dtsi b/app/boards/shields/zmk_uno/zmk_uno.dtsi new file mode 100644 index 00000000000..63deb06a4d1 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno.dtsi @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +&arduino_i2c { + status = "okay"; +}; + +nice_view_spi: &arduino_spi { + status = "okay"; + + cs-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; + + // Needed so the nice_view shield will enhance the existing node which falls *first* + // on the bus, properly picking up the first `cs-gpios` specifier. + ls0xx@0 { + reg = <0>; + }; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <7>; /* 4 underglow + 3 per-key LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,kscan = &kscan_matrix_comp; + zmk,backlight = &backlight; + zmk,underglow = &led_strip; + zmk,matrix-transform = &matrix_transform; + }; + + // Commented out until we add more powerful power domain support + // external_power { + // compatible = "zmk,ext-power-generic"; + // init-delay-ms = <200>; + // control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; + // }; + + rgb_power { + compatible = "zmk,ext-power-generic"; + init-delay-ms = <200>; + control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; + }; + + backlight: gpioleds { + compatible = "gpio-leds"; + gpio_led_0 { + gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; + }; + }; + + matrix_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; + + map = < + RC(0,0) RC(0,1) + RC(1,0) RC(1,1) + RC(2,0) RC(2,1) RC(2,2) + >; + }; + + direct_matrix_transform: direct_matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; + + map = < + RC(0,0) RC(0,1) + RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) + >; + }; + + + kscan_matrix_comp: kscan_matrix_comp { + compatible = "zmk,kscan-composite"; + rows = <1>; + columns = <7>; + + matrix { + kscan = <&kscan_matrix>; + }; + + toggle { + kscan = <&kscan_sp3t_toggle>; + row-offset = <2>; + }; + + }; + + kscan_direct_comp: kscan_direct_comp { + compatible = "zmk,kscan-composite"; + status = "disabled"; + + matrix { + kscan = <&kscan_direct>; + }; + + toggle { + kscan = <&kscan_sp3t_toggle>; + row-offset = <1>; + }; + + }; + + kscan_matrix: kscan_matrix { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "col2row"; + + col-gpios + = <&arduino_header 10 GPIO_ACTIVE_HIGH> + , <&arduino_header 9 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&arduino_header 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; + + kscan_direct: kscan_direct { + compatible = "zmk,kscan-gpio-direct"; + status = "disabled"; + + input-gpios + = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + + }; + + kscan_sp3t_toggle: kscan_sp3t_toggle { + compatible = "zmk,kscan-gpio-direct"; + toggle-mode; + + input-gpios + = <&arduino_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&arduino_header 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + encoder: encoder { + steps = <80>; + compatible = "alps,ec11"; + a-gpios = <&arduino_header 15 GPIO_PULL_UP>; + b-gpios = <&arduino_header 14 GPIO_PULL_UP>; + }; +}; diff --git a/app/boards/shields/zmk_uno/zmk_uno.overlay b/app/boards/shields/zmk_uno/zmk_uno.overlay index 6d487adbad9..07181280015 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.overlay +++ b/app/boards/shields/zmk_uno/zmk_uno.overlay @@ -4,170 +4,12 @@ * SPDX-License-Identifier: MIT */ -#include -#include - -&arduino_i2c { - status = "okay"; -}; - -nice_view_spi: &arduino_spi { - status = "okay"; - - cs-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; - - // Needed so the nice_view shield will enhance the existing node which falls *first* - // on the bus, properly picking up the first `cs-gpios` specifier. - ls0xx@0 { - reg = <0>; - }; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <7>; /* 4 underglow + 3 per-key LEDs */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; + #include "zmk_uno.dtsi" / { chosen { - zmk,kscan = &kscan_matrix_comp; - zmk,backlight = &backlight; - zmk,underglow = &led_strip; zmk,matrix-transform = &matrix_transform; }; - - // Commented out until we add more powerful power domain support - // external_power { - // compatible = "zmk,ext-power-generic"; - // init-delay-ms = <200>; - // control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; - // }; - - rgb_power { - compatible = "zmk,ext-power-generic"; - init-delay-ms = <200>; - control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; - }; - - backlight: gpioleds { - compatible = "gpio-leds"; - gpio_led_0 { - gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; - }; - }; - - matrix_transform: matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <3>; - columns = <4>; - - map = < - RC(0,0) RC(0,1) - RC(1,0) RC(1,1) - RC(2,0) RC(2,1) RC(2,2) - >; - }; - - direct_matrix_transform: direct_matrix_transform { - compatible = "zmk,matrix-transform"; - rows = <3>; - columns = <4>; - - map = < - RC(0,0) RC(0,1) - RC(0,2) RC(0,3) - RC(1,0) RC(1,1) RC(1,2) - >; - }; - - kscan_matrix_comp: kscan_matrix_comp { - compatible = "zmk,kscan-composite"; - rows = <1>; - columns = <7>; - - matrix { - kscan = <&kscan_matrix>; - }; - - toggle { - kscan = <&kscan_sp3t_toggle>; - row-offset = <2>; - }; - - }; - - kscan_direct_comp: kscan_direct_comp { - compatible = "zmk,kscan-composite"; - status = "disabled"; - - matrix { - kscan = <&kscan_direct>; - }; - - toggle { - kscan = <&kscan_sp3t_toggle>; - row-offset = <1>; - }; - - }; - - kscan_matrix: kscan_matrix { - compatible = "zmk,kscan-gpio-matrix"; - - diode-direction = "col2row"; - - col-gpios - = <&arduino_header 10 GPIO_ACTIVE_HIGH> - , <&arduino_header 9 GPIO_ACTIVE_HIGH> - ; - - row-gpios - = <&arduino_header 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&arduino_header 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - - }; - - kscan_direct: kscan_direct { - compatible = "zmk,kscan-gpio-direct"; - status = "disabled"; - - input-gpios - = <&arduino_header 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - - }; - - kscan_sp3t_toggle: kscan_sp3t_toggle { - compatible = "zmk,kscan-gpio-direct"; - toggle-mode; - - input-gpios - = <&arduino_header 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&arduino_header 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - ; - }; - - encoder: encoder { - steps = <80>; - compatible = "alps,ec11"; - a-gpios = <&arduino_header 15 GPIO_PULL_UP>; - b-gpios = <&arduino_header 14 GPIO_PULL_UP>; - }; sensors { compatible = "zmk,keymap-sensors"; sensors = <&encoder>; diff --git a/app/boards/shields/zmk_uno/zmk_uno_split.dtsi b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi new file mode 100644 index 00000000000..f84aacc8e97 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split.dtsi @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + #include "zmk_uno.dtsi" + + left_encoder: &encoder { + status = "disabled"; + }; + + / { + chosen { + zmk,matrix-transform = &split_matrix_transform; + }; + + split_matrix_transform: split_matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; + + map = < + RC(0,0) RC(0,1) + RC(1,0) RC(1,1) + RC(2,0) RC(2,1) RC(2,2) + RC(3,0) RC(3,1) + RC(4,0) RC(4,1) + RC(5,0) RC(5,1) RC(5,2) + >; + }; + + split_direct_matrix_transform: split_direct_matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <4>; + + map = < + RC(0,0) RC(0,1) + RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) + RC(2,0) RC(2,1) + RC(2,2) RC(2,3) + RC(3,0) RC(3,1) RC(3,2) + >; + }; + + right_encoder: right_encoder { + steps = <80>; + status = "disabled"; + compatible = "alps,ec11"; + a-gpios = <&arduino_header 15 GPIO_PULL_UP>; + b-gpios = <&arduino_header 14 GPIO_PULL_UP>; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&encoder &right_encoder>; + triggers-per-rotation = <20>; + }; + }; diff --git a/app/boards/shields/zmk_uno/zmk_uno_split.keymap b/app/boards/shields/zmk_uno/zmk_uno_split.keymap new file mode 100644 index 00000000000..05f0ffb0b04 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split.keymap @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include +#include + +// Uncomment the following block if using the "Direct Wire" jumper to switch the matrix to a direct wire. + +/* :REMOVE ME + +&kscan_direct_comp { status = "okay"; }; +&kscan_direct { status = "okay"; }; +&kscan_matrix_comp { status = "disabled"; }; +&kscan_matrix { status = "disabled"; }; + +/ { + chosen { + zmk,matrix-transform = &split_direct_matrix_transform; + zmk,kscan = &kscan_direct_comp; + }; +}; + +REMOVE ME: */ + + +/ { + macros { + ZMK_MACRO(ble_zero, + wait-ms = <1>; + tap-ms = <1>; + bindings = <&out OUT_BLE &bt BT_SEL 0>; + ) + ZMK_MACRO(ble_one, + wait-ms = <1>; + tap-ms = <1>; + bindings = <&out OUT_BLE &bt BT_SEL 1>; + ) + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &bl BL_TOG + &rgb_ug RGB_EFF &bt BT_CLR + + &out OUT_USB &ble_zero &ble_one + + &kp C &kp D + &kp E &kp F + &none &none &none + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; +}; diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_left.conf b/app/boards/shields/zmk_uno/zmk_uno_split_left.conf new file mode 100644 index 00000000000..cf282bac2cb --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split_left.conf @@ -0,0 +1,18 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_LOG=y +CONFIG_ZMK_LOG_LEVEL_DBG=y + +# Uncomment for Single color backlight +# CONFIG_ZMK_BACKLIGHT=y + +# Uncomment for RGB +# CONFIG_ZMK_RGB_UNDERGLOW=y + +# Uncomment for Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment these two lines to enable encoder support +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_left.overlay b/app/boards/shields/zmk_uno/zmk_uno_split_left.overlay new file mode 100644 index 00000000000..5782e612d92 --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split_left.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "zmk_uno_split.dtsi" + +&left_encoder { + status = "okay"; +}; diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_right.conf b/app/boards/shields/zmk_uno/zmk_uno_split_right.conf new file mode 100644 index 00000000000..cf282bac2cb --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split_right.conf @@ -0,0 +1,18 @@ +# Copyright (c) 2022 The ZMK Contributors +# SPDX-License-Identifier: MIT + +CONFIG_LOG=y +CONFIG_ZMK_LOG_LEVEL_DBG=y + +# Uncomment for Single color backlight +# CONFIG_ZMK_BACKLIGHT=y + +# Uncomment for RGB +# CONFIG_ZMK_RGB_UNDERGLOW=y + +# Uncomment for Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment these two lines to enable encoder support +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_right.overlay b/app/boards/shields/zmk_uno/zmk_uno_split_right.overlay new file mode 100644 index 00000000000..9c2e7d7f2ee --- /dev/null +++ b/app/boards/shields/zmk_uno/zmk_uno_split_right.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "zmk_uno_split.dtsi" + +&split_matrix_transform { + row-offset = <3>; +}; + +&split_direct_matrix_transform { + row-offset = <2>; +}; + +&right_encoder { + status = "okay"; +}; From f3ad08b619c5c1e6fd95df01fd98eef2207d6aa8 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 22:48:47 -0800 Subject: [PATCH 55/65] fix(docs): Add missing page pointers in behaviors config --- docs/docs/config/behaviors.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 10096a41f63..452768070eb 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -49,7 +49,7 @@ You can use the following nodes to tweak the default behaviors: Creates a custom behavior that triggers one behavior when a key is held or a different one when the key is tapped. -See the [hold-tap behavior documentation](../behaviors/hold-tap.md) for more details and examples. +See the [hold-tap behavior](../behaviors/hold-tap.md) documentation for more details and examples. ### Devicetree @@ -157,6 +157,8 @@ The following macro-specific behaviors can be added at any point in the `binding Creates a custom behavior that triggers one of two behaviors depending on whether certain modifiers are held. +See the [mod-morph behavior](../behaviors/mod-morph.md) documentation for more details and examples. + ### Devicetree Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-mod-morph.yaml) @@ -208,6 +210,8 @@ You can use the following nodes to tweak the default behaviors: Creates a custom behavior that triggers a different behavior corresponding to the number of times the key is tapped. +See the [tap dance behavior](../behaviors/tap-dance.md) documentation for more details and examples. + ### Devicetree Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-tap-dance.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-tap-dance.yaml) From 76a209c728415e0cd6d3ab5400e42709c6aabf03 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 23:02:35 -0800 Subject: [PATCH 56/65] fix(docs): Fix sticky key #binding-cells --- docs/docs/config/behaviors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 452768070eb..c1d44f697c3 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -193,7 +193,7 @@ Applies to: `compatible = "zmk,behavior-sticky-key"` | Property | Type | Description | Default | | ------------------ | ------------- | ------------------------------------------------------------------------ | ------- | -| `#binding-cells` | int | Must match the number of parameters the `bindings` behavior uses | | +| `#binding-cells` | int | Must be `<1>` | | | `bindings` | phandle array | A behavior (without parameters) to trigger | | | `release-after-ms` | int | Releases the key after this many milliseconds if no other key is pressed | 1000 | | `quick-release` | bool | Release the sticky key on the next key press instead of release | false | From 2bab81a3046302c4c07d93150e35ca39b87af560 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 23:16:58 -0800 Subject: [PATCH 57/65] fix(docs): Note -var definition files for macros --- docs/docs/config/behaviors.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index c1d44f697c3..db24f805b7c 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -126,7 +126,11 @@ See the [macro behavior](../behaviors/macros.md) documentation for more details ### Devicetree -Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-macro.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro.yaml) +Definition files: + +- [zmk/app/dts/bindings/behaviors/zmk,behavior-macro.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro.yaml) +- [zmk/app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro-one-param.yaml) +- [zmk/app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro-two-param.yaml) | Property | Type | Description | Default | | ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | From 56d863cba6e26c49a43b6b1bf0404765823dfad6 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 23:04:28 -0800 Subject: [PATCH 58/65] feat(docs): Document sensor-rotate in behaviors config --- docs/docs/config/behaviors.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index db24f805b7c..119b3d22615 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -183,6 +183,27 @@ You can use the following nodes to tweak the default behaviors: | -------- | ----------------------------------------- | | `&gresc` | [Grave escape](../behaviors/mod-morph.md) | +## Sensor Rotation + +Creates a custom behavior which sends a tap of other behaviors when a sensor is rotated. +Has two variants: with `compatible = "zmk,behavior-sensor-rotate"` it accepts no parameters when used, whereas with `compatible = "zmk,behavior-sensor-rotate-var"` it accepts two parameters. + +See the [sensor rotation behavior](../behaviors/sensor-rotate.md) documentation for more details and examples. + +### Devicetree + +Definition files: + +- [zmk/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-sensor-rotate.yaml) +- [zmk/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-sensor-rotate-var.yaml) + +| Property | Type | Description | Default | +| ----------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `compatible` | string | Sensor rotation type, **must be _one_ of**:
• `"zmk,behavior-sensor-rotate"`
• `"zmk,behavior-sensor-rotate-var"` | | +| `#sensor-binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:
• `<0>`
• `<2>` | | +| `bindings` | phandle array | A list of two behaviors to trigger for each rotation direction, must include parameters for `"zmk,behavior-sensor-rotate"` and exclude them for `"zmk,behavior-sensor-rotate-var"` | | +| `tap-ms` | int | The tap duration (between press and release events) in milliseconds for behaviors in `bindings` | 5 | + ## Sticky Key Creates a custom behavior that triggers a behavior and keeps it pressed it until another key is pressed and released. From 55bf7cae7e67a57831ccd003061d60859deb9ff9 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 23:28:41 -0800 Subject: [PATCH 59/65] feat(docs): Note how parameters are forwarded for behaviors --- docs/docs/config/behaviors.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 119b3d22615..bb5f14e14d7 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -68,6 +68,8 @@ Applies to: `compatible = "zmk,behavior-hold-tap"` | `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false | | `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | | +This behavior forwards the first parameter it receives to the parameter of the first behavior specified in `bindings`, and second parameter to the parameter of the second behavior. + The `flavor` property may be one of: - `"hold-preferred"` @@ -140,6 +142,8 @@ Definition files: | `wait-ms` | int | The default time to wait (in milliseconds) before triggering the next behavior. | `CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS` | | `tap-ms` | int | The default time to wait (in milliseconds) between the press and release events of a tapped behavior. | `CONFIG_ZMK_MACRO_DEFAULT_TAP_MS` | +With `compatible = "zmk,behavior-macro-one-param"` or `compatible = "zmk,behavior-macro-two-param"`, this behavior forwards the parameters it receives according to the `¯o_param_*` control behaviors noted below. + ### Macro Control Behaviors The following macro-specific behaviors can be added at any point in the `bindings` list to change how the macro triggers subsequent behaviors. @@ -204,6 +208,8 @@ Definition files: | `bindings` | phandle array | A list of two behaviors to trigger for each rotation direction, must include parameters for `"zmk,behavior-sensor-rotate"` and exclude them for `"zmk,behavior-sensor-rotate-var"` | | | `tap-ms` | int | The tap duration (between press and release events) in milliseconds for behaviors in `bindings` | 5 | +With `compatible = "zmk,behavior-sensor-rotate-var"`, this behavior forwards the first parameter it receives to the parameter of the first behavior specified in `bindings`, and second parameter to the parameter of the second behavior. + ## Sticky Key Creates a custom behavior that triggers a behavior and keeps it pressed it until another key is pressed and released. @@ -224,6 +230,8 @@ Applies to: `compatible = "zmk,behavior-sticky-key"` | `quick-release` | bool | Release the sticky key on the next key press instead of release | false | | `ignore-modifiers` | bool | If enabled, pressing a modifier key does not cancel the sticky key | true | +This behavior forwards the one parameter it receives to the parameter of the behavior specified in `bindings`. + You can use the following nodes to tweak the default behaviors: | Node | Behavior | From 09d47d81176175ed104d6b1de1bae804dfbca9fc Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Tue, 5 Dec 2023 14:14:06 -0800 Subject: [PATCH 60/65] refactor(docs): Convert breaks to unordered lists in tables Co-authored-by: Joel Spadin --- docs/docs/config/behaviors.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index bb5f14e14d7..09498e6bebd 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -134,13 +134,13 @@ Definition files: - [zmk/app/dts/bindings/behaviors/zmk,behavior-macro-one-param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro-one-param.yaml) - [zmk/app/dts/bindings/behaviors/zmk,behavior-macro-two-param.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-macro-two-param.yaml) -| Property | Type | Description | Default | -| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| `compatible` | string | Macro type, **must be _one_ of**:
• `"zmk,behavior-macro"`
• `"zmk,behavior-macro-one-param"`
• `"zmk,behavior-macro-two-param"` | | -| `#binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:
• `<0>`
• `<1>`
• `<2>` | | -| `bindings` | phandle array | List of behaviors to trigger | | -| `wait-ms` | int | The default time to wait (in milliseconds) before triggering the next behavior. | `CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS` | -| `tap-ms` | int | The default time to wait (in milliseconds) between the press and release events of a tapped behavior. | `CONFIG_ZMK_MACRO_DEFAULT_TAP_MS` | +| Property | Type | Description | Default | +| ---------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `compatible` | string | Macro type, **must be _one_ of**:

  • `"zmk,behavior-macro"`
  • `"zmk,behavior-macro-one-param"`
  • `"zmk,behavior-macro-two-param"`
| | +| `#binding-cells` | int | Must be
  • `<0>` if `compatible = "zmk,behavior-macro"`
  • `<1>` if `compatible = "zmk,behavior-macro-one-param"`
  • `<2>` if `compatible = "zmk,behavior-macro-two-param"`
| | +| `bindings` | phandle array | List of behaviors to trigger | | +| `wait-ms` | int | The default time to wait (in milliseconds) before triggering the next behavior. | `CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS` | +| `tap-ms` | int | The default time to wait (in milliseconds) between the press and release events of a tapped behavior. | `CONFIG_ZMK_MACRO_DEFAULT_TAP_MS` | With `compatible = "zmk,behavior-macro-one-param"` or `compatible = "zmk,behavior-macro-two-param"`, this behavior forwards the parameters it receives according to the `¯o_param_*` control behaviors noted below. @@ -203,8 +203,8 @@ Definition files: | Property | Type | Description | Default | | ----------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `compatible` | string | Sensor rotation type, **must be _one_ of**:
• `"zmk,behavior-sensor-rotate"`
• `"zmk,behavior-sensor-rotate-var"` | | -| `#sensor-binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:
• `<0>`
• `<2>` | | +| `compatible` | string | Sensor rotation type, **must be _one_ of**:
  • `"zmk,behavior-sensor-rotate"`
  • `"zmk,behavior-sensor-rotate-var"`
| | +| `#sensor-binding-cells` | int | Must be
  • `<0>` if `compatible = "zmk,behavior-sensor-rotate"`
  • `<2>` if `compatible = "zmk,behavior-sensor-rotate-var"`
| | | `bindings` | phandle array | A list of two behaviors to trigger for each rotation direction, must include parameters for `"zmk,behavior-sensor-rotate"` and exclude them for `"zmk,behavior-sensor-rotate-var"` | | | `tap-ms` | int | The tap duration (between press and release events) in milliseconds for behaviors in `bindings` | 5 | From 384637ae6c8073ef7e5ac87db111c8aaab972015 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Sun, 3 Dec 2023 22:36:04 -0800 Subject: [PATCH 61/65] fix(docs): Fix text blurb about split Kconfig.defconfig --- docs/docs/development/new-shield.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 291a7f63e85..dd63fa9b880 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -113,10 +113,11 @@ config ZMK_KEYBOARD_NAME endif ``` -Similarly to defining the halves of a split board in `Kconfig.shield` it is important to set the `ZMK_KEYBOARD_NAME` for each half of a split keyboard. -You'll also want to set which half is the central side. Most boards set it to the left. -Then on the peripheral half, you'll want to turn USB on so that it shows USB status on displays properly. -Finally, you'll want to turn on the split option for both sides. This can all be seen below. +For split keyboards, `Kconfig.defconfig` needs to specify a few more options. +Which side is central (usually the left) is determined via the configuration in this file. +For that side, the keyboard name is assigned and the central config is set. +The peripheral side is typically not assigned a name since only the central will be advertising for connections to other devices. +Finally, the split config needs to be set for both sides: ```kconfig if SHIELD_MY_BOARD_LEFT From 96f9031951f4edc3477b523e5cc33bafe8017482 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 7 Dec 2023 10:41:40 -0800 Subject: [PATCH 62/65] fix(build): Only copy if zephyr module detected * To fix issues with breakage with existing user config repos, only do our copy strategy if we detect a zephyr module present in the repo as well. --- .github/workflows/build-user-config.yml | 35 ++++++++++++++----------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index d6fbaa5ca68..7efa6425f92 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -66,11 +66,12 @@ jobs: shield: ${{ matrix.shield }} artifact_name: ${{ matrix.artifact-name }} run: | - export new_tmp_dir=$(mktemp -d) - echo "tmp_dir=${new_tmp_dir}" >> $GITHUB_ENV - echo "tmp_config_dir=${new_tmp_dir}/config" >> $GITHUB_ENV if [ -e zephyr/module.yml ]; then export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'" + export new_tmp_dir=$(mktemp -d) + echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV + else + echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV fi echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV @@ -80,8 +81,10 @@ jobs: - name: Copy config files to isolated temporary directory run: | - mkdir "${{ env.tmp_config_dir }}" - cp -R ${{ inputs.config_path }}/* "${{ env.tmp_config_dir }}/" + if [ "${{ env.base_dir }}" != "${GITHUB_WORKSPACE}" ]; then + mkdir "${{ env.base_dir }}/${{ inputs.config_path }}" + cp -R ${{ inputs.config_path }}/* "${{ env.base_dir }}/${{ inputs.config_path }}/" + fi - name: Cache west modules uses: actions/cache@v3.0.11 @@ -90,11 +93,11 @@ jobs: cache_name: cache-zephyr-${{ env.zephyr_version }}-modules with: path: | - ${{ env.tmp_dir }}/modules/ - ${{ env.tmp_dir }}/tools/ - ${{ env.tmp_dir }}/zephyr/ - ${{ env.tmp_dir }}/bootloader/ - ${{ env.tmp_dir }}/zmk/ + ${{ env.base_dir }}/modules/ + ${{ env.base_dir }}/tools/ + ${{ env.base_dir }}/zephyr/ + ${{ env.base_dir }}/bootloader/ + ${{ env.base_dir }}/zmk/ key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache_name }}- @@ -102,21 +105,21 @@ jobs: ${{ runner.os }}- - name: West Init - working-directory: ${{ env.tmp_dir }} - run: west init -l "${{ env.tmp_config_dir }}" + working-directory: ${{ env.base_dir }} + run: west init -l "${{ env.base_dir }}/${{ inputs.config_path }}" - name: West Update - working-directory: ${{ env.tmp_dir }} + working-directory: ${{ env.base_dir }} run: west update - name: West Zephyr export - working-directory: ${{ env.tmp_dir }} + working-directory: ${{ env.base_dir }} run: west zephyr-export - name: West Build (${{ env.display_name }}) - working-directory: ${{ env.tmp_dir }} + working-directory: ${{ env.base_dir }} shell: sh -x {0} - run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.tmp_config_dir }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} + run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} - name: ${{ env.display_name }} Kconfig file run: | From 63c8c5700acb781ca9ac7c7985f78e0b95ff8130 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 6 Dec 2023 23:07:20 +0000 Subject: [PATCH 63/65] feat(bt): Add more experimental tweaks. * Support auto security upgrade for splits properly. * Disable 2M and legacy LLCP if the experimental Kconfig flag is selected. --- app/Kconfig | 22 +++++++++++++--------- app/src/split/bluetooth/central.c | 2 ++ docs/docs/config/bluetooth.md | 10 +++++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index fff63a5b9fc..a9b1b39e696 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -144,28 +144,32 @@ if ZMK_BLE config ZMK_BLE_EXPERIMENTAL_FEATURES bool "Experimental: Enable experimental/advanced BLE settings/features" - select ZMK_BLE_PASSKEY_ENTRY - select BT_GATT_AUTO_SEC_REQ - select BT_SMP_ALLOW_UNAUTH_OVERWRITE + imply ZMK_BLE_PASSKEY_ENTRY + imply BT_GATT_AUTO_SEC_REQ + imply BT_SMP_ALLOW_UNAUTH_OVERWRITE help Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, - and allowing overwrite of keys from previously paired hosts. + restores use of the updated/new LLCP implementation, disables 2M PHY support, and allows + overwrite of keys from previously paired hosts. config ZMK_BLE_PASSKEY_ENTRY bool "Require passkey entry on the keyboard to complete pairing" default n select RING_BUFFER -# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI -config BT_TINYCRYPT_ECC - default y if BT_HCI && !BT_CTLR - choice BT_LL_SW_LLCP_IMPL - default BT_LL_SW_LLCP_LEGACY + default BT_LL_SW_LLCP_LEGACY if !ZMK_BLE_EXPERIMENTAL_FEATURES endchoice +config BT_CTLR_PHY_2M + default n if ZMK_BLE_EXPERIMENTAL_FEATURES + +# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI +config BT_TINYCRYPT_ECC + default y if BT_HCI && !BT_CTLR + config SYSTEM_WORKQUEUE_STACK_SIZE default 4096 if SOC_RP2040 default 2048 diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index 6f3b78ab883..3635322431c 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -397,11 +397,13 @@ static void split_central_process_connection(struct bt_conn *conn) { LOG_DBG("Current security for connection: %d", bt_conn_get_security(conn)); +#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) err = bt_conn_set_security(conn, BT_SECURITY_L2); if (err) { LOG_ERR("Failed to set security (reason %d)", err); return; } +#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ) struct peripheral_slot *slot = peripheral_slot_for_conn(conn); if (slot == NULL) { diff --git a/docs/docs/config/bluetooth.md b/docs/docs/config/bluetooth.md index f957b77e3a6..61477cb5381 100644 --- a/docs/docs/config/bluetooth.md +++ b/docs/docs/config/bluetooth.md @@ -9,8 +9,8 @@ See [Configuration Overview](index.md) for instructions on how to change these s ## Kconfig -| Option | Type | Description | Default | -| -------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | -| `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, and allowing overwrite of keys from previously paired hosts. | n | -| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | -| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | +| Option | Type | Description | Default | +| -------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES` | bool | Enables a combination of settings that are planned to be default in future versions of ZMK. This includes changes to timing on BLE pairing initation, BT Secure Connection passkey entry, restores use of the updated/new LLCP implementation, disables 2M PHY support, and allows overwrite of keys from previously paired hosts. | n | +| `CONFIG_ZMK_BLE_PASSKEY_ENTRY` | bool | Enable passkey entry during pairing for enhanced security. (Note: After enabling this, you will need to re-pair all previously paired hosts) | n | +| `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION` | bool | Low level setting for GATT subscriptions. Set to `n` to work around an annoying Windows bug with battery notifications. | y | From b35a5e83c05a3ed9db8d13e5571ee20f588fa3ad Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 8 Dec 2023 14:11:36 -0800 Subject: [PATCH 64/65] fix(shields): Don't enable passkey support on Uno. * The ZMK Uno has no way to input the full range of digits, so skip that setting so it's not pulled in by BLE experimental feature flag. --- app/boards/shields/zmk_uno/zmk_uno.conf | 2 ++ app/boards/shields/zmk_uno/zmk_uno_split_left.conf | 2 ++ app/boards/shields/zmk_uno/zmk_uno_split_right.conf | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/boards/shields/zmk_uno/zmk_uno.conf b/app/boards/shields/zmk_uno/zmk_uno.conf index cf282bac2cb..0c46ea98834 100644 --- a/app/boards/shields/zmk_uno/zmk_uno.conf +++ b/app/boards/shields/zmk_uno/zmk_uno.conf @@ -4,6 +4,8 @@ CONFIG_LOG=y CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_BLE_PASSKEY_ENTRY=n + # Uncomment for Single color backlight # CONFIG_ZMK_BACKLIGHT=y diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_left.conf b/app/boards/shields/zmk_uno/zmk_uno_split_left.conf index cf282bac2cb..0c46ea98834 100644 --- a/app/boards/shields/zmk_uno/zmk_uno_split_left.conf +++ b/app/boards/shields/zmk_uno/zmk_uno_split_left.conf @@ -4,6 +4,8 @@ CONFIG_LOG=y CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_BLE_PASSKEY_ENTRY=n + # Uncomment for Single color backlight # CONFIG_ZMK_BACKLIGHT=y diff --git a/app/boards/shields/zmk_uno/zmk_uno_split_right.conf b/app/boards/shields/zmk_uno/zmk_uno_split_right.conf index cf282bac2cb..0c46ea98834 100644 --- a/app/boards/shields/zmk_uno/zmk_uno_split_right.conf +++ b/app/boards/shields/zmk_uno/zmk_uno_split_right.conf @@ -4,6 +4,8 @@ CONFIG_LOG=y CONFIG_ZMK_LOG_LEVEL_DBG=y +CONFIG_ZMK_BLE_PASSKEY_ENTRY=n + # Uncomment for Single color backlight # CONFIG_ZMK_BACKLIGHT=y From 2c50cff891becd70e04152202ee76a1be95089fa Mon Sep 17 00:00:00 2001 From: Hooky <117450225+HookyKB@users.noreply.github.com> Date: Sun, 10 Dec 2023 06:10:05 +0800 Subject: [PATCH 65/65] feat(kscan): Add charlieplex keyscan driver * Supports matrixes with and without additional interrupt pin use. Co-authored-by: Peter Johanson --- app/module/drivers/kscan/CMakeLists.txt | 3 +- app/module/drivers/kscan/Kconfig | 30 ++ .../drivers/kscan/kscan_gpio_charlieplex.c | 420 ++++++++++++++++++ .../kscan/zmk,kscan-gpio-charlieplex.yaml | 31 ++ docs/docs/config/kscan.md | 86 +++- 5 files changed, 563 insertions(+), 7 deletions(-) create mode 100644 app/module/drivers/kscan/kscan_gpio_charlieplex.c create mode 100644 app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.yaml diff --git a/app/module/drivers/kscan/CMakeLists.txt b/app/module/drivers/kscan/CMakeLists.txt index 7ae9524c75f..5b05af767e2 100644 --- a/app/module/drivers/kscan/CMakeLists.txt +++ b/app/module/drivers/kscan/CMakeLists.txt @@ -1,10 +1,11 @@ -# Copyright (c) 2020 The ZMK Contributors +# Copyright (c) 2020-2023 The ZMK Contributors # SPDX-License-Identifier: MIT zephyr_library_amend() zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DRIVER kscan_gpio.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_MATRIX kscan_gpio_matrix.c) +zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_CHARLIEPLEX kscan_gpio_charlieplex.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DIRECT kscan_gpio_direct.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_GPIO_DEMUX kscan_gpio_demux.c) zephyr_library_sources_ifdef(CONFIG_ZMK_KSCAN_MOCK_DRIVER kscan_mock.c) diff --git a/app/module/drivers/kscan/Kconfig b/app/module/drivers/kscan/Kconfig index 6f60b3f919f..6b701936d4f 100644 --- a/app/module/drivers/kscan/Kconfig +++ b/app/module/drivers/kscan/Kconfig @@ -5,6 +5,7 @@ DT_COMPAT_ZMK_KSCAN_COMPOSITE := zmk,kscan-composite DT_COMPAT_ZMK_KSCAN_GPIO_DEMUX := zmk,kscan-gpio-demux DT_COMPAT_ZMK_KSCAN_GPIO_DIRECT := zmk,kscan-gpio-direct DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX := zmk,kscan-gpio-matrix +DT_COMPAT_ZMK_KSCAN_GPIO_CHARLIEPLEX := zmk,kscan-gpio-charlieplex DT_COMPAT_ZMK_KSCAN_MOCK := zmk,kscan-mock if KSCAN @@ -33,6 +34,11 @@ config ZMK_KSCAN_GPIO_MATRIX default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX)) select ZMK_KSCAN_GPIO_DRIVER +config ZMK_KSCAN_GPIO_CHARLIEPLEX + bool + default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_CHARLIEPLEX)) + select ZMK_KSCAN_GPIO_DRIVER + if ZMK_KSCAN_GPIO_MATRIX config ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS @@ -58,6 +64,30 @@ config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS endif # ZMK_KSCAN_GPIO_MATRIX +if ZMK_KSCAN_GPIO_CHARLIEPLEX + +config ZMK_KSCAN_CHARLIEPLEX_WAIT_BEFORE_INPUTS + int "Ticks to wait before reading inputs after an output set active" + default 0 + help + When iterating over each output to drive it active, read inputs, then set + inactive again, some boards may take time for output to propagate to the + inputs. In that scenario, set this value to a positive value to configure + the number of ticks to wait after setting an output active before reading + the inputs for their active state. + +config ZMK_KSCAN_CHARLIEPLEX_WAIT_BETWEEN_OUTPUTS + int "Ticks to wait between each output when scanning charlieplex matrix" + default 0 + help + When iterating over each output to drive it active, read inputs, then set + inactive again, some boards may take time for the previous output to + "settle" before reading inputs for the next active output column. In that + scenario, set this value to a positive value to configure the number of + usecs to wait after reading each column of keys. + +endif # ZMK_KSCAN_GPIO_CHARLIEPLEX + config ZMK_KSCAN_MOCK_DRIVER bool default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_MOCK)) diff --git a/app/module/drivers/kscan/kscan_gpio_charlieplex.c b/app/module/drivers/kscan/kscan_gpio_charlieplex.c new file mode 100644 index 00000000000..f450af2b59c --- /dev/null +++ b/app/module/drivers/kscan/kscan_gpio_charlieplex.c @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2020-2023 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); + +#define DT_DRV_COMPAT zmk_kscan_gpio_charlieplex + +#define INST_LEN(n) DT_INST_PROP_LEN(n, gpios) +#define INST_CHARLIEPLEX_LEN(n) (INST_LEN(n) * INST_LEN(n)) + +#if CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS >= 0 +#define INST_DEBOUNCE_PRESS_MS(n) CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS +#else +#define INST_DEBOUNCE_PRESS_MS(n) \ + DT_INST_PROP_OR(n, debounce_period, DT_INST_PROP(n, debounce_press_ms)) +#endif + +#if CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS >= 0 +#define INST_DEBOUNCE_RELEASE_MS(n) CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS +#else +#define INST_DEBOUNCE_RELEASE_MS(n) \ + DT_INST_PROP_OR(n, debounce_period, DT_INST_PROP(n, debounce_release_ms)) +#endif + +#define KSCAN_GPIO_CFG_INIT(idx, inst_idx) \ + GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst_idx), gpios, idx) + +#define INST_INTR_DEFINED(n) DT_INST_NODE_HAS_PROP(n, interrupt_gpios) + +#define WITH_INTR(n) COND_CODE_1(INST_INTR_DEFINED(n), (+1), (+0)) +#define WITHOUT_INTR(n) COND_CODE_0(INST_INTR_DEFINED(n), (+1), (+0)) + +#define USES_POLLING DT_INST_FOREACH_STATUS_OKAY(WITHOUT_INTR) > 0 +#define USES_INTERRUPT DT_INST_FOREACH_STATUS_OKAY(WITH_INTR) > 0 + +#if USES_POLLING && USES_INTERRUPT +#define USES_POLL_AND_INTR 1 +#else +#define USES_POLL_AND_INTR 0 +#endif + +#define COND_ANY_POLLING(code) COND_CODE_1(USES_POLLING, code, ()) +#define COND_POLL_AND_INTR(code) COND_CODE_1(USES_POLL_AND_INTR, code, ()) +#define COND_THIS_INTERRUPT(n, code) COND_CODE_1(INST_INTR_DEFINED(n), code, ()) + +#define KSCAN_INTR_CFG_INIT(inst_idx) GPIO_DT_SPEC_GET(DT_DRV_INST(inst_idx), interrupt_gpios) + +struct kscan_charlieplex_data { + const struct device *dev; + kscan_callback_t callback; + struct k_work_delayable work; + int64_t scan_time; /* Timestamp of the current or scheduled scan. */ + struct gpio_callback irq_callback; + /** + * Current state of the matrix as a flattened 2D array of length + * (config->cells.length ^2) + */ + struct zmk_debounce_state *charlieplex_state; +}; + +struct kscan_gpio_list { + const struct gpio_dt_spec *gpios; + size_t len; +}; + +/** Define a kscan_gpio_list from a compile-time GPIO array. */ +#define KSCAN_GPIO_LIST(gpio_array) \ + ((struct kscan_gpio_list){.gpios = gpio_array, .len = ARRAY_SIZE(gpio_array)}) + +struct kscan_charlieplex_config { + struct kscan_gpio_list cells; + struct zmk_debounce_config debounce_config; + int32_t debounce_scan_period_ms; + int32_t poll_period_ms; + bool use_interrupt; + const struct gpio_dt_spec interrupt; +}; + +/** + * Get the index into a matrix state array from a row and column. + * There are effectively (n) cols and (n-1) rows, but we use the full col x row space + * as a safety measure against someone accidentally defining a transform RC at (p,p) + */ +static int state_index(const struct kscan_charlieplex_config *config, const int row, + const int col) { + __ASSERT(row < config->cells.len, "Invalid row %i", row); + __ASSERT(col < config->cells.len, "Invalid column %i", col); + __ASSERT(col != row, "Invalid column row pair %i, %i", col, row); + + return (col * config->cells.len) + row; +} + +static int kscan_charlieplex_set_as_input(const struct gpio_dt_spec *gpio) { + if (!device_is_ready(gpio->port)) { + LOG_ERR("GPIO is not ready: %s", gpio->port->name); + return -ENODEV; + } + + gpio_flags_t pull_flag = + ((gpio->dt_flags & GPIO_ACTIVE_LOW) == GPIO_ACTIVE_LOW) ? GPIO_PULL_UP : GPIO_PULL_DOWN; + + int err = gpio_pin_configure_dt(gpio, GPIO_INPUT | pull_flag); + if (err) { + LOG_ERR("Unable to configure pin %u on %s for input", gpio->pin, gpio->port->name); + return err; + } + return 0; +} + +static int kscan_charlieplex_set_as_output(const struct gpio_dt_spec *gpio) { + if (!device_is_ready(gpio->port)) { + LOG_ERR("GPIO is not ready: %s", gpio->port->name); + return -ENODEV; + } + + int err = gpio_pin_configure_dt(gpio, GPIO_OUTPUT); + if (err) { + LOG_ERR("Unable to configure pin %u on %s for output", gpio->pin, gpio->port->name); + return err; + } + + err = gpio_pin_set_dt(gpio, 1); + if (err) { + LOG_ERR("Failed to set output pin %u active: %i", gpio->pin, err); + } + return err; +} + +static int kscan_charlieplex_set_all_as_input(const struct device *dev) { + const struct kscan_charlieplex_config *config = dev->config; + int err = 0; + for (int i = 0; i < config->cells.len; i++) { + err = kscan_charlieplex_set_as_input(&config->cells.gpios[i]); + if (err) { + return err; + } + } + + return 0; +} + +static int kscan_charlieplex_set_all_outputs(const struct device *dev, const int value) { + const struct kscan_charlieplex_config *config = dev->config; + + for (int i = 0; i < config->cells.len; i++) { + const struct gpio_dt_spec *gpio = &config->cells.gpios[i]; + int err = gpio_pin_configure_dt(gpio, GPIO_OUTPUT); + if (err) { + LOG_ERR("Unable to configure pin %u on %s for input", gpio->pin, gpio->port->name); + return err; + } + + err = gpio_pin_set_dt(gpio, value); + if (err) { + LOG_ERR("Failed to set output %i to %i: %i", i, value, err); + return err; + } + } + + return 0; +} + +static int kscan_charlieplex_interrupt_configure(const struct device *dev, + const gpio_flags_t flags) { + const struct kscan_charlieplex_config *config = dev->config; + const struct gpio_dt_spec *gpio = &config->interrupt; + + int err = gpio_pin_interrupt_configure_dt(gpio, flags); + if (err) { + LOG_ERR("Unable to configure interrupt for pin %u on %s", gpio->pin, gpio->port->name); + return err; + } + + return 0; +} + +static int kscan_charlieplex_interrupt_enable(const struct device *dev) { + int err = kscan_charlieplex_interrupt_configure(dev, GPIO_INT_LEVEL_ACTIVE); + if (err) { + return err; + } + + // While interrupts are enabled, set all outputs active so an pressed key will trigger + return kscan_charlieplex_set_all_outputs(dev, 1); +} + +static void kscan_charlieplex_irq_callback(const struct device *port, struct gpio_callback *cb, + const gpio_port_pins_t _pin) { + struct kscan_charlieplex_data *data = + CONTAINER_OF(cb, struct kscan_charlieplex_data, irq_callback); + + // Disable our interrupt to avoid re-entry while we scan. + kscan_charlieplex_interrupt_configure(data->dev, GPIO_INT_DISABLE); + data->scan_time = k_uptime_get(); + k_work_reschedule(&data->work, K_NO_WAIT); +} + +static void kscan_charlieplex_read_continue(const struct device *dev) { + const struct kscan_charlieplex_config *config = dev->config; + struct kscan_charlieplex_data *data = dev->data; + + data->scan_time += config->debounce_scan_period_ms; + + k_work_reschedule(&data->work, K_TIMEOUT_ABS_MS(data->scan_time)); +} + +static void kscan_charlieplex_read_end(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + const struct kscan_charlieplex_config *config = dev->config; + + if (config->use_interrupt) { + // Return to waiting for an interrupt. + kscan_charlieplex_interrupt_enable(dev); + } else { + data->scan_time += config->poll_period_ms; + + // Return to polling slowly. + k_work_reschedule(&data->work, K_TIMEOUT_ABS_MS(data->scan_time)); + } +} + +static int kscan_charlieplex_read(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + const struct kscan_charlieplex_config *config = dev->config; + bool continue_scan = false; + + // NOTE: RR vs MATRIX: set all pins as input, in case there was a failure on a + // previous scan, and one of the pins is still set as output + int err = kscan_charlieplex_set_all_as_input(dev); + if (err) { + return err; + } + + // Scan the matrix. + for (int row = 0; row < config->cells.len; row++) { + const struct gpio_dt_spec *out_gpio = &config->cells.gpios[row]; + err = kscan_charlieplex_set_as_output(out_gpio); + if (err) { + return err; + } + +#if CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BEFORE_INPUTS > 0 + k_busy_wait(CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BEFORE_INPUTS); +#endif + + for (int col = 0; col < config->cells.len; col++) { + if (col == row) { + continue; // pin can't drive itself + } + const struct gpio_dt_spec *in_gpio = &config->cells.gpios[col]; + const int index = state_index(config, row, col); + + struct zmk_debounce_state *state = &data->charlieplex_state[index]; + zmk_debounce_update(state, gpio_pin_get_dt(in_gpio), config->debounce_scan_period_ms, + &config->debounce_config); + + // NOTE: RR vs MATRIX: because we don't need an input/output => row/column + // setup, we can update in the same loop. + if (zmk_debounce_get_changed(state)) { + const bool pressed = zmk_debounce_is_pressed(state); + + LOG_DBG("Sending event at %i,%i state %s", row, col, pressed ? "on" : "off"); + data->callback(dev, row, col, pressed); + } + continue_scan = continue_scan || zmk_debounce_is_active(state); + } + + err = kscan_charlieplex_set_as_input(out_gpio); + if (err) { + return err; + } +#if CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BETWEEN_OUTPUTS > 0 + k_busy_wait(CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BETWEEN_OUTPUTS); +#endif + } + + if (continue_scan) { + // At least one key is pressed or the debouncer has not yet decided if + // it is pressed. Poll quickly until everything is released. + kscan_charlieplex_read_continue(dev); + } else { + // All keys are released. Return to normal. + kscan_charlieplex_read_end(dev); + } + + return 0; +} + +static void kscan_charlieplex_work_handler(struct k_work *work) { + struct k_work_delayable *dwork = CONTAINER_OF(work, struct k_work_delayable, work); + struct kscan_charlieplex_data *data = CONTAINER_OF(dwork, struct kscan_charlieplex_data, work); + kscan_charlieplex_read(data->dev); +} + +static int kscan_charlieplex_configure(const struct device *dev, const kscan_callback_t callback) { + if (!callback) { + return -EINVAL; + } + + struct kscan_charlieplex_data *data = dev->data; + data->callback = callback; + return 0; +} + +static int kscan_charlieplex_enable(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + data->scan_time = k_uptime_get(); + + // Read will automatically start interrupts/polling once done. + return kscan_charlieplex_read(dev); +} + +static int kscan_charlieplex_disable(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + k_work_cancel_delayable(&data->work); + + const struct kscan_charlieplex_config *config = dev->config; + if (config->use_interrupt) { + return kscan_charlieplex_interrupt_configure(dev, GPIO_INT_DISABLE); + } + return 0; +} + +static int kscan_charlieplex_init_inputs(const struct device *dev) { + const struct kscan_charlieplex_config *config = dev->config; + + for (int i = 0; i < config->cells.len; i++) { + int err = kscan_charlieplex_set_as_input(&config->cells.gpios[i]); + if (err) { + return err; + } + } + + return 0; +} + +static int kscan_charlieplex_init_interrupt(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + + const struct kscan_charlieplex_config *config = dev->config; + const struct gpio_dt_spec *gpio = &config->interrupt; + int err = kscan_charlieplex_set_as_input(gpio); + if (err) { + return err; + } + + gpio_init_callback(&data->irq_callback, kscan_charlieplex_irq_callback, BIT(gpio->pin)); + err = gpio_add_callback(gpio->port, &data->irq_callback); + if (err) { + LOG_ERR("Error adding the callback to the input device: %i", err); + } + return err; +} + +static int kscan_charlieplex_init(const struct device *dev) { + struct kscan_charlieplex_data *data = dev->data; + + data->dev = dev; + + kscan_charlieplex_init_inputs(dev); + kscan_charlieplex_set_all_outputs(dev, 0); + + const struct kscan_charlieplex_config *config = dev->config; + if (config->use_interrupt) { + kscan_charlieplex_init_interrupt(dev); + } + k_work_init_delayable(&data->work, kscan_charlieplex_work_handler); + return 0; +} + +static const struct kscan_driver_api kscan_charlieplex_api = { + .config = kscan_charlieplex_configure, + .enable_callback = kscan_charlieplex_enable, + .disable_callback = kscan_charlieplex_disable, +}; + +#define KSCAN_CHARLIEPLEX_INIT(n) \ + BUILD_ASSERT(INST_DEBOUNCE_PRESS_MS(n) <= DEBOUNCE_COUNTER_MAX, \ + "ZMK_KSCAN_DEBOUNCE_PRESS_MS or debounce-press-ms is too large"); \ + BUILD_ASSERT(INST_DEBOUNCE_RELEASE_MS(n) <= DEBOUNCE_COUNTER_MAX, \ + "ZMK_KSCAN_DEBOUNCE_RELEASE_MS or debounce-release-ms is too large"); \ + \ + static struct zmk_debounce_state kscan_charlieplex_state_##n[INST_CHARLIEPLEX_LEN(n)]; \ + static const struct gpio_dt_spec kscan_charlieplex_cells_##n[] = { \ + LISTIFY(INST_LEN(n), KSCAN_GPIO_CFG_INIT, (, ), n)}; \ + static struct kscan_charlieplex_data kscan_charlieplex_data_##n = { \ + .charlieplex_state = kscan_charlieplex_state_##n, \ + }; \ + \ + static struct kscan_charlieplex_config kscan_charlieplex_config_##n = { \ + .cells = KSCAN_GPIO_LIST(kscan_charlieplex_cells_##n), \ + .debounce_config = \ + { \ + .debounce_press_ms = INST_DEBOUNCE_PRESS_MS(n), \ + .debounce_release_ms = INST_DEBOUNCE_RELEASE_MS(n), \ + }, \ + .debounce_scan_period_ms = DT_INST_PROP(n, debounce_scan_period_ms), \ + COND_ANY_POLLING((.poll_period_ms = DT_INST_PROP(n, poll_period_ms), )) \ + COND_POLL_AND_INTR((.use_interrupt = INST_INTR_DEFINED(n), )) \ + COND_THIS_INTERRUPT(n, (.interrupt = KSCAN_INTR_CFG_INIT(n), ))}; \ + \ + DEVICE_DT_INST_DEFINE(n, &kscan_charlieplex_init, NULL, &kscan_charlieplex_data_##n, \ + &kscan_charlieplex_config_##n, APPLICATION, \ + CONFIG_APPLICATION_INIT_PRIORITY, &kscan_charlieplex_api); + +DT_INST_FOREACH_STATUS_OKAY(KSCAN_CHARLIEPLEX_INIT); diff --git a/app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.yaml b/app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.yaml new file mode 100644 index 00000000000..f8da1d27bb9 --- /dev/null +++ b/app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.yaml @@ -0,0 +1,31 @@ +# Copyright (c) 2023 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: GPIO keyboard charlieplex matrix controller + +compatible: "zmk,kscan-gpio-charlieplex" + +include: kscan.yaml + +properties: + gpios: + type: phandle-array + required: true + interrupt-gpios: + type: phandle-array + debounce-press-ms: + type: int + default: 5 + description: Debounce time for key press in milliseconds. Use 0 for eager debouncing. + debounce-release-ms: + type: int + default: 5 + description: Debounce time for key release in milliseconds. + debounce-scan-period-ms: + type: int + default: 1 + description: Time between reads in milliseconds when any key is pressed. + poll-period-ms: + type: int + default: 1 + description: Time between reads in milliseconds diff --git a/docs/docs/config/kscan.md b/docs/docs/config/kscan.md index 96a483ff902..65ea63ec8b7 100644 --- a/docs/docs/config/kscan.md +++ b/docs/docs/config/kscan.md @@ -149,6 +149,39 @@ The output pins (e.g. columns for `col2row`) should have the flag `GPIO_ACTIVE_H }; ``` +## Charlieplex Driver + +Keyboard scan driver where keys are arranged on a matrix with each GPIO used as both input and output. + +- With `interrupt-gpios` unset, this allows n pins to drive n\*(n-1) keys. +- With `interrupt-gpios` set, n pins will drive (n-1)\*(n-2) keys, but provide much improved power handling. + +Definition file: [zmk/app/module/drivers/kscan/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/module/drivers/kscan/Kconfig) + +| Config | Type | Description | Default | +| --------------------------------------------------- | ----------- | ------------------------------------------------------------------------- | ------- | +| `CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BEFORE_INPUTS` | int (ticks) | How long to wait before reading input pins after setting output active | 0 | +| `CONFIG_ZMK_KSCAN_CHARLIEPLEX_WAIT_BETWEEN_OUTPUTS` | int (ticks) | How long to wait between each output to allow previous output to "settle" | 0 | + +### Devicetree + +Applies to: `compatible = "zmk,kscan-gpio-charlieplex"` + +Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-charlieplex.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/kscan/zmk%2Ckscan-gpio-charlieplex.yaml) + +| Property | Type | Description | Default | +| ------------------------- | ---------- | ------------------------------------------------------------------------------------------- | ------- | +| `gpios` | GPIO array | GPIOs used, listed in order. | | +| `interrupt-gpios` | GPIO array | A single GPIO to use for interrupt. Leaving this empty will enable continuous polling. | | +| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 | +| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 | +| `debounce-scan-period-ms` | int | Time between reads in milliseconds when any key is pressed. | 1 | +| `poll-period-ms` | int | Time between reads in milliseconds when no key is pressed and `interrupt-gpois` is not set. | 10 | + +Define the transform with a [matrix transform](#matrix-transform). The row is always the driven pin, and the column always the receiving pin (input to the controller). +For example, in `RC(5,0)` power flows from the 6th pin in `gpios` to the 1st pin in `gpios`. +Exclude all positions where the row and column are the same as these pairs will never be triggered, since no pin can be both input and output at the same time. + ## Composite Driver Keyboard scan driver which combines multiple other keyboard scan drivers. @@ -393,12 +426,53 @@ Consider a keyboard with a [duplex matrix](https://wiki.ai03.com/books/pcb-desig // Shift Z X C ... // Ctrl Alt ... map = < - RC(0,0) RC(1,0) RC(0,1) RC(1,1) // ... - RC(2,0) RC(3,0) RC(2,1) RC(3,1) // ... - RC(4,0) RC(5,0) RC(4,1) RC(5,1) // ... - RC(6,0) RC(7,0) RC(6,1) RC(7,1) // ... - RC(8,0) RC(8,1) RC(9,1) // ... - RC(10,0) RC(11,0) // ... + RC(0,0) RC(1,0) RC(0,1) RC(1,1) // ... + RC(2,0) RC(3,0) RC(2,1) RC(3,1) // ... + RC(4,0) RC(5,0) RC(4,1) RC(5,1) // ... + RC(6,0) RC(7,0) RC(6,1) RC(7,1) // ... + RC(8,0) RC(9,0) RC(8,1) RC(9,1) // ... + RC(10,0) RC(11,0) // ... + >; + }; +}; +``` + +### Example: Charlieplex + +Since a charlieplex driver will never align with a keyboard directly due to the un-addressable positions, a matrix transform should be used to map the pairs to the layout of the keys. +Note that the entire addressable space does not need to be mapped. + +```devicetree +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-charlieplex"; + + interrupt-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) >; + gpios + = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) > + , <&pro_micro 17 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) > + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) > + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) > + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) > + ; // addressable space is 5x5, (minus paired values) + }; + + default_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + rows = <3>; + columns = <5>; + // Q W E R + // A S D F + // Z X C V + map = < + RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,0) RC(1,2) RC(1,3) RC(1,4) + RC(2,0) RC(2,1) RC(2,3) RC(2,4) >; }; };