From 7439367b2ee8cc06b9e16b52035bb7eaf99a3fbb Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 21 Feb 2018 10:28:29 -0500 Subject: [PATCH] drivers: led_strip: add ws2812 defaults for nRF5 devices Define a SPI baud rate, as well as WS2812_STRIP_ONE_FRAME and WS2812_STRIP_ZERO_FRAME values, that work for nRF5 devices. Signed-off-by: Marti Bolivar --- drivers/led_strip/Kconfig.ws2812 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/led_strip/Kconfig.ws2812 b/drivers/led_strip/Kconfig.ws2812 index a5c4f136402..6be2de88247 100644 --- a/drivers/led_strip/Kconfig.ws2812 +++ b/drivers/led_strip/Kconfig.ws2812 @@ -50,6 +50,7 @@ config WS2812_STRIP_SPI_DEV_NAME config WS2812_STRIP_SPI_BAUD_RATE int "Baud rate to use to drive LED strip" default 5250000 if SOC_SERIES_STM32F4X + default 4000000 if SOC_FAMILY_NRF help SPI clock rate, in Hz, to use while driving the strip. The baud rate must be chosen carefully together with the @@ -60,6 +61,7 @@ config WS2812_STRIP_SPI_BAUD_RATE config WS2812_STRIP_ONE_FRAME hex "SPI frame to shift out to signal a one bit" default 0x7c if SOC_SERIES_STM32F4X + default 0x70 if SOC_FAMILY_NRF help When shifted out at the configured clock frequency, this must generate a pulse whose width fits within the chipset @@ -71,6 +73,7 @@ config WS2812_STRIP_ONE_FRAME config WS2812_STRIP_ZERO_FRAME hex "SPI frame to shift out to signal a zero bit" default 0x60 if SOC_SERIES_STM32F4X + default 0x40 if SOC_FAMILY_NRF help When shifted out at the configured clock frequency, this must generate a pulse whose width fits within the chipset