diff --git a/zmk/app/boards/shields/tidbit/Kconfig.defconfig b/zmk/app/boards/shields/tidbit/Kconfig.defconfig index 82f2a4e6..6ecb3e79 100644 --- a/zmk/app/boards/shields/tidbit/Kconfig.defconfig +++ b/zmk/app/boards/shields/tidbit/Kconfig.defconfig @@ -7,3 +7,39 @@ config ZMK_KEYBOARD_NAME default "tidbit" 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 + 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 diff --git a/zmk/app/boards/shields/tidbit/README.md b/zmk/app/boards/shields/tidbit/README.md index 98030c07..1fa0a678 100644 --- a/zmk/app/boards/shields/tidbit/README.md +++ b/zmk/app/boards/shields/tidbit/README.md @@ -1,3 +1,68 @@ +# Building ZMK for the Tidbit + +Some general notes/commands for building standard Tidbit layouts from the assembly documentation. + +## Standard "Non Dense" Build + +``` + west build -p --board nice_nano -d build/tidbit/default -- -DSHIELD=tidbit +``` + +## Dense "19 keys" Build + +``` + west build -p --board nice_nano -d build/tidbit/19_keys -- -DSHIELD=tidbit -DKEYMAP_FILE=${PWD}/boards/shields/tidbit/tidbit_19key.keymap + +``` + +## Underglow / LEDs + +If you built your tidbit without the underglow leds, you'll need to add the following to one of the above commands. + +``` + +-DCONFIG_ZMK_RGB_UNDERGLOW=n -DCONFIG_WS2812_STRIP=n + +``` + +## Encoder Notes + +If you built your tidbit without encoders, you'll need to add the following to one of the above commands. + +``` + +-DCONFIG_EC11=n -DCONFIG_EC11_TRIGGER_GLOBAL_THREAD=n + +``` + +## OLED Builds + +If using an OLED screen you'll need to include the following at the *end* of one of the above commands to build support for the OLED into the firmware. + +``` +-DZMK_DISPLAY=yes + +``` + +You'll also need to add the following to your keymap file. + +``` + +&pro_micro_i2c { + status = "okay"; +}; + +``` + +## Graphcs Library + +If you'd like to use ```lvgl``` with an OLED please append *BOTH* the above OLED parameter and the below to one of the above commands. + +``` + +-DLVGL=yes + +``` diff --git a/zmk/app/boards/shields/tidbit/tidbit.dtsi b/zmk/app/boards/shields/tidbit/tidbit.dtsi index d2e621c1..414699fb 100644 --- a/zmk/app/boards/shields/tidbit/tidbit.dtsi +++ b/zmk/app/boards/shields/tidbit/tidbit.dtsi @@ -95,3 +95,23 @@ zmk,underglow = &led_strip; }; }; + +&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>; + }; +};