Add ws2812 bringup logic to all RP2040 boards.
This commit is contained in:
parent
3308f77e7c
commit
178ba6fbb4
|
@ -38,6 +38,16 @@
|
|||
#include "rp2040_pwmdev.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
#include "rp2040_ws2812.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WS2812_HAS_WHITE
|
||||
#define HAS_WHITE true
|
||||
#else /* CONFIG_WS2812_HAS_WHITE */
|
||||
#define HAS_WHITE false
|
||||
#endif /* CONFIG_WS2812_HAS_WHITE */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -398,5 +408,14 @@ int rp2040_bringup(void)
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/* Initialize board neo-pixel */
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
rp2040_ws2812_setup("/dev/leds0",
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN,
|
||||
CONFIG_WS2812_LED_COUNT,
|
||||
HAS_WHITE);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,16 @@
|
|||
#include "rp2040_pwmdev.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
#include "rp2040_ws2812.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WS2812_HAS_WHITE
|
||||
#define HAS_WHITE true
|
||||
#else /* CONFIG_WS2812_HAS_WHITE */
|
||||
#define HAS_WHITE false
|
||||
#endif /* CONFIG_WS2812_HAS_WHITE */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -477,5 +487,14 @@ int rp2040_bringup(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Initialize board neo-pixel */
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
rp2040_ws2812_setup("/dev/leds0",
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN,
|
||||
CONFIG_WS2812_LED_COUNT,
|
||||
HAS_WHITE);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue