Skip to content

Commit

Permalink
Update lily58.keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadSaada committed Dec 24, 2023
1 parent 6aa7443 commit 1196c3e
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions config/lily58.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,39 @@
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/rgb.h>

&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 1, 13)>;
};
};

spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 1, 13)>;
low-power-enable;
};
};
};

&spi3 {
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;

// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.

pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
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 */

reg = <0>;
spi-max-frequency = <4000000>;

/* WS2812 */
chain-length = <6>; /* Change this according to how many leds are on the strip */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;

chain-length = <35>; /* number of LEDs */
spi-one-frame = <0x70>; /* make sure to configure this properly for your SOC */
spi-zero-frame = <0x40>; /* make sure to configure this properly for your SOC */
color-mapping = <
LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE
>;
};
};


/ {
chosen {
zmk,underglow = &led_strip;
Expand Down

0 comments on commit 1196c3e

Please sign in to comment.