From 42ad491cef9aa7962e6b60a7a67800e940137648 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 7 Feb 2021 21:17:12 +0000 Subject: [PATCH] Initial bring up of artsey on a tidbit for left handed use --- zmk-config/README.md | 2 + .../tidbit_artsey_left/Kconfig.defconfig | 37 ++++++ .../shields/tidbit_artsey_left/Kconfig.shield | 5 + .../tidbit_artsey_left/boards/proton_c.conf | 1 + .../tidbit_artsey_left.conf | 13 +++ .../tidbit_artsey_left.keymap | 109 ++++++++++++++++++ .../tidbit_artsey_left.overlay | 70 +++++++++++ 7 files changed, 237 insertions(+) create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.defconfig create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.shield create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/boards/proton_c.conf create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.conf create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.keymap create mode 100644 zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.overlay diff --git a/zmk-config/README.md b/zmk-config/README.md index 4f5c109b..b78e2120 100644 --- a/zmk-config/README.md +++ b/zmk-config/README.md @@ -39,6 +39,8 @@ west build --board nice_nano -d build/pockettype/peripheral -- -DSHIELD=pocketty west build --board nice_nano -d build/tg4x -- -DSHIELD=tg4x -DZMK_CONFIG=/workspaces/zmk-config/zmk-config/config +west build --board nice_nano -d build/tidbit_artsey_left -- -DSHIELD=tidbit_artsey_left -DZMK_CONFIG=/workspaces/zmk-config/zmk-config/config + west build --board nice_nano -d build/steno_right_lily58 -- -DSHIELD=steno_right_lily58 -DZMK_CONFIG=/workspaces/zmk-config/zmk-config/config west build --board nice_nano -d build/steno_left_lily58 -- -DSHIELD=steno_left_lily58 -DZMK_CONFIG=/workspaces/zmk-config/zmk-config/config diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.defconfig b/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.defconfig new file mode 100644 index 00000000..c01f0379 --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.defconfig @@ -0,0 +1,37 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_TIDBIT_ARTSEY_LEFT + +config ZMK_KEYBOARD_NAME + default "ARTSEY Tidbit L" + +config I2C + default y + +config SSD1306 + default y + +config SSD1306_REVERSE_MODE + default y + +config LVGL_HOR_RES_MAX + default 128 + +config LVGL_VER_RES_MAX + default 32 + +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 diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.shield b/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.shield new file mode 100644 index 00000000..9510afb3 --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_TIDBIT_ARTSEY_LEFT + def_bool $(shields_list_contains,tidbit_artsey_left) diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/boards/proton_c.conf b/zmk-config/config/boards/shields/tidbit_artsey_left/boards/proton_c.conf new file mode 100644 index 00000000..ab2b50b6 --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/boards/proton_c.conf @@ -0,0 +1 @@ +CONFIG_SENSOR=y \ No newline at end of file diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.conf b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.conf new file mode 100644 index 00000000..c5f5268a --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.conf @@ -0,0 +1,13 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable Encoders +#CONFIG_EC11=y +#CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +# Enable display (layer in use is helpful) +CONFIG_ZMK_DISPLAY=y + +# Enable WPM widget +#CONFIG_ZMK_WPM=y +CONFIG_ZMK_WIDGET_WPM_STATUS=y diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.keymap b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.keymap new file mode 100644 index 00000000..57f36424 --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.keymap @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +// ARTS Row +#define KEY_A 8 +#define KEY_R 7 +#define KEY_T 6 +#define KEY_S 5 +// EYIO Row +#define KEY_E 14 +#define KEY_Y 13 +#define KEY_I 12 +#define KEY_O 11 + +#include "../../../artsey.dtsi" + +/ { + behaviors { + bootreset: hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "BOOT_RESET"; + #binding-cells = <2>; + tapping_term_ms = <1000>; + flavor = "tap-preferred"; + bindings = <&bootloader>, <&reset>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + base { + label = "ARTSEY"; + bindings = < + &none &none &none &none &none + &layer_numbers_kp LAYER_ID_NUMBERS S &kp T &kp R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A + &none + &layer_navigation_kp LAYER_ID_NAVIGATION O &kp I &kp Y &layer_symbols_kp LAYER_ID_SYMBOLS E + &none &bt BT_CLR &bt BT_PRV &bt BT_NXT &bootreset 0 0 + >; + }; + numbers { + label = "Number"; + bindings = < + &none &none &none &none &none + &layer_base_sl LAYER_ID_BASE LAYER_ID_F_ONE_SIX &kp N3 &kp N2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS N1 + &none + &layer_navigation_sl LAYER_ID_NAVIGATION LAYER_ID_F_SEVEN_TWELVE &kp N6 &kp N5 &layer_symbols_kp LAYER_ID_SYMBOLS N4 + &none &none &none &none &none + >; + }; + symbols { + label = "Symbol"; + bindings = < + &none &none &none &none &none + &layer_numbers_kp LAYER_ID_NUMBERS GRAVE &kp SEMI &kp BSLH &layer_parentheticals_none LAYER_ID_PARENTHETICALS 0 + &none + &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp EQUAL &kp MINUS &layer_base_none LAYER_ID_BASE 0 + &none &none &none &none &none + >; + }; + parentheticals { + label = "Paren"; + bindings = < + &none &none &none &none &none + &layer_numbers_kp LAYER_ID_NUMBERS LBRC &kp LPAR &kp RPAR &layer_base_none LAYER_ID_BASE 0 + &none + &layer_navigation_kp LAYER_ID_NAVIGATION RBRC &kp LBKT &kp RBKT &layer_symbols_none LAYER_ID_SYMBOLS 0 + &none &none &none &none &none + >; + }; + navigation { + label = "Nav"; + bindings = < + &none &none &none &none &none + &layer_numbers_none LAYER_ID_NUMBERS 0 &kp HOME &kp UP &layer_parentheticals_kp LAYER_ID_PARENTHETICALS END + &none + &layer_base_none LAYER_ID_BASE LEFT &kp DOWN &kp RIGHT &layer_symbols_kp LAYER_ID_SYMBOLS 0 + &none &none &none &none &none + >; + }; + f_one_to_six{ + label = "F1-F6"; + bindings = < + &none &none &none &none &none + &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F3 &kp F2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F1 + &none + &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F6 &kp F5 &layer_symbols_kp LAYER_ID_SYMBOLS F4 + &none &none &none &none &none + >; + }; + f_seven_to_twelve { + label = "F7-F12"; + bindings = < + &none &none &none &none &none + &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F9 &kp F8 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F7 + &none + &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F12 &kp F11 &layer_symbols_kp LAYER_ID_SYMBOLS F10 + &none &none &none &none &none + >; + }; + }; +}; diff --git a/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.overlay b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.overlay new file mode 100644 index 00000000..f411c281 --- /dev/null +++ b/zmk-config/config/boards/shields/tidbit_artsey_left/tidbit_artsey_left.overlay @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + 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)> + ; + + 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)> + ; + + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <5>; + + map = < + RC(0,3) RC(1,3) RC(2,3) RC(3,3) RC(4,3) + RC(0,2) RC(1,2) RC(2,2) RC(3,2) RC(4,2) + RC(0,1) RC(1,1) RC(2,1) RC(3,1) RC(4,1) + RC(1,0) RC(2,0) RC(3,0) RC(4,0) + >; + }; + + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +};