From 8f0b36cbb27ea8bf14fb0ead57671608ce08c248 Mon Sep 17 00:00:00 2001 From: Xmj <146149506+Deer-Xmj@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0=E8=BF=9B?= =?UTF-8?q?=E5=8E=BB,=E8=B0=83=E6=95=B4=E4=BA=86=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Xmj <146149506+Deer-Xmj@users.noreply.github.com> --- config/boards/nice_nano_v2.overlay | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 config/boards/nice_nano_v2.overlay diff --git a/config/boards/nice_nano_v2.overlay b/config/boards/nice_nano_v2.overlay new file mode 100644 index 0000000..d60df47 --- /dev/null +++ b/config/boards/nice_nano_v2.overlay @@ -0,0 +1,46 @@ +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&spi3 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi3_default>; + pinctrl-1 = <&spi3_sleep>; + pinctrl-names = "default", "sleep"; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; \ No newline at end of file