Updated paw to include RGB support.

This commit is contained in:
KnoblesseOblige 2021-03-10 09:39:23 -06:00
parent 5451e95758
commit bd8d572884
No known key found for this signature in database
GPG key ID: 2DFD3FA1A27B561E
3 changed files with 31 additions and 0 deletions

View file

@ -25,4 +25,10 @@ config ZMK_BLE
config ZMK_USB
default y
config ZMK_RGB_UNDERGLOW
default y
config WS2812_STRIP
default y
endif # BOARD_PAW

View file

@ -19,6 +19,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zmk,underglow = &led_strip;
};
kscan0: kscan {
@ -43,6 +44,29 @@
*/
};
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <22>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <6>;
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 = <4>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
&gpio0 {
status = "okay";
};

View file

@ -20,3 +20,4 @@ CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y