Use boards overlay structure
This commit is contained in:
parent
d9829a6b49
commit
1173e43ac5
6 changed files with 63 additions and 33 deletions
|
@ -49,13 +49,6 @@
|
||||||
scl-pin = <20>;
|
scl-pin = <20>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi0 {
|
|
||||||
compatible = "nordic,nrf-spim";
|
|
||||||
sck-pin = <20>;
|
|
||||||
mosi-pin = <17>;
|
|
||||||
miso-pin = <25>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
compatible = "nordic,nrf-uarte";
|
compatible = "nordic,nrf-uarte";
|
||||||
tx-pin = <6>;
|
tx-pin = <6>;
|
||||||
|
@ -70,7 +63,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nice_view_spi: &spi0 {};
|
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
/*
|
/*
|
||||||
|
|
20
app/boards/shields/nice_view/boards/nice_nano.overlay
Normal file
20
app/boards/shields/nice_view/boards/nice_nano.overlay
Normal 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"
|
20
app/boards/shields/nice_view/boards/nice_nano_v2.overlay
Normal file
20
app/boards/shields/nice_view/boards/nice_nano_v2.overlay
Normal 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"
|
22
app/boards/shields/nice_view/nice_view.dtsi
Normal file
22
app/boards/shields/nice_view/nice_view.dtsi
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
|
@ -3,27 +3,4 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* 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;
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -3,6 +3,5 @@ id: nice_view
|
||||||
name: nice!view
|
name: nice!view
|
||||||
type: shield
|
type: shield
|
||||||
url: https://nicekeyboards.com/nice-view
|
url: https://nicekeyboards.com/nice-view
|
||||||
requires: [pro_micro, i2c_oled]
|
|
||||||
features:
|
features:
|
||||||
- display
|
- display
|
||||||
|
|
Loading…
Add table
Reference in a new issue