From b8f973f1d093e079bf04980e6a9ab7e929e398e3 Mon Sep 17 00:00:00 2001 From: Garrett Faucher <44652299+GarrettFaucher@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:10:09 -0400 Subject: [PATCH 1/2] Support OLED --- app/boards/shields/helix/Kconfig.defconfig | 30 +++++++++++++++++++++- app/boards/shields/helix/helix.conf | 5 +++- app/boards/shields/helix/helix.dtsi | 22 ++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/helix/Kconfig.defconfig b/app/boards/shields/helix/Kconfig.defconfig index 62d73c44..aa682083 100644 --- a/app/boards/shields/helix/Kconfig.defconfig +++ b/app/boards/shields/helix/Kconfig.defconfig @@ -16,4 +16,32 @@ if SHIELD_HELIX_LEFT || SHIELD_HELIX_RIGHT config ZMK_SPLIT default y -endif \ No newline at end of file +endif + + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LV_Z_VDB_SIZE + default 64 + +config LV_DPI_DEF + default 148 + +config LV_Z_BITS_PER_PIXEL + default 1 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 +endchoice + +endif # LVGL \ No newline at end of file diff --git a/app/boards/shields/helix/helix.conf b/app/boards/shields/helix/helix.conf index a8e57338..ddd1f79b 100644 --- a/app/boards/shields/helix/helix.conf +++ b/app/boards/shields/helix/helix.conf @@ -3,4 +3,7 @@ # Enables RGB functionality (Uncomment lines below to enable.) # CONFIG_ZMK_RGB_UNDERGLOW=y -# CONFIG_WS2812_STRIP=y \ No newline at end of file +# CONFIG_WS2812_STRIP=y + +# Uncomment the following line to enable the Helix OLED Display +# CONFIG_ZMK_DISPLAY=y \ No newline at end of file diff --git a/app/boards/shields/helix/helix.dtsi b/app/boards/shields/helix/helix.dtsi index df80f4ca..328bde29 100644 --- a/app/boards/shields/helix/helix.dtsi +++ b/app/boards/shields/helix/helix.dtsi @@ -8,6 +8,7 @@ / { chosen { + zephyr,display = &oled; zmk,kscan = &kscan0; zmk,matrix-transform = &default_transform; }; @@ -43,4 +44,25 @@ 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 ; }; +}; + + +&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>; + }; }; \ No newline at end of file From 9d420e1e283d41dedb7cbee04cfd1effc8af6aad Mon Sep 17 00:00:00 2001 From: Garrett Faucher <44652299+GarrettFaucher@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:19:54 -0400 Subject: [PATCH 2/2] Update README.md --- app/boards/shields/helix/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/app/boards/shields/helix/README.md b/app/boards/shields/helix/README.md index f8b0e13f..f84e778e 100644 --- a/app/boards/shields/helix/README.md +++ b/app/boards/shields/helix/README.md @@ -2,7 +2,6 @@ - If desired, RGB underglow must be manually enabled before building and flashing. Check 'helix.conf' to do so. - Peripheral RGB function is impaired until full support is implemented in the master branch. -- OLED displays are not currently included in this shield. This will be updated after OLED support is live. - 'KANA' and 'EISUU' input is currently utilized under the 'LANG1' and 'LANG2' keycodes respectively. ---