feature(shields): Add nice!view

This commit is contained in:
Nick Winans 2022-09-21 15:36:24 -05:00
parent cc6dd5fc49
commit d9829a6b49
6 changed files with 81 additions and 0 deletions

View file

@ -49,6 +49,13 @@
scl-pin = <20>;
};
&spi0 {
compatible = "nordic,nrf-spim";
sck-pin = <20>;
mosi-pin = <17>;
miso-pin = <25>;
};
&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
@ -63,6 +70,7 @@
};
};
nice_view_spi: &spi0 {};
&flash0 {
/*

View file

@ -0,0 +1,26 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_NICE_VIEW
config ZMK_DISPLAY
select LVGL_FONT_MONTSERRAT_26
if ZMK_DISPLAY
config SPI
default y
config LS0XX
default y
if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
config ZMK_WIDGET_WPM_STATUS
default y
endif # !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
endif # ZMK_DISPLAY
endif

View file

@ -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)

View file

@ -0,0 +1,5 @@
# Enable nice!view
CONFIG_ZMK_DISPLAY=y
CONFIG_SSD1306=n
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_26=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y

View file

@ -0,0 +1,29 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&nice_view_spi {
status = "okay";
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
nice_view: ls0xx@0 {
compatible = "sharp,ls0xx";
label = "DISPLAY";
spi-max-frequency = <1000000>;
reg = <0>;
width = <160>;
height = <68>;
};
};
&pro_micro_i2c {
status = "disabled";
};
/ {
chosen {
zephyr,display = &nice_view;
};
};

View file

@ -0,0 +1,8 @@
file_format: "1"
id: nice_view
name: nice!view
type: shield
url: https://nicekeyboards.com/nice-view
requires: [pro_micro, i2c_oled]
features:
- display