Skip to content

Commit

Permalink
Add display
Browse files Browse the repository at this point in the history
  • Loading branch information
SofusA committed Oct 4, 2024
1 parent 727d2f7 commit 0839433
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 6 deletions.
39 changes: 39 additions & 0 deletions config/boards/shields/sweeple/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,43 @@ if SHIELD_SWEEPLE_LEFT || SHIELD_SWEEPLE_RIGHT || SHIELD_SWEEPLE_DONGLE
config ZMK_SPLIT
default y

if ZMK_DISPLAY

config ZMK_DISPLAY
select LV_USE_CONT
select LV_FONT_MONTSERRAT_26
select LV_FONT_MONTSERRAT_16
select LV_USE_LABEL
select LV_USE_IMG

config I2C
default y

config SSD1306
default y

config SSD1306_REVERSE_MODE
bool
default n

endif # ZMK_DISPLAY

if LVGL

config LV_Z_VDB_SIZE
default 64

config LV_DPI_DEF
int
default 148

config LV_Z_BITS_PER_PIXEL
default 1

choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice

endif # LVGL

endif
5 changes: 5 additions & 0 deletions config/boards/shields/sweeple/sweeple_dongle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ CONFIG_ZMK_SLEEP=n
CONFIG_ZMK_MOUSE=y

CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=7200000

CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_DISPLAY_INVERT=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
31 changes: 25 additions & 6 deletions config/boards/shields/sweeple/sweeple_dongle.overlay
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "sweeple.dtsi"

/ {
chosen {
zephyr,display = &oled;
};
};

&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
label = "DISPLAY";
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
};
};
5 changes: 5 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/petejohanson
# - name: englmaxi
# url-base: https://github.com/englmaxi
projects:
- name: zmk
remote: zmkfirmware
revision: feat/pointers-move-scroll
import: app/west.yml
# - name: zmk-dongle-display
# remote: englmaxi
# revision: main
self:
path: config

0 comments on commit 0839433

Please sign in to comment.