From 0c15c2291e2b7c3dfd24fc5d5c1527169d5a9a31 Mon Sep 17 00:00:00 2001 From: Dom H Date: Wed, 22 Sep 2021 21:25:53 +0100 Subject: [PATCH] feat(shield): Add Architeuthis Dux shield --- .../architeuthis_dux/Kconfig.defconfig | 26 ++++++++++ .../shields/architeuthis_dux/Kconfig.shield | 8 +++ app/boards/shields/architeuthis_dux/README.md | 15 ++++++ .../architeuthis_dux/architeuthis_dux.conf | 2 + .../architeuthis_dux/architeuthis_dux.dtsi | 52 +++++++++++++++++++ .../architeuthis_dux/architeuthis_dux.keymap | 26 ++++++++++ .../architeuthis_dux/architeuthis_dux.zmk.yml | 11 ++++ .../architeuthis_dux_left.overlay | 7 +++ .../architeuthis_dux_right.overlay | 11 ++++ 9 files changed, 158 insertions(+) create mode 100644 app/boards/shields/architeuthis_dux/Kconfig.defconfig create mode 100644 app/boards/shields/architeuthis_dux/Kconfig.shield create mode 100644 app/boards/shields/architeuthis_dux/README.md create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux.conf create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux.dtsi create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux.keymap create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux.zmk.yml create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux_left.overlay create mode 100644 app/boards/shields/architeuthis_dux/architeuthis_dux_right.overlay diff --git a/app/boards/shields/architeuthis_dux/Kconfig.defconfig b/app/boards/shields/architeuthis_dux/Kconfig.defconfig new file mode 100644 index 00000000..29a403f1 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/Kconfig.defconfig @@ -0,0 +1,26 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_ARCHITEUTHIS_DUX_LEFT + +config ZMK_KEYBOARD_NAME + default "Architeuthis Dux" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_ARCHITEUTHIS_DUX_RIGHT + +config ZMK_KEYBOARD_NAME + default "A. Dux Right" + +endif + +if SHIELD_ARCHITEUTHIS_DUX_LEFT || SHIELD_ARCHITEUTHIS_DUX_RIGHT + +config ZMK_SPLIT + default y + +endif diff --git a/app/boards/shields/architeuthis_dux/Kconfig.shield b/app/boards/shields/architeuthis_dux/Kconfig.shield new file mode 100644 index 00000000..b89878d7 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_ARCHITEUTHIS_DUX_LEFT + def_bool $(shields_list_contains,architeuthis_dux_left) + +config SHIELD_ARCHITEUTHIS_DUX_RIGHT + def_bool $(shields_list_contains,architeuthis_dux_right) diff --git a/app/boards/shields/architeuthis_dux/README.md b/app/boards/shields/architeuthis_dux/README.md new file mode 100644 index 00000000..ee383023 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/README.md @@ -0,0 +1,15 @@ +# Architeuthis Dux + +Shield configuration for [Architeuthis Dux by Tapi][1]. + +![Wireless Architeuthis Dux with nice!nano controllers][2] + +This shield is an adaptation of the direct pin [Cradio shield by @davidphilipbarr][3]. + +## Cephalopoda + +Check out the rest of Tapi's Cephalopoda collection of low profile split ergonomic mechanical keyboards at . + +[1]: https://github.com/tapioki/cephalopoda/tree/main/Architeuthis%20dux +[2]: https://media.discordapp.net/attachments/855822038287908864/866315666802081792/image0.jpg +[3]: https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields/cradio diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux.conf b/app/boards/shields/architeuthis_dux/architeuthis_dux.conf new file mode 100644 index 00000000..fa971579 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2021 The ZMK Contributors +# SPDX-License-Identifier: MIT diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux.dtsi b/app/boards/shields/architeuthis_dux/architeuthis_dux.dtsi new file mode 100644 index 00000000..4c28d655 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux.dtsi @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <34>; + rows = <1>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,21) RC(0,20) RC(0,19) RC(0,18) RC(0,17) + RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,26) RC(0,25) RC(0,24) RC(0,23) RC(0,22) + RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,31) RC(0,30) RC(0,29) RC(0,28) RC(0,27) + RC(0,15) RC(0,16) RC(0,33) RC(0,32) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + input-gpios = + <&pro_micro_d 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&pro_micro_d 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + +}; diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux.keymap b/app/boards/shields/architeuthis_dux/architeuthis_dux.keymap new file mode 100644 index 00000000..eda03ff9 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux.keymap @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/ { + + keymap { + compatible = "zmk,keymap"; + + // This is a sample keymap intended to be replaced with your own + base_layer { + bindings = < + &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI + &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH + &kp TAB &kp BSPC &kp SPACE &kp ENTER + >; + }; + + }; +}; diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux.zmk.yml b/app/boards/shields/architeuthis_dux/architeuthis_dux.zmk.yml new file mode 100644 index 00000000..704d96bc --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux.zmk.yml @@ -0,0 +1,11 @@ +file_format: "1" +id: architeuthis_dux +name: Architeuthis Dux +type: shield +url: https://github.com/tapioki/cephalopoda/ +requires: [pro_micro] +features: + - keys +siblings: + - architeuthis_dux_left + - architeuthis_dux_right diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux_left.overlay b/app/boards/shields/architeuthis_dux/architeuthis_dux_left.overlay new file mode 100644 index 00000000..0baa95a5 --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux_left.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "architeuthis_dux.dtsi" diff --git a/app/boards/shields/architeuthis_dux/architeuthis_dux_right.overlay b/app/boards/shields/architeuthis_dux/architeuthis_dux_right.overlay new file mode 100644 index 00000000..13880d6d --- /dev/null +++ b/app/boards/shields/architeuthis_dux/architeuthis_dux_right.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "architeuthis_dux.dtsi" + +&default_transform { + col-offset = <17>; +};