From e97a59b30384853bebcfc14ba321cb6fd4a06dd7 Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Thu, 12 May 2022 02:07:23 -0400 Subject: [PATCH] set up nice nano v2 overlay file to ease any future confusion --- .../shields/mokulua/boards/nice_nano.conf | 3 -- .../mokulua/boards/nice_nano_v2.overlay | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) delete mode 100644 app/boards/shields/mokulua/boards/nice_nano.conf create mode 100644 app/boards/shields/mokulua/boards/nice_nano_v2.overlay diff --git a/app/boards/shields/mokulua/boards/nice_nano.conf b/app/boards/shields/mokulua/boards/nice_nano.conf deleted file mode 100644 index dda71c13..00000000 --- a/app/boards/shields/mokulua/boards/nice_nano.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Uncomment both to enable underglow -CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/mokulua/boards/nice_nano_v2.overlay b/app/boards/shields/mokulua/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..b663d8aa --- /dev/null +++ b/app/boards/shields/mokulua/boards/nice_nano_v2.overlay @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2022 Kyle McCreery + * + * SPDX-License-Identifier: MIT + */ + + #include + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + mosi-pin = <9>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <8>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; \ No newline at end of file