Use boards overlay structure

This commit is contained in:
Nick Winans 2022-09-25 12:00:51 -05:00
parent d9829a6b49
commit 1173e43ac5
6 changed files with 63 additions and 33 deletions

View file

@ -49,13 +49,6 @@
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>;
@ -70,7 +63,6 @@
};
};
nice_view_spi: &spi0 {};
&flash0 {
/*

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
nice_view_spi: &spi0 {
compatible = "nordic,nrf-spim";
status = "okay";
sck-pin = <20>;
mosi-pin = <17>;
miso-pin = <25>;
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
};
&pro_micro_i2c {
status = "disabled";
};
#include "../nice_view.dtsi"

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
nice_view_spi: &spi0 {
compatible = "nordic,nrf-spim";
status = "okay";
sck-pin = <20>;
mosi-pin = <17>;
miso-pin = <25>;
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
};
&pro_micro_i2c {
status = "disabled";
};
#include "../nice_view.dtsi"

View file

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

View file

@ -3,27 +3,4 @@
*
* 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

@ -3,6 +3,5 @@ id: nice_view
name: nice!view
type: shield
url: https://nicekeyboards.com/nice-view
requires: [pro_micro, i2c_oled]
features:
- display