diff --git a/app/boards/shields/jorne/boards/nrfmicro_13.overlay b/app/boards/shields/jorne/boards/nrfmicro_13.overlay new file mode 100644 index 00000000000..21e5d36c71f --- /dev/null +++ b/app/boards/shields/jorne/boards/nrfmicro_13.overlay @@ -0,0 +1,29 @@ +&spi1 { + compatible = "nordic,nrf-spim"; + /* Cannot be used together with i2c0. */ + status = "okay"; + mosi-pin = <6>; + // 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 = <28>; /* There are per-key RGB, but the first 6 are underglow */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/jorne/jorne.keymap b/app/boards/shields/jorne/jorne.keymap index 93c7691aa33..0177232e76d 100644 --- a/app/boards/shields/jorne/jorne.keymap +++ b/app/boards/shields/jorne/jorne.keymap @@ -7,6 +7,7 @@ #include #include #include +#include #define DEF 0 #define LWR 1 @@ -64,10 +65,10 @@ // | | | | | | | | | | | | | | // | | | | | | | | bindings = < - &reset &bootloader &none &none &none &none &none &none &none &none &none &none &bootloader &reset - &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR - &none &none &none &none &none &none &none &none &none &none &none &none - &trans &none &trans &trans &none &trans + &reset &rgb_ug RGB_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &rgb_ug RGB_TOG &reset + &rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &none &bootloader &bootloader &none &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF + &rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &none &none &none &none &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR + &trans &bt BT_CLR &trans &trans &bt BT_CLR &trans >; }; }; diff --git a/app/boards/shields/jorne/jorne_left.conf b/app/boards/shields/jorne/jorne_left.conf index e69de29bb2d..8e5ae25ef1b 100644 --- a/app/boards/shields/jorne/jorne_left.conf +++ b/app/boards/shields/jorne/jorne_left.conf @@ -0,0 +1,4 @@ +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y diff --git a/app/boards/shields/jorne/jorne_right.conf b/app/boards/shields/jorne/jorne_right.conf index e69de29bb2d..8e5ae25ef1b 100644 --- a/app/boards/shields/jorne/jorne_right.conf +++ b/app/boards/shields/jorne/jorne_right.conf @@ -0,0 +1,4 @@ +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y