Merge branch 'main' of https://github.com/MakerJake01/zmk into main
This commit is contained in:
commit
7d01183764
105 changed files with 1357 additions and 715 deletions
11
.github/pull_request_template.md
vendored
Normal file
11
.github/pull_request_template.md
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
||||
## 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
|
|
@ -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 {};
|
||||
|
|
|
@ -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 {};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
/ {
|
||||
pro_micro_d: connector_d {
|
||||
pro_micro: connector {
|
||||
compatible = "arduino-pro-micro";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
|
@ -26,6 +26,10 @@
|
|||
, <16 0 &gpio0 28 0> /* D16 */
|
||||
, <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 {};
|
||||
|
|
|
@ -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 &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 {};
|
||||
|
|
|
@ -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 {};
|
||||
|
|
19
app/boards/shields/a_dux/Kconfig.defconfig
Normal file
19
app/boards/shields/a_dux/Kconfig.defconfig
Normal file
|
@ -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
|
8
app/boards/shields/a_dux/Kconfig.shield
Normal file
8
app/boards/shields/a_dux/Kconfig.shield
Normal file
|
@ -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)
|
15
app/boards/shields/a_dux/README.md
Normal file
15
app/boards/shields/a_dux/README.md
Normal file
|
@ -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 <https://github.com/tapioki/cephalopoda>.
|
||||
|
||||
[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
|
2
app/boards/shields/a_dux/a_dux.conf
Normal file
2
app/boards/shields/a_dux/a_dux.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
52
app/boards/shields/a_dux/a_dux.dtsi
Normal file
52
app/boards/shields/a_dux/a_dux.dtsi
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
|
||||
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)>
|
||||
;
|
||||
};
|
||||
|
||||
};
|
26
app/boards/shields/a_dux/a_dux.keymap
Normal file
26
app/boards/shields/a_dux/a_dux.keymap
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
/ {
|
||||
|
||||
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
|
||||
>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
11
app/boards/shields/a_dux/a_dux.zmk.yml
Normal file
11
app/boards/shields/a_dux/a_dux.zmk.yml
Normal file
|
@ -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
|
7
app/boards/shields/a_dux/a_dux_left.overlay
Normal file
7
app/boards/shields/a_dux/a_dux_left.overlay
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "a_dux.dtsi"
|
11
app/boards/shields/a_dux/a_dux_right.overlay
Normal file
11
app/boards/shields/a_dux/a_dux_right.overlay
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "a_dux.dtsi"
|
||||
|
||||
&default_transform {
|
||||
col-offset = <17>;
|
||||
};
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
};
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
};
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
|
9
app/boards/shields/naked60/Kconfig.defconfig
Normal file
9
app/boards/shields/naked60/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_NAKED60
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Naked60BMP"
|
||||
|
||||
endif
|
5
app/boards/shields/naked60/Kconfig.shield
Normal file
5
app/boards/shields/naked60/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_NAKED60
|
||||
def_bool $(shields_list_contains,naked60)
|
0
app/boards/shields/naked60/naked60.conf
Normal file
0
app/boards/shields/naked60/naked60.conf
Normal file
99
app/boards/shields/naked60/naked60.keymap
Normal file
99
app/boards/shields/naked60/naked60.keymap
Normal file
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
|
||||
|
||||
/ {
|
||||
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
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
40
app/boards/shields/naked60/naked60.overlay
Normal file
40
app/boards/shields/naked60/naked60.overlay
Normal file
|
@ -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
|
||||
;
|
||||
};
|
||||
};
|
8
app/boards/shields/naked60/naked60.zmk.yml
Normal file
8
app/boards/shields/naked60/naked60.zmk.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
file_format: "1"
|
||||
id: naked60
|
||||
name: Naked60
|
||||
type: shield
|
||||
url: https://salicylic-acid3.hatenablog.com/
|
||||
requires: [pro_micro]
|
||||
features:
|
||||
- keys
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
|
||||
};
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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)>
|
||||
;
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
;
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
55
app/boards/shields/zodiark/Kconfig.defconfig
Normal file
55
app/boards/shields/zodiark/Kconfig.defconfig
Normal file
|
@ -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
|
8
app/boards/shields/zodiark/Kconfig.shield
Normal file
8
app/boards/shields/zodiark/Kconfig.shield
Normal file
|
@ -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)
|
9
app/boards/shields/zodiark/zodiark.conf
Normal file
9
app/boards/shields/zodiark/zodiark.conf
Normal file
|
@ -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
|
86
app/boards/shields/zodiark/zodiark.dtsi
Normal file
86
app/boards/shields/zodiark/zodiark.dtsi
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
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>;
|
||||
};
|
||||
};
|
69
app/boards/shields/zodiark/zodiark.keymap
Normal file
69
app/boards/shields/zodiark/zodiark.keymap
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
/ {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
14
app/boards/shields/zodiark/zodiark.zmk.yml
Normal file
14
app/boards/shields/zodiark/zodiark.zmk.yml
Normal file
|
@ -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
|
23
app/boards/shields/zodiark/zodiark_left.overlay
Normal file
23
app/boards/shields/zodiark/zodiark_left.overlay
Normal file
|
@ -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";
|
||||
};
|
27
app/boards/shields/zodiark/zodiark_right.overlay
Normal file
27
app/boards/shields/zodiark/zodiark_right.overlay
Normal file
|
@ -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";
|
||||
};
|
|
@ -4,6 +4,57 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/** @file display.h
|
||||
* @brief Display functions and macros.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <init.h>
|
||||
#include <device.h>
|
||||
#include <devicetree.h>
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <bluetooth/services/bas.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/display/widgets/battery_status.h>
|
||||
#include <zmk/usb.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
|
@ -16,29 +18,21 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/events/battery_state_changed.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/display/widgets/layer_status.h>
|
||||
#include <zmk/events/layer_state_changed.h>
|
||||
#include <zmk/event_manager.h>
|
||||
|
@ -14,66 +16,54 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/keymap.h>
|
||||
|
||||
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);
|
|
@ -4,11 +4,13 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <bluetooth/services/bas.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/display/widgets/output_status.h>
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
|
@ -19,43 +21,42 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/endpoints.h>
|
||||
|
||||
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;
|
||||
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()};
|
||||
;
|
||||
}
|
||||
|
||||
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_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;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#include <zmk/display.h>
|
||||
#include <zmk/display/widgets/wpm_status.h>
|
||||
#include <zmk/events/wpm_state_changed.h>
|
||||
#include <zmk/event_manager.h>
|
||||
|
@ -14,54 +15,43 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/wpm.h>
|
||||
|
||||
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);
|
|
@ -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));
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue