From 45ddd4c2ae6aadfad990a688d1d7e82406f075d8 Mon Sep 17 00:00:00 2001 From: CrossR Date: Tue, 11 Aug 2020 18:07:08 +0100 Subject: Add very basic, untested, Sofle configuration. --- app/boards/shields/sofle/Kconfig.defconfig | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 app/boards/shields/sofle/Kconfig.defconfig (limited to 'app/boards/shields/sofle/Kconfig.defconfig') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig new file mode 100644 index 0000000..4437868 --- /dev/null +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -0,0 +1,54 @@ + +if SHIELD_SOFLE_LEFT + +config ZMK_KEYBOARD_NAME + default "Sofle Left" + +endif + +if SHIELD_SOFLE_RIGHT + +config ZMK_KEYBOARD_NAME + default "Sofle Right" + +endif + +if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT + +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 + default 128 + +config LVGL_VER_RES + 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 # LVGL + +endif -- cgit v1.3.1 From 892394d9e6b795f3f7c60e5e4d433760b5fc64ed Mon Sep 17 00:00:00 2001 From: CrossR Date: Sun, 16 Aug 2020 12:44:18 +0100 Subject: Update to include missing encoder config. --- app/boards/shields/sofle/Kconfig.defconfig | 2 -- app/boards/shields/sofle/sofle.conf | 4 ++++ app/boards/shields/sofle/sofle.dtsi | 25 ++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 3 deletions(-) (limited to 'app/boards/shields/sofle/Kconfig.defconfig') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 4437868..2ccf147 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -3,14 +3,12 @@ if SHIELD_SOFLE_LEFT config ZMK_KEYBOARD_NAME default "Sofle Left" - endif if SHIELD_SOFLE_RIGHT config ZMK_KEYBOARD_NAME default "Sofle Right" - endif if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf index 60c20dc..2194add 100644 --- a/app/boards/shields/sofle/sofle.conf +++ b/app/boards/shields/sofle/sofle.conf @@ -1,2 +1,6 @@ # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y + +# Uncomment these two lines to add support for encoders +# CONFIG_EC11=y +# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/app/boards/shields/sofle/sofle.dtsi b/app/boards/shields/sofle/sofle.dtsi index dfa001c..cfd7a95 100644 --- a/app/boards/shields/sofle/sofle.dtsi +++ b/app/boards/shields/sofle/sofle.dtsi @@ -42,7 +42,30 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; - + }; + + // TODO: Check these pins! + 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)>; + resolution = <4>; + status = "disabled"; + }; + + 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)>; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder &right_encoder>; }; }; -- cgit v1.3.1 From 7abcae6949834a4dd9d4fdb41ebc68acb36d3db7 Mon Sep 17 00:00:00 2001 From: CrossR Date: Sun, 23 Aug 2020 18:48:28 +0100 Subject: Update License info. --- app/boards/shields/sofle/Kconfig.defconfig | 2 ++ app/boards/shields/sofle/sofle.conf | 3 +++ app/boards/shields/sofle/sofle_left.conf | 3 +++ app/boards/shields/sofle/sofle_right.conf | 3 +++ 4 files changed, 11 insertions(+) (limited to 'app/boards/shields/sofle/Kconfig.defconfig') diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 2ccf147..58d8217 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT if SHIELD_SOFLE_LEFT diff --git a/app/boards/shields/sofle/sofle.conf b/app/boards/shields/sofle/sofle.conf index 2194add..fe3f0f4 100644 --- a/app/boards/shields/sofle/sofle.conf +++ b/app/boards/shields/sofle/sofle.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + # Uncomment the following line to enable the Sofle OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/sofle/sofle_left.conf b/app/boards/shields/sofle/sofle_left.conf index 1e028a7..bbac735 100644 --- a/app/boards/shields/sofle/sofle_left.conf +++ b/app/boards/shields/sofle/sofle_left.conf @@ -1,2 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y diff --git a/app/boards/shields/sofle/sofle_right.conf b/app/boards/shields/sofle/sofle_right.conf index 990cf7c..ca5de38 100644 --- a/app/boards/shields/sofle/sofle_right.conf +++ b/app/boards/shields/sofle/sofle_right.conf @@ -1,2 +1,5 @@ +# Copyright (c) 2020 Ryan Cross +# SPDX-License-Identifier: MIT + CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -- cgit v1.3.1