diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..c191ccca --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ + +## Board/Shield Check-list + - [ ] This board/shield is tested working on real hardware + - [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield)) + - [ ] `.zmk.yml` metadata file added + - [ ] Proper Copyright + License headers added to applicable files + - [ ] General consistent formatting of DeviceTree files + - [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader)) + - [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable + - [ ] If split, no name added for the right/peripheral half + - [ ] `.conf` file has optional extra features commented out diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi index 0dfe3be5..237f5c45 100644 --- a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi @@ -5,7 +5,7 @@ */ / { - pro_micro_d: connector_d { + pro_micro: connector { compatible = "arduino-pro-micro"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; @@ -25,6 +25,10 @@ , <16 0 &gpio0 28 0> /* D16 B2*/ , <14 0 &gpio0 3 0> /* D14 B3*/ , <15 0 &gpio1 13 0> /* D15 B1*/ + , <18 0 &gpio0 2 0> /* D18/A0 F7*/ + , <19 0 &gpio0 29 0> /* D19/A1 F6*/ + , <20 0 &gpio0 26 0> /* D20/A2 F5*/ + , <21 0 &gpio0 30 0> /* D21/A3 F4*/ ; }; @@ -34,10 +38,10 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpio0 2 0> /* A0 F7*/ - , <1 0 &gpio0 29 0> /* A1 F6*/ - , <2 0 &gpio0 26 0> /* A2 F5*/ - , <3 0 &gpio0 30 0> /* A3 F4*/ + = <0 0 &gpio0 2 0> /* D18/A0 F7*/ + , <1 0 &gpio0 29 0> /* D19/A1 F6*/ + , <2 0 &gpio0 26 0> /* D20/A2 F5*/ + , <3 0 &gpio0 30 0> /* D21/A3 F4*/ , <6 0 &gpio0 20 0> /* D4/A6 D4*/ , <7 0 &gpio0 24 0> /* D6/A7 D7*/ , <8 0 &gpio0 10 0> /* D8/A8 B4*/ @@ -47,6 +51,7 @@ }; }; +pro_micro_d: &pro_micro {}; pro_micro_i2c: &i2c0 {}; pro_micro_spi: &spi0 {}; pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi b/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi index 806cd244..b972451b 100644 --- a/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi @@ -5,7 +5,7 @@ */ / { - pro_micro_d: connector_d { + pro_micro: connector { compatible = "arduino-pro-micro"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; @@ -25,6 +25,10 @@ , <16 0 &gpio0 10 0> /* D16 */ , <14 0 &gpio1 11 0> /* D14 */ , <15 0 &gpio1 13 0> /* D15 */ + , <18 0 &gpio1 15 0> /* D18/A0 */ + , <19 0 &gpio0 2 0> /* D19/A1 */ + , <20 0 &gpio0 29 0> /* D20/A2 */ + , <21 0 &gpio0 31 0> /* D21/A3 */ ; }; @@ -34,10 +38,10 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpio1 15 0> /* A0 */ - , <1 0 &gpio0 2 0> /* A1 */ - , <2 0 &gpio0 29 0> /* A2 */ - , <3 0 &gpio0 31 0> /* A3 */ + = <0 0 &gpio1 15 0> /* D18/A0 */ + , <1 0 &gpio0 2 0> /* D19/A1 */ + , <2 0 &gpio0 29 0> /* D20/A2 */ + , <3 0 &gpio0 31 0> /* D21/A3 */ , <6 0 &gpio0 22 0> /* D4/A6 */ , <7 0 &gpio1 0 0> /* D6/A7 */ , <8 0 &gpio1 4 0> /* D8/A8 */ @@ -47,6 +51,7 @@ }; }; +pro_micro_d: &pro_micro {}; pro_micro_i2c: &i2c0 {}; pro_micro_spi: &spi0 {}; pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi index 558391dd..537aaed3 100644 --- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi @@ -6,7 +6,7 @@ / { - pro_micro_d: connector_d { + pro_micro: connector { compatible = "arduino-pro-micro"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; @@ -24,8 +24,12 @@ , <9 0 &gpio1 6 0> /* D9/A9 */ , <10 0 &gpio1 11 0> /* D10/A10 */ , <16 0 &gpio0 28 0> /* D16 */ - , <14 0 &gpio0 3 0> /* D14 */ + , <14 0 &gpio0 3 0> /* D14 */ , <15 0 &gpio1 13 0> /* D15 */ + , <18 0 &gpio0 2 0> /* D18/A0 */ + , <19 0 &gpio0 29 0> /* D19/A1 */ + , <20 0 &gpio0 31 0> /* D20/A2 */ + , <21 0 &gpio0 30 0> /* D21/A3 */ ; }; @@ -35,10 +39,10 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpio0 2 0> /* A0 */ - , <1 0 &gpio0 29 0> /* A1 */ - , <2 0 &gpio0 31 0> /* A2 */ - , <3 0 &gpio0 30 0> /* A3 */ + = <0 0 &gpio0 2 0> /* D18/A0 */ + , <1 0 &gpio0 29 0> /* D19/A1 */ + , <2 0 &gpio0 31 0> /* D20/A2 */ + , <3 0 &gpio0 30 0> /* D21/A3 */ , <6 0 &gpio0 20 0> /* D4/A6 */ , <7 0 &gpio0 24 0> /* D6/A7 */ , <8 0 &gpio0 10 0> /* D8/A8 */ @@ -49,6 +53,7 @@ }; +pro_micro_d: &pro_micro {}; pro_micro_i2c: &i2c0 {}; pro_micro_spi: &spi0 {}; pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi index 68ca266d..887a3144 100644 --- a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi @@ -5,7 +5,7 @@ */ / { - pro_micro_d: connector_d { + pro_micro: connector { compatible = "arduino-pro-micro"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; @@ -21,10 +21,14 @@ , <7 0 &gpio0 3 0> /* D7 */ , <8 0 &gpio0 28 0> /* D8/A8 */ , <9 0 &gpio1 11 0> /* D9/A9 */ - , <10 0 &gpio1 6 0> /* D10/A10 */ + , <10 0 &gpio1 6 0> /* D10/A10 */ , <16 0 &gpio0 10 0> /* D16 */ - , <14 0 &gpio0 9 0> /* D14 */ + , <14 0 &gpio0 9 0> /* D14 */ , <15 0 &gpio0 24 0> /* D15 */ + , <18 0 &gpio0 13 0> /* D18/A0 */ + , <19 0 &gpio0 20 0> /* D19/A1 */ + , <20 0 &gpio0 17 0> /* D20/A2 */ + , <21 0 &gpio0 15 0> /* D21/A3 */ ; }; @@ -34,10 +38,10 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpio0 13 0> /* A0 */ - , <1 0 &gpio0 20 0> /* A1 */ - , <2 0 &gpio0 17 0> /* A2 */ - , <3 0 &gpio0 15 0> /* A3 */ + = <0 0 &gpio0 13 0> /* D18/A0 */ + , <1 0 &gpio0 20 0> /* D19/A1 */ + , <2 0 &gpio0 17 0> /* D20/A2 */ + , <3 0 &gpio0 15 0> /* D21/A3 */ , <6 0 &gpio0 29 0> /* D4/A6 */ , <7 0 &gpio1 13 0> /* D6/A7 */ , <8 0 &gpio0 28 0> /* D8/A8 */ @@ -47,6 +51,7 @@ }; }; +pro_micro_d: &pro_micro {}; pro_micro_i2c: &i2c0 {}; pro_micro_spi: &spi0 {}; pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi b/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi index 2c32319e..9a026adf 100644 --- a/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi +++ b/app/boards/arm/proton_c/arduino_pro_micro_pins.dtsi @@ -5,7 +5,7 @@ */ / { - pro_micro_d: connector_d { + pro_micro: connector { compatible = "arduino-pro-micro"; #gpio-cells = <2>; gpio-map-mask = <0xffffffff 0xffffffc0>; @@ -25,6 +25,10 @@ , <16 0 &gpiob 15 0> /* D16 */ , <14 0 &gpiob 14 0> /* D14 */ , <15 0 &gpiob 13 0> /* D15 */ + , <18 0 &gpiob 8 0> /* D18/A0 */ + , <19 0 &gpioa 0 0> /* D19/A1 */ + , <20 0 &gpioa 1 0> /* D20/A2 */ + , <21 0 &gpioa 2 0> /* D21/A3 */ ; }; @@ -34,10 +38,10 @@ gpio-map-mask = <0xffffffff 0xffffffc0>; gpio-map-pass-thru = <0 0x3f>; gpio-map - = <0 0 &gpiob 8 0> /* A0 */ - , <1 0 &gpioa 0 0> /* A1 */ - , <2 0 &gpioa 1 0> /* A2 */ - , <3 0 &gpioa 2 0> /* A3 */ + = <0 0 &gpiob 8 0> /* D18/A0 */ + , <1 0 &gpioa 0 0> /* D19/A1 */ + , <2 0 &gpioa 1 0> /* D20/A2 */ + , <3 0 &gpioa 2 0> /* D21/A3 */ , <6 0 &gpiob 5 0> /* D4/A6 */ , <7 0 &gpiob 3 0> /* D6/A7 */ , <8 0 &gpiob 1 0> /* D8/A8 */ @@ -47,6 +51,7 @@ }; }; +pro_micro_d: &pro_micro {}; pro_micro_i2c: &i2c1 {}; pro_micro_spi: &spi2 {}; pro_micro_serial: &usart1 {}; diff --git a/app/boards/shields/a_dux/Kconfig.defconfig b/app/boards/shields/a_dux/Kconfig.defconfig new file mode 100644 index 00000000..3d77a5f8 --- /dev/null +++ b/app/boards/shields/a_dux/Kconfig.defconfig @@ -0,0 +1,19 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_A_DUX_LEFT + +config ZMK_KEYBOARD_NAME + default "A. Dux" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_A_DUX_LEFT || SHIELD_A_DUX_RIGHT + +config ZMK_SPLIT + default y + +endif diff --git a/app/boards/shields/a_dux/Kconfig.shield b/app/boards/shields/a_dux/Kconfig.shield new file mode 100644 index 00000000..6058f290 --- /dev/null +++ b/app/boards/shields/a_dux/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_A_DUX_LEFT + def_bool $(shields_list_contains,a_dux_left) + +config SHIELD_A_DUX_RIGHT + def_bool $(shields_list_contains,a_dux_right) diff --git a/app/boards/shields/a_dux/README.md b/app/boards/shields/a_dux/README.md new file mode 100644 index 00000000..2f84e31a --- /dev/null +++ b/app/boards/shields/a_dux/README.md @@ -0,0 +1,15 @@ +# A. Dux + +Shield configuration for [Architeuthis Dux by Tapi][1] (aka A. Dux, A.D., "Giant Squid"). + +![Wireless Architeuthis Dux with nice!nano controllers][2] + +This shield is an adaptation of the direct pin [Cradio shield by @davidphilipbarr][3]. + +## Cephalopoda + +Check out the rest of Tapi's Cephalopoda collection of low profile split ergonomic mechanical keyboards at . + +[1]: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux +[2]: https://media.discordapp.net/attachments/855822038287908864/866315666802081792/image0.jpg +[3]: https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields/cradio diff --git a/app/boards/shields/a_dux/a_dux.conf b/app/boards/shields/a_dux/a_dux.conf new file mode 100644 index 00000000..fa971579 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT diff --git a/app/boards/shields/a_dux/a_dux.dtsi b/app/boards/shields/a_dux/a_dux.dtsi new file mode 100644 index 00000000..4c28d655 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux.dtsi @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <34>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) + RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) + RC(0,15) RC(0,16) RC(0,33) RC(0,32) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + input-gpios = + <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + +}; diff --git a/app/boards/shields/a_dux/a_dux.keymap b/app/boards/shields/a_dux/a_dux.keymap new file mode 100644 index 00000000..eda03ff9 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux.keymap @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/ { + + keymap { + compatible = "zmk,keymap"; + + // This is a sample keymap intended to be replaced with your own + base_layer { + 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 + &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH + &kp TAB &kp BSPC &kp SPACE &kp ENTER + >; + }; + + }; +}; diff --git a/app/boards/shields/a_dux/a_dux.zmk.yml b/app/boards/shields/a_dux/a_dux.zmk.yml new file mode 100644 index 00000000..b19a2421 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux.zmk.yml @@ -0,0 +1,11 @@ +file_format: "1" +id: a_dux +name: A. Dux +type: shield +url: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux +requires: [pro_micro] +features: + - keys +siblings: + - a_dux_left + - a_dux_right diff --git a/app/boards/shields/a_dux/a_dux_left.overlay b/app/boards/shields/a_dux/a_dux_left.overlay new file mode 100644 index 00000000..c6910607 --- /dev/null +++ b/app/boards/shields/a_dux/a_dux_left.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "a_dux.dtsi" diff --git a/app/boards/shields/a_dux/a_dux_right.overlay b/app/boards/shields/a_dux/a_dux_right.overlay new file mode 100644 index 00000000..0034317e --- /dev/null +++ b/app/boards/shields/a_dux/a_dux_right.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "a_dux.dtsi" + +&default_transform { + col-offset = <17>; +}; diff --git a/app/boards/shields/bfo9000/Kconfig.defconfig b/app/boards/shields/bfo9000/Kconfig.defconfig index a8584886..c927ea2d 100644 --- a/app/boards/shields/bfo9000/Kconfig.defconfig +++ b/app/boards/shields/bfo9000/Kconfig.defconfig @@ -4,20 +4,13 @@ if SHIELD_BFO9000_LEFT config ZMK_KEYBOARD_NAME - default "BFO9000 Left" + default "BFO-9000" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_BFO9000_RIGHT - -config ZMK_KEYBOARD_NAME - default "BFO9000 Right" - -endif - if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/bfo9000/bfo9000.dtsi b/app/boards/shields/bfo9000/bfo9000.dtsi index 33b364e1..0ceb9127 100644 --- a/app/boards/shields/bfo9000/bfo9000.dtsi +++ b/app/boards/shields/bfo9000/bfo9000.dtsi @@ -32,12 +32,12 @@ diode-direction = "col2row"; row-gpios - = <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/bfo9000/bfo9000_left.overlay b/app/boards/shields/bfo9000/bfo9000_left.overlay index 777f0835..3f034d95 100644 --- a/app/boards/shields/bfo9000/bfo9000_left.overlay +++ b/app/boards/shields/bfo9000/bfo9000_left.overlay @@ -8,14 +8,14 @@ &kscan0 { col-gpios - = <&pro_micro_d 9 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/bfo9000/bfo9000_right.overlay b/app/boards/shields/bfo9000/bfo9000_right.overlay index ab3fb55f..30bd35e2 100644 --- a/app/boards/shields/bfo9000/bfo9000_right.overlay +++ b/app/boards/shields/bfo9000/bfo9000_right.overlay @@ -12,14 +12,14 @@ &kscan0 { col-gpios - = <&pro_micro_d 9 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/boardsource3x4/boardsource3x4.overlay b/app/boards/shields/boardsource3x4/boardsource3x4.overlay index 0b8f8498..afbc9abf 100644 --- a/app/boards/shields/boardsource3x4/boardsource3x4.overlay +++ b/app/boards/shields/boardsource3x4/boardsource3x4.overlay @@ -17,16 +17,16 @@ diode-direction = "col2row"; row-gpios - = <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 2 (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)> ; col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> ; }; }; \ No newline at end of file diff --git a/app/boards/shields/corne/Kconfig.defconfig b/app/boards/shields/corne/Kconfig.defconfig index ef4817b5..35bc2991 100644 --- a/app/boards/shields/corne/Kconfig.defconfig +++ b/app/boards/shields/corne/Kconfig.defconfig @@ -8,13 +8,6 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL endif -if SHIELD_CORNE_RIGHT - -config ZMK_KEYBOARD_NAME - default "Corne Right" - -endif - if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/corne/corne.dtsi b/app/boards/shields/corne/corne.dtsi index bb37d67a..167c0916 100644 --- a/app/boards/shields/corne/corne.dtsi +++ b/app/boards/shields/corne/corne.dtsi @@ -50,10 +50,10 @@ 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 diode-direction = "col2row"; row-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/corne/corne_left.overlay b/app/boards/shields/corne/corne_left.overlay index 399bddd1..fe7e3c78 100644 --- a/app/boards/shields/corne/corne_left.overlay +++ b/app/boards/shields/corne/corne_left.overlay @@ -8,11 +8,11 @@ &kscan0 { col-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/corne/corne_right.overlay b/app/boards/shields/corne/corne_right.overlay index 4250ac55..6e79a858 100644 --- a/app/boards/shields/corne/corne_right.overlay +++ b/app/boards/shields/corne/corne_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/cradio/Kconfig.defconfig b/app/boards/shields/cradio/Kconfig.defconfig index 1a008d69..d5f8f4e0 100644 --- a/app/boards/shields/cradio/Kconfig.defconfig +++ b/app/boards/shields/cradio/Kconfig.defconfig @@ -11,14 +11,7 @@ config ZMK_SPLIT_BLE_ROLE_CENTRAL endif -if SHIELD_CRADIO_RIGHT - -config ZMK_KEYBOARD_NAME - default "Cradio_Right" - -endif - -if SHIELD_CRADIO_RIGHT || SHIELD_CRADIO_LEFT +if SHIELD_CRADIO_LEFT || SHIELD_CRADIO_RIGHT config ZMK_SPLIT default y diff --git a/app/boards/shields/cradio/cradio.dtsi b/app/boards/shields/cradio/cradio.dtsi index db222581..ca464c95 100644 --- a/app/boards/shields/cradio/cradio.dtsi +++ b/app/boards/shields/cradio/cradio.dtsi @@ -29,23 +29,23 @@ compatible = "zmk,kscan-gpio-direct"; label = "KSCAN"; input-gpios - = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_a 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; }; diff --git a/app/boards/shields/crbn/crbn.overlay b/app/boards/shields/crbn/crbn.overlay index 7520daec..18382cce 100644 --- a/app/boards/shields/crbn/crbn.overlay +++ b/app/boards/shields/crbn/crbn.overlay @@ -17,33 +17,33 @@ diode-direction = "col2row"; col-gpios - = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 9 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 3 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; encoder: encoder { compatible = "alps,ec11"; label = "ENCODER"; - a-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <2>; status = "okay"; }; diff --git a/app/boards/shields/eek/eek.overlay b/app/boards/shields/eek/eek.overlay index 11b98686..3f830f07 100644 --- a/app/boards/shields/eek/eek.overlay +++ b/app/boards/shields/eek/eek.overlay @@ -30,23 +30,23 @@ diode-direction = "col2row"; col-gpios - = <&pro_micro_d 4 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; }; \ No newline at end of file diff --git a/app/boards/shields/helix/Kconfig.defconfig b/app/boards/shields/helix/Kconfig.defconfig index f0a4f880..385b95ea 100644 --- a/app/boards/shields/helix/Kconfig.defconfig +++ b/app/boards/shields/helix/Kconfig.defconfig @@ -4,20 +4,13 @@ if SHIELD_HELIX_LEFT config ZMK_KEYBOARD_NAME - default "Helix Left" + default "Helix" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_HELIX_RIGHT - -config ZMK_KEYBOARD_NAME - default "Helix Right" - -endif - if SHIELD_HELIX_LEFT || SHIELD_HELIX_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/helix/helix.dtsi b/app/boards/shields/helix/helix.dtsi index 8df943f0..45457560 100644 --- a/app/boards/shields/helix/helix.dtsi +++ b/app/boards/shields/helix/helix.dtsi @@ -36,11 +36,11 @@ 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 diode-direction = "col2row"; row-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/helix/helix_left.overlay b/app/boards/shields/helix/helix_left.overlay index 733e55f9..5b0c7623 100644 --- a/app/boards/shields/helix/helix_left.overlay +++ b/app/boards/shields/helix/helix_left.overlay @@ -8,12 +8,12 @@ &kscan0 { col-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/helix/helix_right.overlay b/app/boards/shields/helix/helix_right.overlay index 2383a30e..42dd0f52 100644 --- a/app/boards/shields/helix/helix_right.overlay +++ b/app/boards/shields/helix/helix_right.overlay @@ -12,12 +12,12 @@ &kscan0 { col-gpios - = <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig index 57b8c1ee..59e4f388 100644 --- a/app/boards/shields/iris/Kconfig.defconfig +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -4,20 +4,13 @@ if SHIELD_IRIS_LEFT config ZMK_KEYBOARD_NAME - default "Iris Left" + default "Iris" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_IRIS_RIGHT - -config ZMK_KEYBOARD_NAME - default "Iris Right" - -endif - if SHIELD_IRIS_LEFT || SHIELD_IRIS_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/iris/iris.dtsi b/app/boards/shields/iris/iris.dtsi index eb065736..24099f61 100644 --- a/app/boards/shields/iris/iris.dtsi +++ b/app/boards/shields/iris/iris.dtsi @@ -36,11 +36,11 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/iris/iris_left.overlay b/app/boards/shields/iris/iris_left.overlay index 7ded678b..2c52fca8 100644 --- a/app/boards/shields/iris/iris_left.overlay +++ b/app/boards/shields/iris/iris_left.overlay @@ -8,11 +8,11 @@ &kscan0 { col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/iris/iris_right.overlay b/app/boards/shields/iris/iris_right.overlay index 51965821..2ed712a2 100644 --- a/app/boards/shields/iris/iris_right.overlay +++ b/app/boards/shields/iris/iris_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/jian/Kconfig.defconfig b/app/boards/shields/jian/Kconfig.defconfig index fc1f1995..e2bbb407 100644 --- a/app/boards/shields/jian/Kconfig.defconfig +++ b/app/boards/shields/jian/Kconfig.defconfig @@ -2,21 +2,13 @@ if SHIELD_JIAN_LEFT config ZMK_KEYBOARD_NAME - default "Jian Left" + default "Jian" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif - -if SHIELD_JIAN_RIGHT - -config ZMK_KEYBOARD_NAME - default "Jian Right" - -endif - if SHIELD_JIAN_LEFT || SHIELD_JIAN_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/jian/jian.dtsi b/app/boards/shields/jian/jian.dtsi index 88bac831..34c0298e 100644 --- a/app/boards/shields/jian/jian.dtsi +++ b/app/boards/shields/jian/jian.dtsi @@ -66,10 +66,10 @@ diode-direction = "col2row"; row-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/jian/jian_left.overlay b/app/boards/shields/jian/jian_left.overlay index 553dbd05..e7f9d5b5 100644 --- a/app/boards/shields/jian/jian_left.overlay +++ b/app/boards/shields/jian/jian_left.overlay @@ -8,11 +8,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/jian/jian_right.overlay b/app/boards/shields/jian/jian_right.overlay index 1430b817..f3b0da3d 100644 --- a/app/boards/shields/jian/jian_right.overlay +++ b/app/boards/shields/jian/jian_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 1 GPIO_ACTIVE_HIGH> + = <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig index 860cb12f..5e5830db 100644 --- a/app/boards/shields/jorne/Kconfig.defconfig +++ b/app/boards/shields/jorne/Kconfig.defconfig @@ -2,21 +2,13 @@ if SHIELD_JORNE_LEFT config ZMK_KEYBOARD_NAME - default "Jorne Left" + default "Jorne" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif - -if SHIELD_JORNE_RIGHT - -config ZMK_KEYBOARD_NAME - default "Jorne Right" - -endif - if SHIELD_JORNE_LEFT || SHIELD_JORNE_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index c782d520..a84798cc 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -66,10 +66,10 @@ 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 diode-direction = "col2row"; row-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/jorne/jorne_left.overlay b/app/boards/shields/jorne/jorne_left.overlay index 065a23da..7e132cd9 100644 --- a/app/boards/shields/jorne/jorne_left.overlay +++ b/app/boards/shields/jorne/jorne_left.overlay @@ -8,11 +8,11 @@ &kscan0 { col-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 5a0be2cc..4f138b0b 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 99e47bfe..57a701a9 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -2,21 +2,13 @@ if SHIELD_KYRIA_LEFT config ZMK_KEYBOARD_NAME - default "Kyria Left" + default "Kyria" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif - -if SHIELD_KYRIA_RIGHT - -config ZMK_KEYBOARD_NAME - default "Kyria Right" - -endif - if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/kyria/kyria.dtsi b/app/boards/shields/kyria/kyria.dtsi index c0bec79b..2d5114ec 100644 --- a/app/boards/shields/kyria/kyria.dtsi +++ b/app/boards/shields/kyria/kyria.dtsi @@ -50,10 +50,10 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; @@ -61,8 +61,8 @@ 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) left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -70,8 +70,8 @@ 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) right_encoder: encoder_right { compatible = "alps,ec11"; label = "RIGHT_ENCODER"; - a-gpios = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; diff --git a/app/boards/shields/kyria/kyria_left.overlay b/app/boards/shields/kyria/kyria_left.overlay index c8b5be27..20ced548 100644 --- a/app/boards/shields/kyria/kyria_left.overlay +++ b/app/boards/shields/kyria/kyria_left.overlay @@ -8,14 +8,14 @@ &kscan0 { col-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/kyria/kyria_right.overlay b/app/boards/shields/kyria/kyria_right.overlay index 8163c95e..eefd76bf 100644 --- a/app/boards/shields/kyria/kyria_right.overlay +++ b/app/boards/shields/kyria/kyria_right.overlay @@ -12,14 +12,14 @@ &kscan0 { col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index 915cc70e..c09fcd7d 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -2,20 +2,13 @@ if SHIELD_LILY58_LEFT config ZMK_KEYBOARD_NAME - default "Lily58 Left" + default "Lily58" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_LILY58_RIGHT - -config ZMK_KEYBOARD_NAME - default "Lily58 Right" - -endif - if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index db54cf4d..8e8ed3f2 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -36,11 +36,11 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; @@ -48,8 +48,8 @@ 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_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; }; diff --git a/app/boards/shields/lily58/lily58_left.overlay b/app/boards/shields/lily58/lily58_left.overlay index 7397f188..daa53651 100644 --- a/app/boards/shields/lily58/lily58_left.overlay +++ b/app/boards/shields/lily58/lily58_left.overlay @@ -8,12 +8,12 @@ &kscan0 { col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/lily58/lily58_right.overlay b/app/boards/shields/lily58/lily58_right.overlay index 4fc460cf..18ec806b 100644 --- a/app/boards/shields/lily58/lily58_right.overlay +++ b/app/boards/shields/lily58/lily58_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index be39c9f8..4115577d 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -4,21 +4,13 @@ if SHIELD_MICRODOX_LEFT config ZMK_KEYBOARD_NAME - default "Microdox Left" + default "Microdox" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif - -if SHIELD_MICRODOX_RIGHT - -config ZMK_KEYBOARD_NAME - default "Microdox Right" - -endif - if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/microdox/microdox.dtsi b/app/boards/shields/microdox/microdox.dtsi index a692ce4d..d489430e 100644 --- a/app/boards/shields/microdox/microdox.dtsi +++ b/app/boards/shields/microdox/microdox.dtsi @@ -34,10 +34,10 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/microdox/microdox_left.overlay b/app/boards/shields/microdox/microdox_left.overlay index 4d0378e5..307776e7 100644 --- a/app/boards/shields/microdox/microdox_left.overlay +++ b/app/boards/shields/microdox/microdox_left.overlay @@ -8,10 +8,10 @@ &kscan0 { col-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/microdox/microdox_right.overlay b/app/boards/shields/microdox/microdox_right.overlay index 0801c7e1..5475c31f 100644 --- a/app/boards/shields/microdox/microdox_right.overlay +++ b/app/boards/shields/microdox/microdox_right.overlay @@ -17,10 +17,10 @@ &kscan0 { col-gpios - = <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/naked60/Kconfig.defconfig b/app/boards/shields/naked60/Kconfig.defconfig new file mode 100644 index 00000000..ff5978bc --- /dev/null +++ b/app/boards/shields/naked60/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_NAKED60 + +config ZMK_KEYBOARD_NAME + default "Naked60BMP" + +endif \ No newline at end of file diff --git a/app/boards/shields/naked60/Kconfig.shield b/app/boards/shields/naked60/Kconfig.shield new file mode 100644 index 00000000..61053686 --- /dev/null +++ b/app/boards/shields/naked60/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_NAKED60 + def_bool $(shields_list_contains,naked60) diff --git a/app/boards/shields/naked60/naked60.conf b/app/boards/shields/naked60/naked60.conf new file mode 100644 index 00000000..e69de29b diff --git a/app/boards/shields/naked60/naked60.keymap b/app/boards/shields/naked60/naked60.keymap new file mode 100644 index 00000000..d380a599 --- /dev/null +++ b/app/boards/shields/naked60/naked60.keymap @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // ---------------------------------------------------------------------------------------------------------- + // | ESC | 1 | 2 | 3 | 4 | 5 |-------|-------| 6 | 7 | 8 | 9 | 0 | BSPC | + // | TAB | Q | W | E | R | T |-------|-------| Y | U | I | O | P | \ | + // | SHIFT | A | S | D | F | G |-------|-------| H | J | K | L | ; | ' | + // | CTRL | Z | X | C | V | B |-------|-------| N | M | , | . | / | ENTER | + // |-------|ADJUST| LCTL | LALT | LGUI | LOWR | SPACE | SPACE | RAIS | LARW | DARW | UARW | RARW |-------| + + + bindings = < + &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC + &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 LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET + &mo 3 &kp LCTRL &kp LALT &kp LGUI &mo 1 &kp SPACE &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + + lower { + // ---------------------------------------------------------------------------------------------------------- + // | ESC | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | F12 | + // | ~ | ! | @ | # | $ | % |-------|-------| ^ | & | * | ( | ) | DEL | + // | | F1 | F2 | F3 | F4 | F5 |-------|-------| F6 | _ | + | { | } | | | + // | | F7 | F8 | F9 | F10 | F11 |-------|-------| F12 | LS(#) |LS(|) | | | | + // |-------| | | | | | | | | NEXT | Vol- | Vol+ | PLAY |-------| + bindings = < + &kp ESC &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp DEL + &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp LS(NON_US_HASH) &kp LS(NON_US_BSLH) &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &mo 3 &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PLAY_PAUSE + >; + }; + + raise { + // ---------------------------------------------------------------------------------------------------------- + // | ESC | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | F12 | + // | ~ | 1 | 2 | 3 | 4 | 5 |-------|-------| 6 | 7 | 8 | 9 | 0 | DEL | + // | DEL | F1 | F2 | F3 | F4 | F5 |-------|-------| F6 | - | = | [ | ] | \ | + // | | F7 | F8 | F9 | F10 | F11 |-------|-------| F12 | # | | | | | | + // |-------| | | | | | | | | | | | |-------| + bindings = < + &kp ESC &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &kp TILDE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp NON_US_HASH &kp NON_US_BSLH &trans &trans &trans + &trans &trans &trans &trans &mo 3 &trans &trans &trans &trans &trans &trans &trans + >; + }; + + adjust { + // ---------------------------------------------------------------------------------------------------------- + // |tog(4)| F2 | F3 | F4 | F5 | F6 |------|------| F7 | F8 | F9 | F10 | F11 | F12 | + // | | NA | NA | NA | NA | NA |------|------| NA | NA | NA | NA | NA |LALT(PRTSN)| + // | | NA | NA | NA | NA | NA |------|------| NA | NA | NA | NA | NA | PRTSN | + // | | NA | NA | NA | NA | NA |------|------| NA | NA | NA | NA | NA |LCTRL(DEL) | + // |------| | | | | |BOOTLD|BOOTLD| | | | | |-----------| + bindings = < + &tog 4 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 + &trans &none &none &none &none &none &none &none &none &none &none &kp LA(PSCRN) + &trans &none &none &none &none &none &none &none &none &none &none &kp PSCRN + &trans &none &none &none &none &none &none &none &none &none &none &kp LC(DEL) + &trans &trans &trans &trans &trans &bootloader &bootloader &trans &trans &trans &trans &trans + >; + }; + + flock { + // ---------------------------------------------------------------------------------------------------------- + // |tog(4) | F2 | F3 | F4 | F5 | F6 |-------|-------| F7 | F8 | F9 | F10 | F11 | | + // |out tog|BT_SEL 0|BT_SEL 1|BT_SEL 2|BT_SEL 3|BT_SEL 4|-------|-------|BT_PRV|BT_NXT|BT_CLR| | | | + // | | | | | | |-------|-------| | | | | | | + // | | | | | | |-------|-------| | | | | | | + // |-------| | | | | | | | | | | | |------| + bindings = < + &tog 4 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans + &out OUT_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_PRV &bt BT_NXT &bt BT_CLR &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 &trans &trans &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/naked60/naked60.overlay b/app/boards/shields/naked60/naked60.overlay new file mode 100644 index 00000000..2260a4af --- /dev/null +++ b/app/boards/shields/naked60/naked60.overlay @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro 21 GPIO_ACTIVE_HIGH> // col 0 + , <&pro_micro 20 GPIO_ACTIVE_HIGH> // col 1 + , <&pro_micro 19 GPIO_ACTIVE_HIGH> // col 2 + , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col 3 + , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col 4 + , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col 5 + , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col 6 + , <&pro_micro 6 GPIO_ACTIVE_HIGH> // col 7 + , <&pro_micro 7 GPIO_ACTIVE_HIGH> // col 8 + , <&pro_micro 8 GPIO_ACTIVE_HIGH> // col 9 + , <&pro_micro 9 GPIO_ACTIVE_HIGH> // col 10 + , <&pro_micro 1 GPIO_ACTIVE_HIGH> // col 11 + ; + + row-gpios + = <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // row 0 + , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // row 1 + , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // row 2 + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // row 3 + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // row 4 + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/naked60/naked60.zmk.yml b/app/boards/shields/naked60/naked60.zmk.yml new file mode 100644 index 00000000..932c2298 --- /dev/null +++ b/app/boards/shields/naked60/naked60.zmk.yml @@ -0,0 +1,8 @@ +file_format: "1" +id: naked60 +name: Naked60 +type: shield +url: https://salicylic-acid3.hatenablog.com/ +requires: [pro_micro] +features: + - keys diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index 3fd3c06c..9e2fced8 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -15,8 +15,8 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; label = "Encoder 1"; - a-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "okay"; }; @@ -26,17 +26,17 @@ label = "KSCAN"; polling-interval-msec = <25>; input-gpios - = <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> - , <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + = <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; output-gpios - = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + = <&pro_micro 21 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/qaz/qaz.overlay b/app/boards/shields/qaz/qaz.overlay index 205f7c26..098c9f02 100644 --- a/app/boards/shields/qaz/qaz.overlay +++ b/app/boards/shields/qaz/qaz.overlay @@ -31,22 +31,22 @@ diode-direction = "col2row"; col-gpios - = <&pro_micro_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 9 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> + = <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/quefrency/Kconfig.defconfig b/app/boards/shields/quefrency/Kconfig.defconfig index de44702f..1122199e 100644 --- a/app/boards/shields/quefrency/Kconfig.defconfig +++ b/app/boards/shields/quefrency/Kconfig.defconfig @@ -5,20 +5,13 @@ if SHIELD_QUEFRENCY_LEFT config ZMK_KEYBOARD_NAME - default "Quefrency Left" + default "Quefrency" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_QUEFRENCY_RIGHT - -config ZMK_KEYBOARD_NAME - default "Quefrency Right" - -endif - if SHIELD_QUEFRENCY_LEFT || SHIELD_QUEFRENCY_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/quefrency/quefrency_left.overlay b/app/boards/shields/quefrency/quefrency_left.overlay index a385cc58..a0f483ef 100644 --- a/app/boards/shields/quefrency/quefrency_left.overlay +++ b/app/boards/shields/quefrency/quefrency_left.overlay @@ -17,21 +17,21 @@ col-gpios - = <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + = <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; }; diff --git a/app/boards/shields/quefrency/quefrency_right.overlay b/app/boards/shields/quefrency/quefrency_right.overlay index 53e0f77c..8e42d555 100644 --- a/app/boards/shields/quefrency/quefrency_right.overlay +++ b/app/boards/shields/quefrency/quefrency_right.overlay @@ -23,23 +23,23 @@ col-gpios - = <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + = <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; }; diff --git a/app/boards/shields/reviung41/reviung41.overlay b/app/boards/shields/reviung41/reviung41.overlay index 5336853b..55900cc9 100644 --- a/app/boards/shields/reviung41/reviung41.overlay +++ b/app/boards/shields/reviung41/reviung41.overlay @@ -31,22 +31,22 @@ 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) diode-direction = "col2row"; col-gpios - = <&pro_micro_d 4 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 9 GPIO_ACTIVE_HIGH> + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; }; diff --git a/app/boards/shields/romac/romac.overlay b/app/boards/shields/romac/romac.overlay index e0880d3f..827273a4 100644 --- a/app/boards/shields/romac/romac.overlay +++ b/app/boards/shields/romac/romac.overlay @@ -17,16 +17,16 @@ diode-direction = "col2row"; row-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; col-gpios - = <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + = <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/romac_plus/romac_plus.dtsi b/app/boards/shields/romac_plus/romac_plus.dtsi index 48f73412..0fd4374a 100644 --- a/app/boards/shields/romac_plus/romac_plus.dtsi +++ b/app/boards/shields/romac_plus/romac_plus.dtsi @@ -31,18 +31,18 @@ RC(3,0) RC(3,1) RC(3,2) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; diff --git a/app/boards/shields/romac_plus/romac_plus.overlay b/app/boards/shields/romac_plus/romac_plus.overlay index 86430349..4ef38744 100644 --- a/app/boards/shields/romac_plus/romac_plus.overlay +++ b/app/boards/shields/romac_plus/romac_plus.overlay @@ -18,9 +18,9 @@ diode-direction = "col2row"; col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/settings_reset/settings_reset.overlay b/app/boards/shields/settings_reset/settings_reset.overlay index 7a6629f8..51e04ba7 100644 --- a/app/boards/shields/settings_reset/settings_reset.overlay +++ b/app/boards/shields/settings_reset/settings_reset.overlay @@ -16,7 +16,7 @@ label = "KSCAN"; input-gpios - = <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + = <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> ; }; diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 6a580bfe..fcee7fbe 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -4,20 +4,13 @@ if SHIELD_SOFLE_LEFT config ZMK_KEYBOARD_NAME - default "Sofle Left" + default "Sofle" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_SOFLE_RIGHT - -config ZMK_KEYBOARD_NAME - default "Sofle Right" - -endif - if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index 9c55fc3c..9646b59d 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -36,19 +36,19 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; left_encoder: encoder_left { compatible = "alps,ec11"; label = "LEFT_ENCODER"; - a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -56,8 +56,8 @@ 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_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; diff --git a/app/boards/shields/sofle/sofle_left.overlay b/app/boards/shields/sofle/sofle_left.overlay index eb2bfeda..13bfb397 100644 --- a/app/boards/shields/sofle/sofle_left.overlay +++ b/app/boards/shields/sofle/sofle_left.overlay @@ -8,12 +8,12 @@ &kscan0 { col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + = <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/sofle/sofle_right.overlay b/app/boards/shields/sofle/sofle_right.overlay index c35cf52c..53b10e60 100644 --- a/app/boards/shields/sofle/sofle_right.overlay +++ b/app/boards/shields/sofle/sofle_right.overlay @@ -12,12 +12,12 @@ &kscan0 { col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 41c1218a..21cc3256 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -6,20 +6,13 @@ if SHIELD_SPLITREUS62_LEFT config ZMK_KEYBOARD_NAME - default "Splitreus62 Left" + default "Splitreus62" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_SPLITREUS62_RIGHT - -config ZMK_KEYBOARD_NAME - default "Splitreus62 Rt" - -endif - if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT config ZMK_SPLIT diff --git a/app/boards/shields/splitreus62/splitreus62.dtsi b/app/boards/shields/splitreus62/splitreus62.dtsi index d88d06cb..4b55bb8d 100644 --- a/app/boards/shields/splitreus62/splitreus62.dtsi +++ b/app/boards/shields/splitreus62/splitreus62.dtsi @@ -38,12 +38,12 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) diode-direction = "row2col"; row-gpios - = <&pro_micro_d 1 GPIO_ACTIVE_HIGH > - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 6 GPIO_ACTIVE_HIGH> + = <&pro_micro 1 GPIO_ACTIVE_HIGH > + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/splitreus62/splitreus62_left.overlay b/app/boards/shields/splitreus62/splitreus62_left.overlay index b156d608..ba5c21ff 100644 --- a/app/boards/shields/splitreus62/splitreus62_left.overlay +++ b/app/boards/shields/splitreus62/splitreus62_left.overlay @@ -8,11 +8,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/splitreus62/splitreus62_right.overlay b/app/boards/shields/splitreus62/splitreus62_right.overlay index 5db87cc3..f301ab99 100644 --- a/app/boards/shields/splitreus62/splitreus62_right.overlay +++ b/app/boards/shields/splitreus62/splitreus62_right.overlay @@ -12,11 +12,11 @@ &kscan0 { col-gpios - = <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; diff --git a/app/boards/shields/tg4x/tg4x.overlay b/app/boards/shields/tg4x/tg4x.overlay index 38e4faa7..0df94a2b 100644 --- a/app/boards/shields/tg4x/tg4x.overlay +++ b/app/boards/shields/tg4x/tg4x.overlay @@ -14,24 +14,24 @@ diode-direction = "col2row"; row-gpios - = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; col-gpios - = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + = <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 19 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; diff --git a/app/boards/shields/tidbit/tidbit.dtsi b/app/boards/shields/tidbit/tidbit.dtsi index 004de310..2b08ad49 100644 --- a/app/boards/shields/tidbit/tidbit.dtsi +++ b/app/boards/shields/tidbit/tidbit.dtsi @@ -14,18 +14,18 @@ diode-direction = "row2col"; row-gpios - = <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; col-gpios - = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; @@ -47,8 +47,8 @@ encoder_1_top_row: encoder_1_top_row { compatible = "alps,ec11"; label = "Top Row Encoder"; - a-gpios = <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -56,8 +56,8 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; label = "Encoder 1"; - a-gpios = <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -65,8 +65,8 @@ encoder_2: encoder_2 { compatible = "alps,ec11"; label = "Encoder 2"; - a-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -74,8 +74,8 @@ encoder_3: encoder_3 { compatible = "alps,ec11"; label = "Encoder 3"; - a-gpios = <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; @@ -83,8 +83,8 @@ encoder_4: encoder_4 { compatible = "alps,ec11"; label = "Encoder 4"; - a-gpios = <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; }; diff --git a/app/boards/shields/zodiark/Kconfig.defconfig b/app/boards/shields/zodiark/Kconfig.defconfig new file mode 100644 index 00000000..cdad43f6 --- /dev/null +++ b/app/boards/shields/zodiark/Kconfig.defconfig @@ -0,0 +1,55 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_ZODIARK_LEFT + +config ZMK_KEYBOARD_NAME + default "Zodiark" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_ZODIARK_LEFT || SHIELD_ZODIARK_RIGHT + +config ZMK_SPLIT + default y + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES_MAX + default 128 + +config LVGL_VER_RES_MAX + default 64 + +config LVGL_VDB_SIZE + default 64 + +config LVGL_DPI + default 148 + +config LVGL_BITS_PER_PIXEL + default 1 + +choice LVGL_COLOR_DEPTH + default LVGL_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif diff --git a/app/boards/shields/zodiark/Kconfig.shield b/app/boards/shields/zodiark/Kconfig.shield new file mode 100644 index 00000000..25e23a14 --- /dev/null +++ b/app/boards/shields/zodiark/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_ZODIARK_LEFT + def_bool $(shields_list_contains,zodiark_left) + +config SHIELD_ZODIARK_RIGHT + def_bool $(shields_list_contains,zodiark_right) diff --git a/app/boards/shields/zodiark/zodiark.conf b/app/boards/shields/zodiark/zodiark.conf new file mode 100644 index 00000000..64784850 --- /dev/null +++ b/app/boards/shields/zodiark/zodiark.conf @@ -0,0 +1,9 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Uncomment the following line to enable the Zodiark OLED Display +# CONFIG_ZMK_DISPLAY=y + +# Uncomment these two lines to add support for encoders +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/zodiark/zodiark.dtsi b/app/boards/shields/zodiark/zodiark.dtsi new file mode 100644 index 00000000..0adb7f67 --- /dev/null +++ b/app/boards/shields/zodiark/zodiark.dtsi @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <18>; + rows = <4>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW13 | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | SW13 | +// | SW20 | SW19 | SW18 | SW17 | SW16 | SW15 | SW14 | | SW14 | SW15 | SW16 | SW17 | SW18 | SW19 | SW20 | +// | SW28 | SW27 | SW26 | SW25 | SW24 | SW23 | SW22 | SW21 | | SW21 | SW22 | SW23 | SW24 | SW25 | SW26 | SW27 | SW28 | +// | SW35 | SW34 | SW33 | SW32 | SW31 | SW30 | SW29 | | SW29 | SW30 | SW31 | SW32 | SW33 | SW34 | SW35 | + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) 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(0,6) RC(0,7) 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(1,6) RC(1,7) 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(2,6) RC(3,6) RC(3,7) RC(2,7) 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(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + 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)>; + resolution = <4>; + status = "disabled"; + }; + + 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)>; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <64>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + prechargep = <0x22>; + }; +}; diff --git a/app/boards/shields/zodiark/zodiark.keymap b/app/boards/shields/zodiark/zodiark.keymap new file mode 100644 index 00000000..21fdef10 --- /dev/null +++ b/app/boards/shields/zodiark/zodiark.keymap @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSPC | +// | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | +// | CAPS | A | S | D | F | G | - | | = | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | ` | MUTE | | PRNT | DEL | N | M | , | . | / | ENTER | +// | CTRL | ALT | GUI | MENU | LOWER| SPACE | ENTER | | ENTER | SPACE | RAISE| LEFT | DOWN | UP | RIGHT | + bindings = < +&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp LBKT &kp RBKT &kp Y &kp U &kp I &kp O &kp P &kp BSLH +&kp TAB &kp A &kp S &kp D &kp F &kp G &kp MINUS &kp EQUAL &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 GRAVE &kp C_MUTE &kp PSCRN &kp DEL &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET +&kp LCTRL &kp LALT &kp LGUI &kp K_CMENU &mo 1 &kp SPACE &kp RET &kp RET &kp SPACE &mo 2 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + + lower_layer { +// ------------------------------------------------------------------------------------------------------------ +// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +// | N.LC | 7 | 8 | 9 |PRTSC | SCRLK| | | | PAUSE| | 7 | 8 | 9 | F12 | +// | | 4 | 5 | 6 | INS | HOME | | | | PGUP| | 4 | 5 | 6 | | +// | | 1 | 2 | 3 | DEL | END | | | | | | PGDN| | 1 | 2 | 3 | | +// | | 0 | . | Enter| | | | | | | | 0 | . | Enter | | + bindings = < +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&kp KP_NUM &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp PSCRN &kp SLCK &trans &trans &kp PAUSE_BREAK &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp F12 +&trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp INS &kp HOME &trans &trans &kp PG_UP &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans +&trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp DEL &kp END &trans &trans &trans &trans &kp PG_DN &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &trans +&trans &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + + raise_layer { +// ------------------------------------------------------------------------------------------------------------ +// |BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | RESET | +// | | | | | | | | | | | | | | |BLOADER| +// | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | | | | | | +// | | | | | | | | | | | | | | | | + bindings = < +&bt BT_CLR &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 &reset +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bootloader +&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 &trans &trans &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + }; + }; +}; diff --git a/app/boards/shields/zodiark/zodiark.zmk.yml b/app/boards/shields/zodiark/zodiark.zmk.yml new file mode 100644 index 00000000..fc685881 --- /dev/null +++ b/app/boards/shields/zodiark/zodiark.zmk.yml @@ -0,0 +1,14 @@ +file_format: "1" +id: zodiark +name: Zodiark +type: shield +url: https://www.splitlogic.xyz/buildguides/zodiark-build-guide +requires: [pro_micro] +exposes: [i2c_oled] +features: + - keys + - display + - encoder +siblings: + - zodiark_left + - zodiark_right diff --git a/app/boards/shields/zodiark/zodiark_left.overlay b/app/boards/shields/zodiark/zodiark_left.overlay new file mode 100644 index 00000000..fe55edc6 --- /dev/null +++ b/app/boards/shields/zodiark/zodiark_left.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "zodiark.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 2 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + ; +}; + +&left_encoder { + status = "okay"; +}; diff --git a/app/boards/shields/zodiark/zodiark_right.overlay b/app/boards/shields/zodiark/zodiark_right.overlay new file mode 100644 index 00000000..3405f59b --- /dev/null +++ b/app/boards/shields/zodiark/zodiark_right.overlay @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "zodiark.dtsi" + +&default_transform { + col-offset = <7>; +}; + +&kscan0 { + col-gpios + = <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 0 GPIO_ACTIVE_HIGH> + , <&pro_micro 1 GPIO_ACTIVE_HIGH> + , <&pro_micro 2 GPIO_ACTIVE_HIGH> + ; +}; + +&right_encoder { + status = "okay"; +}; diff --git a/app/include/zmk/display.h b/app/include/zmk/display.h index 3f4eb524..45a4bee0 100644 --- a/app/include/zmk/display.h +++ b/app/include/zmk/display.h @@ -4,6 +4,57 @@ * SPDX-License-Identifier: MIT */ +/** @file display.h + * @brief Display functions and macros. + */ + #pragma once -int zmk_display_init(); \ No newline at end of file +struct k_work_q *zmk_display_work_q(); + +bool zmk_display_is_initialized(); +int zmk_display_init(); + +/** + * @brief Macro to define a ZMK event listener that handles the thread safety of fetching + * the necessary state from the system work queue context, invoking a work callback + * in the display queue context, and properly accessing that state safely when performing + * display/LVGL updates. + * + * @param listener THe ZMK Event manager listener name. + * @param state_type The struct/enum type used to store/transfer state. + * @param cb The callback to invoke in the dispaly queue context to update the UI. Should be `void + * func(state_type)` signature. + * @param state_func The callback function to invoke to fetch the updated state from ZMK core. + * Should be `state type func(const zmk_event_t *eh)` signature. + * @retval listner##_init Generates a function `listener##_init` that should be called by the widget + * once ready to be updated. + **/ +#define ZMK_DISPLAY_WIDGET_LISTENER(listener, state_type, cb, state_func) \ + K_MUTEX_DEFINE(listener##_mutex); \ + static state_type __##listener##_state; \ + static state_type listener##_get_local_state() { \ + k_mutex_lock(&listener##_mutex, K_FOREVER); \ + state_type copy = __##listener##_state; \ + k_mutex_unlock(&listener##_mutex); \ + return copy; \ + }; \ + static void listener##_work_cb(struct k_work *work) { cb(listener##_get_local_state()); }; \ + K_WORK_DEFINE(listener##_work, listener##_work_cb); \ + static void listener##_refresh_state(const zmk_event_t *eh) { \ + k_mutex_lock(&listener##_mutex, K_FOREVER); \ + __##listener##_state = state_func(eh); \ + k_mutex_unlock(&listener##_mutex); \ + }; \ + static void listener##_init() { \ + listener##_refresh_state(NULL); \ + listener##_work_cb(NULL); \ + } \ + static int listener##_cb(const zmk_event_t *eh) { \ + if (zmk_display_is_initialized()) { \ + listener##_refresh_state(eh); \ + k_work_submit_to_queue(zmk_display_work_q(), &listener##_work); \ + } \ + return ZMK_EV_EVENT_BUBBLE; \ + } \ + ZMK_LISTENER(listener, listener##_cb); diff --git a/app/src/display/Kconfig b/app/src/display/Kconfig index 95b5d479..8023025a 100644 --- a/app/src/display/Kconfig +++ b/app/src/display/Kconfig @@ -18,7 +18,6 @@ endchoice choice ZMK_DISPLAY_STATUS_SCREEN prompt "Default status screen for displays" - default ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN bool "Built in status screen" @@ -29,6 +28,49 @@ config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM endchoice +choice ZMK_DISPLAY_WORK_QUEUE + prompt "Work queue selection for UI updates" + +config ZMK_DISPLAY_WORK_QUEUE_SYSTEM + bool "Use default system work queue for UI updates" + +config ZMK_DISPLAY_WORK_QUEUE_DEDICATED + bool "Use dedicated work queue for UI updates" + +endchoice + +if ZMK_DISPLAY_WORK_QUEUE_DEDICATED + +config ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE + int "Stack size for dedicated UI thread/queue" + default 2048 + +config ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY + int "Thread priority for dedicated UI thread/queue" + default 5 + +endif # ZMK_DISPLAY_WORK_QUEUE_DEDICATED + +if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN + +config LVGL_FONT_MONTSERRAT_16 + default y + +choice LVGL_THEME_DEFAULT_FONT_NORMAL + default LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_16 + +endchoice + +config LVGL_FONT_MONTSERRAT_12 + default y + +choice LVGL_THEME_DEFAULT_FONT_SMALL + default LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12 + +endchoice + +endif # ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN + rsource "widgets/Kconfig" endif diff --git a/app/src/display/main.c b/app/src/display/main.c index 17d68bf3..57fab2b0 100644 --- a/app/src/display/main.c +++ b/app/src/display/main.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: MIT */ +#include #include #include #include @@ -21,6 +22,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #define ZMK_DISPLAY_NAME CONFIG_LVGL_DISPLAY_DEV_NAME static const struct device *display; +static bool initialized = false; static lv_obj_t *screen; @@ -32,19 +34,41 @@ void display_tick_cb(struct k_work *work) { lv_task_handler(); } K_WORK_DEFINE(display_tick_work, display_tick_cb); -void display_timer_cb() { - lv_tick_inc(TICK_MS); - k_work_submit(&display_tick_work); +#if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) + +K_THREAD_STACK_DEFINE(display_work_stack_area, CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE); + +static struct k_work_q display_work_q; + +#endif + +struct k_work_q *zmk_display_work_q() { +#if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) + return &display_work_q; +#else + return &k_sys_work_q; +#endif } +void display_timer_cb() { + lv_tick_inc(TICK_MS); + k_work_submit_to_queue(zmk_display_work_q(), &display_tick_work); +} + +void blank_display_cb(struct k_work *work) { display_blanking_on(display); } + +void unblank_display_cb(struct k_work *work) { display_blanking_off(display); } + K_TIMER_DEFINE(display_timer, display_timer_cb, NULL); +K_WORK_DEFINE(blank_display_work, blank_display_cb); +K_WORK_DEFINE(unblank_display_work, unblank_display_cb); static void start_display_updates() { if (display == NULL) { return; } - display_blanking_off(display); + k_work_submit_to_queue(zmk_display_work_q(), &unblank_display_work); k_timer_start(&display_timer, K_MSEC(TICK_MS), K_MSEC(TICK_MS)); } @@ -54,11 +78,13 @@ static void stop_display_updates() { return; } - display_blanking_on(display); + k_work_submit_to_queue(zmk_display_work_q(), &blank_display_work); k_timer_stop(&display_timer); } +int zmk_display_is_initialized() { return initialized; } + int zmk_display_init() { LOG_DBG(""); @@ -68,6 +94,12 @@ int zmk_display_init() { return -EINVAL; } +#if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) + k_work_q_start(&display_work_q, display_work_stack_area, + K_THREAD_STACK_SIZEOF(display_work_stack_area), + CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY); +#endif + screen = zmk_display_status_screen(); if (screen == NULL) { @@ -79,6 +111,8 @@ int zmk_display_init() { start_display_updates(); + initialized = true; + LOG_DBG(""); return 0; } @@ -105,4 +139,4 @@ int display_event_handler(const zmk_event_t *eh) { } ZMK_LISTENER(display, display_event_handler); -ZMK_SUBSCRIPTION(display, zmk_activity_state_changed); \ No newline at end of file +ZMK_SUBSCRIPTION(display, zmk_activity_state_changed); diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index 6f32b283..ff678afa 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -48,6 +48,9 @@ lv_obj_t *zmk_display_status_screen() { #if IS_ENABLED(CONFIG_ZMK_WIDGET_LAYER_STATUS) zmk_widget_layer_status_init(&layer_status_widget, screen); + lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget), + LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, + lv_theme_get_font_small()); lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); #endif diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index b20babcf..0a6bf5c4 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -8,27 +8,23 @@ config ZMK_WIDGET_LAYER_STATUS default y depends on !ZMK_SPLIT || ZMK_SPLIT_BLE_ROLE_CENTRAL select LVGL_USE_LABEL - select LVGL_FONT_MONTSERRAT_12 config ZMK_WIDGET_BATTERY_STATUS bool "Widget for battery charge information, using small icons" depends on BT default y if BT select LVGL_USE_LABEL - select LVGL_FONT_MONTSERRAT_16 config ZMK_WIDGET_OUTPUT_STATUS bool "Widget for keyboard output status icons" depends on BT default y if BT select LVGL_USE_LABEL - select LVGL_FONT_MONTSERRAT_16 config ZMK_WIDGET_WPM_STATUS bool "Widget for displaying typed words per minute" depends on !ZMK_SPLIT || ZMK_SPLIT_BLE_ROLE_CENTRAL select LVGL_USE_LABEL - select LVGL_FONT_MONTSERRAT_16 select ZMK_WPM endmenu diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index 309c3e9d..362bdaa2 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -4,11 +4,13 @@ * SPDX-License-Identifier: MIT */ +#include #include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include #include #include #include @@ -16,29 +18,21 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); -static lv_style_t label_style; -static bool style_initialized = false; +struct battery_status_state { + uint8_t level; +#if IS_ENABLED(CONFIG_USB) + bool usb_present; +#endif +}; -void battery_status_init() { - if (style_initialized) { - return; - } - - style_initialized = true; - lv_style_init(&label_style); - lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); - lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_16); - lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); - lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); -} - -void set_battery_symbol(lv_obj_t *label) { +static void set_battery_symbol(lv_obj_t *label, struct battery_status_state state) { char text[2] = " "; - uint8_t level = bt_bas_get_battery_level(); + + uint8_t level = state.level; #if IS_ENABLED(CONFIG_USB) - if (zmk_usb_is_powered()) { + if (state.usb_present) { strcpy(text, LV_SYMBOL_CHARGE); } #endif /* IS_ENABLED(CONFIG_USB) */ @@ -57,32 +51,39 @@ void set_battery_symbol(lv_obj_t *label) { lv_label_set_text(label, text); } -int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { - battery_status_init(); - widget->obj = lv_label_create(parent, NULL); - lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); - - lv_obj_set_size(widget->obj, 40, 15); - set_battery_symbol(widget->obj); - - sys_slist_append(&widgets, &widget->node); - - return 0; -} - -lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) { - LOG_DBG("Label: %p", widget->obj); - return widget->obj; -} - -int battery_status_listener(const zmk_event_t *eh) { +void battery_status_update_cb(struct battery_status_state state) { struct zmk_widget_battery_status *widget; - SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj); } - return ZMK_EV_EVENT_BUBBLE; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); } } -ZMK_LISTENER(widget_battery_status, battery_status_listener) +static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) { + return (struct battery_status_state) { + .level = bt_bas_get_battery_level(), +#if IS_ENABLED(CONFIG_USB) + .usb_present = zmk_usb_is_powered(), +#endif /* IS_ENABLED(CONFIG_USB) */ + }; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct battery_status_state, + battery_status_update_cb, battery_status_get_state) + ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed); #if IS_ENABLED(CONFIG_USB) ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed); #endif /* IS_ENABLED(CONFIG_USB) */ + +int zmk_widget_battery_status_init(struct zmk_widget_battery_status *widget, lv_obj_t *parent) { + widget->obj = lv_label_create(parent, NULL); + + lv_obj_set_size(widget->obj, 40, 15); + + sys_slist_append(&widgets, &widget->node); + + widget_battery_status_init(); + return 0; +} + +lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget) { + return widget->obj; +} diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index 9960f2a0..32bdb828 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -4,9 +4,11 @@ * SPDX-License-Identifier: MIT */ +#include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include #include #include #include @@ -14,66 +16,54 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); -static lv_style_t label_style; -static bool style_initialized = false; +struct layer_status_state { + uint8_t index; + const char *label; +}; -void layer_status_init() { - if (style_initialized) { - return; - } - - style_initialized = true; - lv_style_init(&label_style); - lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); - lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); - lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); - lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); -} - -void set_layer_symbol(lv_obj_t *label) { - int active_layer_index = zmk_keymap_highest_layer_active(); - - LOG_DBG("Layer changed to %i", active_layer_index); - - const char *layer_label = zmk_keymap_layer_label(active_layer_index); - if (layer_label == NULL) { +static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) { + if (state.label == NULL) { char text[6] = {}; - sprintf(text, LV_SYMBOL_KEYBOARD "%i", active_layer_index); + sprintf(text, LV_SYMBOL_KEYBOARD "%i", state.index); lv_label_set_text(label, text); } else { char text[12] = {}; - snprintf(text, 12, LV_SYMBOL_KEYBOARD "%s", layer_label); + snprintf(text, 12, LV_SYMBOL_KEYBOARD "%s", state.label); lv_label_set_text(label, text); } } +static void layer_status_update_cb(struct layer_status_state state) { + struct zmk_widget_layer_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj, 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)}; +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb, + layer_status_get_state) + +ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); + int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) { - layer_status_init(); widget->obj = lv_label_create(parent, NULL); - lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); lv_obj_set_size(widget->obj, 40, 15); - set_layer_symbol(widget->obj); sys_slist_append(&widgets, &widget->node); + widget_layer_status_init(); return 0; } lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) { return widget->obj; -} - -int layer_status_listener(const zmk_event_t *eh) { - struct zmk_widget_layer_status *widget; - SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj); } - return 0; -} - -ZMK_LISTENER(widget_layer_status, layer_status_listener) -ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed); \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 3bfbebf6..4c32faea 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -4,11 +4,13 @@ * SPDX-License-Identifier: MIT */ +#include #include #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include #include #include #include @@ -19,43 +21,42 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); -static lv_style_t label_style; -static bool style_initialized = false; +struct output_status_state { + enum zmk_endpoint selected_endpoint; + bool active_profile_connected; + bool active_profile_bonded; + uint8_t active_profile_index; +}; -void output_status_init() { - if (style_initialized) { - return; - } - - style_initialized = true; - lv_style_init(&label_style); - lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); - lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_16); - lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); - lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); +static struct output_status_state get_state(const zmk_event_t *_eh) { + return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(), + .active_profile_connected = + zmk_ble_active_profile_is_connected(), + .active_profile_bonded = !zmk_ble_active_profile_is_open(), + .active_profile_index = zmk_ble_active_profile_index()}; + ; } -void set_status_symbol(lv_obj_t *label) { - enum zmk_endpoint selected_endpoint = zmk_endpoints_selected(); - bool active_profile_connected = zmk_ble_active_profile_is_connected(); - bool active_profie_bonded = !zmk_ble_active_profile_is_open(); - uint8_t active_profile_index = zmk_ble_active_profile_index(); +static void set_status_symbol(lv_obj_t *label, struct output_status_state state) { char text[6] = {}; - switch (selected_endpoint) { + switch (state.selected_endpoint) { case ZMK_ENDPOINT_USB: strcat(text, LV_SYMBOL_USB " "); break; case ZMK_ENDPOINT_BLE: - if (active_profie_bonded) { - if (active_profile_connected) { - sprintf(text, LV_SYMBOL_WIFI "%i " LV_SYMBOL_OK, active_profile_index); + if (state.active_profile_bonded) { + if (state.active_profile_connected) { + snprintf(text, sizeof(text), LV_SYMBOL_WIFI "%i " LV_SYMBOL_OK, + state.active_profile_index); } else { - sprintf(text, LV_SYMBOL_WIFI "%i " LV_SYMBOL_CLOSE, active_profile_index); + snprintf(text, sizeof(text), LV_SYMBOL_WIFI "%i " LV_SYMBOL_CLOSE, + state.active_profile_index); } } else { - sprintf(text, LV_SYMBOL_WIFI "%i " LV_SYMBOL_SETTINGS, active_profile_index); + snprintf(text, sizeof(text), LV_SYMBOL_WIFI "%i " LV_SYMBOL_SETTINGS, + state.active_profile_index); } break; } @@ -63,30 +64,13 @@ void set_status_symbol(lv_obj_t *label) { lv_label_set_text(label, text); } -int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { - output_status_init(); - widget->obj = lv_label_create(parent, NULL); - lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); - - lv_obj_set_size(widget->obj, 40, 15); - set_status_symbol(widget->obj); - - sys_slist_append(&widgets, &widget->node); - - return 0; -} - -lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) { - return widget->obj; -} - -int output_status_listener(const zmk_event_t *eh) { +static void output_status_update_cb(struct output_status_state state) { struct zmk_widget_output_status *widget; - SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj); } - return ZMK_EV_EVENT_BUBBLE; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); } } -ZMK_LISTENER(widget_output_status, output_status_listener) +ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state, + output_status_update_cb, get_state) ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed); #if defined(CONFIG_USB) @@ -95,3 +79,18 @@ ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed); #if defined(CONFIG_ZMK_BLE) ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed); #endif + +int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) { + widget->obj = lv_label_create(parent, NULL); + + lv_obj_set_size(widget->obj, 40, 15); + + sys_slist_append(&widgets, &widget->node); + + widget_output_status_init(); + return 0; +} + +lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) { + return widget->obj; +} diff --git a/app/src/display/widgets/wpm_status.c b/app/src/display/widgets/wpm_status.c index 41ee3685..7ed047c3 100644 --- a/app/src/display/widgets/wpm_status.c +++ b/app/src/display/widgets/wpm_status.c @@ -7,6 +7,7 @@ #include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#include #include #include #include @@ -14,54 +15,43 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets); -static lv_style_t label_style; -static bool style_initialized = false; +struct wpm_status_state { + uint8_t wpm; +}; -void wpm_status_init() { - if (style_initialized) { - return; - } +struct wpm_status_state wpm_status_get_state(const zmk_event_t *eh) { + return (struct wpm_status_state){.wpm = zmk_wpm_get_state()}; +}; - style_initialized = true; - lv_style_init(&label_style); - lv_style_set_text_color(&label_style, LV_STATE_DEFAULT, LV_COLOR_BLACK); - lv_style_set_text_font(&label_style, LV_STATE_DEFAULT, &lv_font_montserrat_12); - lv_style_set_text_letter_space(&label_style, LV_STATE_DEFAULT, 1); - lv_style_set_text_line_space(&label_style, LV_STATE_DEFAULT, 1); -} - -void set_wpm_symbol(lv_obj_t *label, int wpm) { +void set_wpm_symbol(lv_obj_t *label, struct wpm_status_state state) { char text[4] = {}; - LOG_DBG("WPM changed to %i", wpm); - sprintf(text, "%i ", wpm); + LOG_DBG("WPM changed to %i", state.wpm); + snprintf(text, sizeof(text), "%i ", state.wpm); lv_label_set_text(label, text); } +void wpm_status_update_cb(struct wpm_status_state state) { + struct zmk_widget_wpm_status *widget; + SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_wpm_symbol(widget->obj, state); } +} + +ZMK_DISPLAY_WIDGET_LISTENER(widget_wpm_status, struct wpm_status_state, wpm_status_update_cb, + wpm_status_get_state) +ZMK_SUBSCRIPTION(widget_wpm_status, zmk_wpm_state_changed); + int zmk_widget_wpm_status_init(struct zmk_widget_wpm_status *widget, lv_obj_t *parent) { - wpm_status_init(); widget->obj = lv_label_create(parent, NULL); - lv_obj_add_style(widget->obj, LV_LABEL_PART_MAIN, &label_style); lv_label_set_align(widget->obj, LV_LABEL_ALIGN_RIGHT); lv_obj_set_size(widget->obj, 40, 15); - set_wpm_symbol(widget->obj, 0); sys_slist_append(&widgets, &widget->node); + widget_wpm_status_init(); return 0; } lv_obj_t *zmk_widget_wpm_status_obj(struct zmk_widget_wpm_status *widget) { return widget->obj; } - -int wpm_status_listener(const zmk_event_t *eh) { - struct zmk_wpm_state_changed *ev = as_zmk_wpm_state_changed(eh); - struct zmk_widget_wpm_status *widget; - SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_wpm_symbol(widget->obj, ev->state); } - return 0; -} - -ZMK_LISTENER(widget_wpm_status, wpm_status_listener) -ZMK_SUBSCRIPTION(widget_wpm_status, zmk_wpm_state_changed); \ No newline at end of file diff --git a/app/src/hog.c b/app/src/hog.c index 07343097..e8aceca3 100644 --- a/app/src/hog.c +++ b/app/src/hog.c @@ -37,7 +37,7 @@ struct hids_report { static struct hids_info info = { .version = 0x0000, .code = 0x00, - .flags = HIDS_NORMALLY_CONNECTABLE & HIDS_REMOTE_WAKE, + .flags = HIDS_NORMALLY_CONNECTABLE | HIDS_REMOTE_WAKE, }; enum { @@ -126,19 +126,19 @@ BT_GATT_SERVICE_DEFINE( // BT_GATT_PERM_WRITE, NULL, write_proto_mode, &proto_mode), BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_INFO, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, read_hids_info, NULL, &info), - BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT_MAP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ, + BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT_MAP, BT_GATT_CHRC_READ, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_map, NULL, NULL), BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_REPORT, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ_ENCRYPT, read_hids_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, read_hids_report_ref, NULL, - &input), + 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), - BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ, read_hids_report_ref, NULL, - &consumer_input), + BT_GATT_DESCRIPTOR(BT_UUID_HIDS_REPORT_REF, BT_GATT_PERM_READ_ENCRYPT, read_hids_report_ref, + NULL, &consumer_input), BT_GATT_CHARACTERISTIC(BT_UUID_HIDS_CTRL_POINT, BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_WRITE, NULL, write_ctrl_point, &ctrl_point)); diff --git a/docs/docs/assets/pro-micro/pro-micro-pins-labelled.jpg b/docs/docs/assets/pro-micro/pro-micro-pins-labelled.jpg index f72d4077..88161e39 100644 Binary files a/docs/docs/assets/pro-micro/pro-micro-pins-labelled.jpg and b/docs/docs/assets/pro-micro/pro-micro-pins-labelled.jpg differ diff --git a/docs/docs/development/boards-shields-keymaps.md b/docs/docs/development/boards-shields-keymaps.md index 53916884..4444537e 100644 --- a/docs/docs/development/boards-shields-keymaps.md +++ b/docs/docs/development/boards-shields-keymaps.md @@ -47,6 +47,6 @@ in the `app/boards/shields/${board_name}` directory, e.g. `app/boards/shields/cl - A `Kconfig.shield` that defines the toplevel Kconfig value for the shield, which uses a supplied utility to function to default the value based on the shield list, e.g. `def_bool $(shields_list_contains,clueboard_california)`. - A `Kconfig.defconfig` file to set default values for things like `ZMK_KEYBOARD_NAME` - A `${shield_name}.overlay` file, which is a devicetree overlay file, that includes: - - A [chosen](https://docs.zephyrproject.org/2.5.0/guides/dts/intro.html#aliases-and-chosen-nodes) node named `zmk,kscan` which references the configured KSCAN driver (usually a GPIO matrix). For these keyboards, to be compatible with any Pro Micro compatible boards, the KSCAN configuration should reference the [nexus node](https://docs.zephyrproject.org/2.5.0/guides/porting/shields.html#gpio-nexus-nodes) that ZMK has standardized on. In particular, the `&pro_micro_a` and `&pro_micro_d` aliases can be used to reference the standard `A#` and `D#` pins in shields. + - A [chosen](https://docs.zephyrproject.org/2.5.0/guides/dts/intro.html#aliases-and-chosen-nodes) node named `zmk,kscan` which references the configured KSCAN driver (usually a GPIO matrix). For these keyboards, to be compatible with any Pro Micro compatible boards, the KSCAN configuration should reference the [nexus node](https://docs.zephyrproject.org/2.5.0/guides/porting/shields.html#gpio-nexus-nodes) that ZMK has standardized on. In particular, the `&pro_micro` aliases can be used to reference the standard digital pins of a Pro Micro for shields. - (Optional) A [chosen](https://docs.zephyrproject.org/2.5.0/guides/dts/intro.html#aliases-and-chosen-nodes) node named `zmk,matrix_transform` that defines the mapping from KSCAN row/column values to the logical key position for the keyboard. - A `keymap/keymap.overlay` file that includes the default keymap for that keyboard. Users will be able to override this keymap in their user configs. diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 6e173369..d8b41698 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -17,7 +17,6 @@ The high level steps are: - (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 support for features such as encoders, OLED displays, or RGB underglow. -- Update build.yml 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. @@ -99,20 +98,13 @@ Finally, you'll want to turn on the split option for both sides. This can all be if SHIELD_MY_BOARD_LEFT config ZMK_KEYBOARD_NAME - default "My Awesome Keyboard Left" + default "My Awesome Keyboard" config ZMK_SPLIT_BLE_ROLE_CENTRAL default y endif -if SHIELD_MY_BOARD_RIGHT - -config ZMK_KEYBOARD_NAME - default "My Awesome Keyboard Right" - -endif - if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT config ZMK_SPLIT @@ -125,7 +117,7 @@ endif ![Labelled Pro Micro pins](../assets/pro-micro/pro-micro-pins-labelled.jpg) -ZMK uses the green color coded pin names to generate devicetree node references. For example, to refer to the node `D0` in the devicetree files, use `&pro_micro_d 0` or to refer to `A1`, use `&pro_micro_a 1`. +ZMK uses the blue color coded pin names to generate devicetree node references. For example, to refer to the node `0` in the devicetree files, use `&pro_micro 0`. - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + = <&pro_micro 15 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> ; row-gpios - = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; }; @@ -208,11 +200,11 @@ 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) diode-direction = "col2row"; row-gpios - = <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A from the schematic file - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B from the schematic file - , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C from the schematic file - , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D from the schematic file - , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row E from the schematic file + = <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A from the schematic file + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B from the schematic file + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C from the schematic file + , <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D from the schematic file + , <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row E from the schematic file ; }; @@ -236,12 +228,12 @@ This is exemplified with the iris .overlay files. &kscan0 { col-gpios - = <&pro_micro_a 1 GPIO_ACTIVE_HIGH> // col1 in the schematic - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> // col6 in the schematic + = <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic + , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic + , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic + , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic + , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic + , <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic ; }; ``` @@ -257,12 +249,12 @@ This is exemplified with the iris .overlay files. &kscan0 { col-gpios - = <&pro_micro_d 10 GPIO_ACTIVE_HIGH> // col6 in the schematic - , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> // col5 in the schematic - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> // col4 in the schematic - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> // col3 in the schematic - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> // col2 in the schematic - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> // col1 in the schematic + = <&pro_micro 10 GPIO_ACTIVE_HIGH> // col6 in the schematic + , <&pro_micro 16 GPIO_ACTIVE_HIGH> // col5 in the schematic + , <&pro_micro 14 GPIO_ACTIVE_HIGH> // col4 in the schematic + , <&pro_micro 15 GPIO_ACTIVE_HIGH> // col3 in the schematic + , <&pro_micro 18 GPIO_ACTIVE_HIGH> // col2 in the schematic + , <&pro_micro 19 GPIO_ACTIVE_HIGH> // col1 in the schematic ; }; diff --git a/docs/docs/features/encoders.md b/docs/docs/features/encoders.md index f1bb8bc8..225ee6f3 100644 --- a/docs/docs/features/encoders.md +++ b/docs/docs/features/encoders.md @@ -11,7 +11,7 @@ Encoders are currently only support on the left/central sides of splits. For pro ## Enabling EC11 Encoders -To enable encoders for boards that have existing encoder support, uncomment the `EC11_CONFIG=y` and `CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y` lines in your board's .conf file in your `zmk-config/config` folder. Save and push your changes, then download and flash the new firmware. +To enable encoders for boards that have existing encoder support, uncomment the `CONFIG_EC11=y` and `CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y` lines in your board's .conf file in your `zmk-config/config` folder. Save and push your changes, then download and flash the new firmware. ## Customizing EC11 Encoder Behavior diff --git a/docs/src/templates/setup.sh.mustache b/docs/src/templates/setup.sh.mustache index 2b414376..9dbdcfd6 100644 --- a/docs/src/templates/setup.sh.mustache +++ b/docs/src/templates/setup.sh.mustache @@ -189,7 +189,7 @@ popd sed -i'.orig' \ -e "s/BOARD_NAME/$board/" \ -e "s/SHIELD_NAME/$shield/" \ - -e "s/KEYBOARD_TITLE/$shield_title/" \ + -e "s|KEYBOARD_TITLE|$shield_title|" \ .github/workflows/build.yml if [ "$board" == "proton_c" ]; then