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 561a0a9
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 232 deletions.
4 changes: 0 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ include:
shield: sweeple_right
- board: nice_nano_v2
shield: sweeple_dongle
- board: nice_nano_v2
shield: cradio_left
- board: nice_nano_v2
shield: cradio_right
- board: nice_nano_v2
shield: settings_reset
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
4 changes: 4 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,7 @@ CONFIG_ZMK_SLEEP=n
CONFIG_ZMK_MOUSE=y

CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=7200000

CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
30 changes: 24 additions & 6 deletions config/boards/shields/sweeple/sweeple_dongle.overlay
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
/*
* 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>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
Empty file removed config/cradio.conf
Empty file.
Loading

0 comments on commit 561a0a9

Please sign in to comment.