-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c188b91
commit 6f04a8a
Showing
17 changed files
with
1,357 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if(CONFIG_ZMK_DISPLAY AND CONFIG_CUSTOM_WIDGET_STATUS) | ||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include) | ||
zephyr_library_sources(custom_status_screen.c) | ||
target_sources(app PRIVATE widgets/bolt.c) | ||
target_sources(app PRIVATE widgets/util.c) | ||
target_sources(app PRIVATE widgets/art.c) | ||
if(NOT CONFIG_ZMK_SPLIT OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL) | ||
target_sources(app PRIVATE widgets/status.c) | ||
else() | ||
target_sources(app PRIVATE widgets/peripheral_status.c) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright (c) 2023 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
if SHIELD_NICE_VIEW | ||
|
||
choice ZMK_DISPLAY_STATUS_SCREEN | ||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM | ||
endchoice | ||
|
||
|
||
if ZMK_DISPLAY | ||
|
||
config LV_Z_VDB_SIZE | ||
default 100 | ||
|
||
config LV_Z_DPI | ||
default 161 | ||
|
||
config LV_Z_BITS_PER_PIXEL | ||
default 1 | ||
|
||
choice LV_COLOR_DEPTH | ||
default LV_COLOR_DEPTH_1 | ||
endchoice | ||
|
||
endif # ZMK_DISPLAY | ||
|
||
config CUSTOM_WIDGET_STATUS | ||
bool "Custom status widget" | ||
default y if ZMK_DISPLAY_STATUS_SCREEN_CUSTOM | ||
select LV_FONT_MONTSERRAT_16 | ||
select LV_USE_IMG | ||
select LV_USE_CANVAS | ||
|
||
if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL | ||
|
||
config CUSTOM_WIDGET_STATUS | ||
select LV_FONT_MONTSERRAT_18 | ||
select LV_FONT_MONTSERRAT_14 | ||
select LV_FONT_UNSCII_16 | ||
select ZMK_WPM | ||
|
||
endif # !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL | ||
|
||
config CUSTOM_WIDGET_INVERTED | ||
bool "Invert custom status widget" | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2022 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
config SHIELD_NICE_VIEW | ||
def_bool $(shields_list_contains,nice_view) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# nice!view | ||
|
||
The nice!view is a low-power, high refresh rate display meant to replace I2C OLEDs traditionally used. | ||
|
||
This shield requires that an `&nice_view_spi` labeled SPI bus is provided with _at least_ MOSI, SCK, and CS pins defined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#include "widgets/status.h" | ||
#include "custom_status_screen.h" | ||
|
||
#include <zephyr/logging/log.h> | ||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); | ||
|
||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_STATUS) | ||
static struct zmk_widget_status status_widget; | ||
#endif | ||
|
||
lv_obj_t *zmk_display_status_screen() { | ||
|
||
lv_obj_t *screen; | ||
screen = lv_obj_create(NULL); | ||
|
||
#if IS_ENABLED(CONFIG_CUSTOM_WIDGET_STATUS) | ||
zmk_widget_status_init(&status_widget, screen); | ||
lv_obj_align(zmk_widget_status_obj(&status_widget), LV_ALIGN_TOP_LEFT, 0, 0); | ||
#endif | ||
|
||
return screen; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 The ZMK Contributors | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <lvgl.h> | ||
|
||
lv_obj_t *zmk_display_status_screen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Enable nice!view | ||
CONFIG_ZMK_DISPLAY=y | ||
|
||
CONFIG_ZMK_WIDGET_BATTERY_STATUS=n | ||
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n | ||
CONFIG_ZMK_WIDGET_LAYER_STATUS=n | ||
CONFIG_ZMK_WIDGET_PERIPHERAL_STATUS=n | ||
CONFIG_LV_USE_THEME_MONO=n | ||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2022 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
&nice_view_spi { | ||
status = "okay"; | ||
nice_view: ls0xx@0 { | ||
compatible = "sharp,ls0xx"; | ||
label = "DISPLAY"; | ||
spi-max-frequency = <1000000>; | ||
reg = <0>; | ||
width = <160>; | ||
height = <68>; | ||
}; | ||
}; | ||
|
||
/ { | ||
chosen { | ||
zephyr,display = &nice_view; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
file_format: "1" | ||
id: nice_view | ||
name: nice!view | ||
type: shield | ||
url: https://nicekeyboards.com/nice-view | ||
requires: [nice_view_header] | ||
features: | ||
- display |
Oops, something went wrong.