forked from kofal.net/zmk
feature(shields): Add nice!view
* Use two shield system, nice_view, and nice_view_adapter * Build system fixes for interconnect use.
This commit is contained in:
2
app/boards/shields/nice_view_adapter/Kconfig.defconfig
Normal file
2
app/boards/shields/nice_view_adapter/Kconfig.defconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
5
app/boards/shields/nice_view_adapter/Kconfig.shield
Normal file
5
app/boards/shields/nice_view_adapter/Kconfig.shield
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_NICE_VIEW_ADAPTER
|
||||
def_bool $(shields_list_contains,nice_view_adapter)
|
||||
11
app/boards/shields/nice_view_adapter/README.md
Normal file
11
app/boards/shields/nice_view_adapter/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# nice!view Adapter
|
||||
|
||||
This shield is used as an adapter between the nice!view and existing shields/boards that expose an I2C OLED header.
|
||||
|
||||
To use this shield, you should add this shield to your list of shields *before* `nice_view`.
|
||||
|
||||
The nice!view will use the SDA/SCL pins of the OLED, and then the adapter expects a final pin to be "bodged" from your microcontroller to the nice!view CS pin. This adapter assumes that the CS pin bodged is the `&pro_micro 1` pin or "D1", which is the top left pin when looking at the front of the board. If you can't use this pin, you'll need to override the `cs-gpios` for the `&nice_view_spi` bus (in your `zmk-config` keymap for example) or you will want to define your own `&nice_view_spi` bus without using this adapter.
|
||||
|
||||
```
|
||||
west build -b nice_nano_v2 -- -DSHIELD="lily58_left nice_view_adapter nice_view"
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <17>;
|
||||
mosi-pin = <15>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <20>;
|
||||
mosi-pin = <17>;
|
||||
miso-pin = <5>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <20>;
|
||||
mosi-pin = <17>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <20>;
|
||||
mosi-pin = <17>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <17>;
|
||||
mosi-pin = <15>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <31>;
|
||||
mosi-pin = <30>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <17>;
|
||||
mosi-pin = <15>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
nice_view_spi: &spi0 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
sck-pin = <17>;
|
||||
mosi-pin = <15>;
|
||||
miso-pin = <25>;
|
||||
cs-gpios = <&pro_micro 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
# Disable OLED
|
||||
CONFIG_SSD1306=n
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
file_format: "1"
|
||||
id: nice_view_adapter
|
||||
name: nice!view adapter
|
||||
type: shield
|
||||
url: https://nicekeyboards.com/nice-view
|
||||
requires: [i2c_oled]
|
||||
exposes: [nice_view_header]
|
||||
Reference in New Issue
Block a user