Support OLED
This commit is contained in:
parent
2adaa00d10
commit
b8f973f1d0
3 changed files with 55 additions and 2 deletions
|
@ -17,3 +17,31 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
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
|
|
@ -4,3 +4,6 @@
|
||||||
# Enables RGB functionality (Uncomment lines below to enable.)
|
# Enables RGB functionality (Uncomment lines below to enable.)
|
||||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
# CONFIG_WS2812_STRIP=y
|
# CONFIG_WS2812_STRIP=y
|
||||||
|
|
||||||
|
# Uncomment the following line to enable the Helix OLED Display
|
||||||
|
# CONFIG_ZMK_DISPLAY=y
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
|
zephyr,display = &oled;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix-transform = &default_transform;
|
zmk,matrix-transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
@ -44,3 +45,24 @@ 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>;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue