From d52474c7e4fcbcf6052a6d6285f94016fb93d6d9 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 18 Jan 2021 23:55:22 +0000 Subject: [PATCH] feat(nibble): add support for optional display ; off by default --- app/boards/shields/nibble/Kconfig.defconfig | 36 +++++++++++++++++++++ app/boards/shields/nibble/nibble.overlay | 20 ++++++++++++ 2 files changed, 56 insertions(+) diff --git a/app/boards/shields/nibble/Kconfig.defconfig b/app/boards/shields/nibble/Kconfig.defconfig index 414bf1dc..22ef1c69 100644 --- a/app/boards/shields/nibble/Kconfig.defconfig +++ b/app/boards/shields/nibble/Kconfig.defconfig @@ -10,3 +10,39 @@ config ZMK_USB default y endif + +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_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 # LVGL diff --git a/app/boards/shields/nibble/nibble.overlay b/app/boards/shields/nibble/nibble.overlay index 7c5ee85b..83c0c7f2 100644 --- a/app/boards/shields/nibble/nibble.overlay +++ b/app/boards/shields/nibble/nibble.overlay @@ -54,3 +54,23 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,6) RC(4,9) >; }; }; + +&pro_micro_i2c { + status = "disabled"; + + 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>; + }; +};