From 594db2379525f4024172bd7e009414d330963f72 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 27 Dec 2020 21:17:52 +0000 Subject: [PATCH] Basic setup of dongle's for pockettype and tg4x --- keyboards/zmk-config/README.md | 12 +++- .../boards/shields/pockettype/CMakeLists.txt | 3 +- .../boards/shields/pockettype/README.md | 21 ++++++ .../boards/shields/pockettype/mdk_pwr_led.c | 46 +++++++++++++ .../boards/shields/pockettype/pockettype.dtsi | 68 +++++++++++++++++++ .../shields/pockettype/pockettype.overlay | 63 +---------------- .../shields/pockettype/pockettype_mdk.conf | 2 + .../shields/pockettype/pockettype_mdk.keymap | 20 ++++++ .../shields/pockettype/pockettype_mdk.overlay | 24 +++++++ .../pockettype/pockettype_peripheral.conf | 2 + .../pockettype/pockettype_peripheral.overlay | 12 ++++ .../{pwr_led.c => pockettype_pwr_led.c} | 0 .../config/boards/shields/tg4x/CMakeLists.txt | 6 ++ .../config/boards/shields/tg4x/README.md | 21 ++++++ .../config/boards/shields/tg4x/mdk_pwr_led.c | 46 +++++++++++++ .../config/boards/shields/tg4x/tg4x_mdk.conf | 2 + .../boards/shields/tg4x/tg4x_mdk.keymap | 20 ++++++ .../boards/shields/tg4x/tg4x_mdk.overlay | 24 +++++++ .../boards/shields/tg4x/tg4x_peripheral.conf | 2 + .../shields/tg4x/tg4x_peripheral.overlay | 12 ++++ keyboards/zmk-config/notes.md | 6 -- 21 files changed, 341 insertions(+), 71 deletions(-) create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/mdk_pwr_led.c create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype.dtsi create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.conf create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.keymap create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.overlay create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.conf create mode 100644 keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.overlay rename keyboards/zmk-config/config/boards/shields/pockettype/{pwr_led.c => pockettype_pwr_led.c} (100%) create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/CMakeLists.txt create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/mdk_pwr_led.c create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.conf create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.keymap create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.overlay create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.conf create mode 100644 keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.overlay diff --git a/keyboards/zmk-config/README.md b/keyboards/zmk-config/README.md index 8ed0b850..2c2790ea 100644 --- a/keyboards/zmk-config/README.md +++ b/keyboards/zmk-config/README.md @@ -10,9 +10,17 @@ Need to have the `zmk-config` directory mounted at `/workspaces/zmk-config` in D west build --board nice_nano -d build/tidbit -- -DSHIELD=tidbit -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config -west build --board nice_nano -d build/pockettype -- -DSHIELD=pockettype -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config +west build --board nice_nano -d build/pockettype/default -- -DSHIELD=pockettype -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config -west build --board nice_nano -d build/tg4x -- -DSHIELD=tg4x -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config +west build --board nrf52840_mdk -d build/pockettype/mdk -- -DSHIELD=pockettype_mdk -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +west build --board nice_nano -d build/pockettype/peripheral -- -DSHIELD=pockettype_peripheral -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +west build --board nice_nano -d build/tg4x/default -- -DSHIELD=tg4x -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +west build --board nrf52840_mdk -d build/tg4x/mdk -- -DSHIELD=tg4x_mdk -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +west build --board nice_nano -d build/tg4x/peripheral -- -DSHIELD=tg4x_peripheral -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config west build --board nice_nano -d build/lily58/left -- -DSHIELD=lily58_left -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/CMakeLists.txt b/keyboards/zmk-config/config/boards/shields/pockettype/CMakeLists.txt index 59c48b00..bd63ef03 100644 --- a/keyboards/zmk-config/config/boards/shields/pockettype/CMakeLists.txt +++ b/keyboards/zmk-config/config/boards/shields/pockettype/CMakeLists.txt @@ -3,4 +3,5 @@ # SPDX-License-Identifier: MIT # -target_sources(app PRIVATE pwr_led.c) +target_sources(app PRIVATE pockettype_pwr_led.c) +target_sources(app PRIVATE mdk_pwr_led.c) diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/README.md b/keyboards/zmk-config/config/boards/shields/pockettype/README.md index 21eff455..e9ba4c91 100644 --- a/keyboards/zmk-config/config/boards/shields/pockettype/README.md +++ b/keyboards/zmk-config/config/boards/shields/pockettype/README.md @@ -3,3 +3,24 @@ Standard setup for the [PocketType!](https://mechboards.co.uk/shop/kits/pockettype/) mini keyboard. The `keymap` directory contains the keyboard layout and were created by [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/). Please note: the zmk keymap is slightly adjusted from the default shown on the main PocketType! pages and QMK. + +## Alternate Builds + +The `pockettype_mdk` shield is setup to use the MakerDiary MDK board as a dongle for the Pockettype!. This will setup the PocketType! as a split ZMK keyboard. The "peripheral half" will be the Pockettype! and the "controller half" will be the MDK. + +## Build Commands + +Below are the three commands that can be used to build ZMK for the Pockettype! as a stand alone board or with a MakerDiary MDK as a dongle. + +``` sh + +# Stand alone build +west build --board nice_nano -d build/pockettype/default -- -DSHIELD=pockettype -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +# MDK Dongle build +west build --board nrf52840_mdk -d build/pockettype/mdk -- -DSHIELD=pockettype_mdk -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +# Pockettype as a peripheral to the MDK +west build --board nice_nano -d build/pockettype/peripheral -- -DSHIELD=pockettype_peripheral -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +``` diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/mdk_pwr_led.c b/keyboards/zmk-config/config/boards/shields/pockettype/mdk_pwr_led.c new file mode 100644 index 00000000..149590d2 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/mdk_pwr_led.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +#define PWR_LED_NODE DT_ALIAS(led1-blue) + +#if DT_NODE_HAS_STATUS(PWR_LED_NODE, okay) +#define PWR_LED DT_GPIO_LABEL(PWR_LED_NODE, gpios) +#define PWR_LED_PIN DT_GPIO_PIN(PWR_LED_NODE, gpios) +#else +/* A build error here means your board isn't set up to blink an LED. */ +#error "Unsupported board: pwr_led devicetree alias is not defined" +#define PWR_LED "" +#define PIN 0 +#define FLAGS 0 +#endif + +static int pwr_led_init(const struct device *_arg) { + ARG_UNUSED(_arg); + + const struct device *dev; + int ret; + + dev = device_get_binding(PWR_LED); + if (dev == NULL) { + return; + } + + ret = gpio_pin_configure(dev, PWR_LED_PIN, GPIO_OUTPUT_ACTIVE); + if (ret < 0) { + return; + } + + gpio_pin_set(dev, PIN, (int)true); + + return 0; +} + +SYS_INIT(pwr_led_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.dtsi b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.dtsi new file mode 100644 index 00000000..f1ffeef9 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.dtsi @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + leds { + compatible = "gpio-leds"; + act_led: led_a { + gpios = <&pro_micro_a 3 GPIO_ACTIVE_HIGH>; + label = "ACT LED"; + }; + power_led: led_p { + gpios = <&pro_micro_a 2 GPIO_ACTIVE_HIGH>; + label = "PWR LED"; + }; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + + 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_d 8 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 3 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <4>; + + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) +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) RC(2,10) RC(2,11) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) + >; + }; + + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; +}; diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.overlay b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.overlay index f1ffeef9..07011ab8 100644 --- a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.overlay +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype.overlay @@ -4,65 +4,4 @@ * SPDX-License-Identifier: MIT */ -#include - -/ { - leds { - compatible = "gpio-leds"; - act_led: led_a { - gpios = <&pro_micro_a 3 GPIO_ACTIVE_HIGH>; - label = "ACT LED"; - }; - power_led: led_p { - gpios = <&pro_micro_a 2 GPIO_ACTIVE_HIGH>; - label = "PWR LED"; - }; - }; - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; - - diode-direction = "col2row"; - - 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_d 8 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 3 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 0 GPIO_ACTIVE_HIGH> - ; - - row-gpios - = <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <12>; - rows = <4>; - - map = < -RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) -RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) -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) RC(2,10) RC(2,11) -RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - >; - }; - - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; -}; +#include "pockettype.dtsi" diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.conf b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.conf new file mode 100644 index 00000000..1e028a78 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.keymap b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.keymap new file mode 100644 index 00000000..3f4e2851 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.keymap @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/ { + keymap0: keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &bootloader + >; + }; + }; +}; \ No newline at end of file diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.overlay b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.overlay new file mode 100644 index 00000000..392498d7 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_mdk.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-direct"; + + label = "KSCAN"; + + input-gpios + = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)> + ; + + }; +}; \ No newline at end of file diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.conf b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.conf new file mode 100644 index 00000000..990cf7c0 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.overlay b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.overlay new file mode 100644 index 00000000..ba405208 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_peripheral.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "pockettype.dtsi" +#include "pockettype.keymap" + +&default_transform { + col-offset = <0>; +}; diff --git a/keyboards/zmk-config/config/boards/shields/pockettype/pwr_led.c b/keyboards/zmk-config/config/boards/shields/pockettype/pockettype_pwr_led.c similarity index 100% rename from keyboards/zmk-config/config/boards/shields/pockettype/pwr_led.c rename to keyboards/zmk-config/config/boards/shields/pockettype/pockettype_pwr_led.c diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/CMakeLists.txt b/keyboards/zmk-config/config/boards/shields/tg4x/CMakeLists.txt new file mode 100644 index 00000000..ef04a234 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/CMakeLists.txt @@ -0,0 +1,6 @@ +# +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT +# + +target_sources(app PRIVATE mdk_pwr_led.c) diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/README.md b/keyboards/zmk-config/config/boards/shields/tg4x/README.md index 43bb0b61..c0812dc0 100644 --- a/keyboards/zmk-config/config/boards/shields/tg4x/README.md +++ b/keyboards/zmk-config/config/boards/shields/tg4x/README.md @@ -3,3 +3,24 @@ Standard setup for the [TG4X](https://github.com/MythosMann/tg4x/) 40% keyboard. The `keymap` directory contains the keyboard layout and were created by [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/). Please note: the zmk keymap is slightly adjusted from the default shown on the main TG4X pages and QMK. + +## Alternate Builds + +The `tg4x_mdk` shield is setup to use the MakerDiary MDK board as a dongle for the TG4X. This will setup the TG4X as a split ZMK keyboard. The "peripheral half" will be the TG4X and the "controller half" will be the MDK. + +## Build Commands + +Below are the three commands that can be used to build ZMK for the TG4X as a stand alone board or with a MakerDiary MDK as a dongle. + +``` sh + +# Stand alone build +west build --board nice_nano -d build/tg4x/default -- -DSHIELD=tg4x -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +# MDK Dongle build +west build --board nrf52840_mdk -d build/tg4x/mdk -- -DSHIELD=tg4x_mdk -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +# TG4X as a peripheral to the MDK +west build --board nice_nano -d build/tg4x/peripheral -- -DSHIELD=tg4x_peripheral -DZMK_CONFIG=/workspaces/zmk-config/keyboards/zmk-config/config + +``` diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/mdk_pwr_led.c b/keyboards/zmk-config/config/boards/shields/tg4x/mdk_pwr_led.c new file mode 100644 index 00000000..149590d2 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/mdk_pwr_led.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +#define PWR_LED_NODE DT_ALIAS(led1-blue) + +#if DT_NODE_HAS_STATUS(PWR_LED_NODE, okay) +#define PWR_LED DT_GPIO_LABEL(PWR_LED_NODE, gpios) +#define PWR_LED_PIN DT_GPIO_PIN(PWR_LED_NODE, gpios) +#else +/* A build error here means your board isn't set up to blink an LED. */ +#error "Unsupported board: pwr_led devicetree alias is not defined" +#define PWR_LED "" +#define PIN 0 +#define FLAGS 0 +#endif + +static int pwr_led_init(const struct device *_arg) { + ARG_UNUSED(_arg); + + const struct device *dev; + int ret; + + dev = device_get_binding(PWR_LED); + if (dev == NULL) { + return; + } + + ret = gpio_pin_configure(dev, PWR_LED_PIN, GPIO_OUTPUT_ACTIVE); + if (ret < 0) { + return; + } + + gpio_pin_set(dev, PIN, (int)true); + + return 0; +} + +SYS_INIT(pwr_led_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.conf b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.conf new file mode 100644 index 00000000..1e028a78 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.keymap b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.keymap new file mode 100644 index 00000000..6fa7690a --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.keymap @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/ { + keymap0: keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &bootloader + >; + }; + }; +}; diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.overlay b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.overlay new file mode 100644 index 00000000..b0fac6f5 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_mdk.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-direct"; + + label = "KSCAN"; + + input-gpios + = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)> + ; + + }; +}; diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.conf b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.conf new file mode 100644 index 00000000..990cf7c0 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.conf @@ -0,0 +1,2 @@ +CONFIG_ZMK_SPLIT=y +CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y diff --git a/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.overlay b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.overlay new file mode 100644 index 00000000..10919e52 --- /dev/null +++ b/keyboards/zmk-config/config/boards/shields/tg4x/tg4x_peripheral.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "tg4x.dtsi" +#include "tg4x.keymap" + +&default_transform { + col-offset = <0>; +}; diff --git a/keyboards/zmk-config/notes.md b/keyboards/zmk-config/notes.md index cd7da5ff..90ab5886 100644 --- a/keyboards/zmk-config/notes.md +++ b/keyboards/zmk-config/notes.md @@ -29,14 +29,8 @@ # Hardware To Do / Notes -## Pockettype - -- Setup as the 'nice' dongle - ## 40% -- Setup as the 'naked' dongle -- Standard ZMK port with nice!nano - Figure out underglow ## Tidbit