diff --git a/application.c b/application.c index c110a0a..c842a7d 100644 --- a/application.c +++ b/application.c @@ -35,6 +35,7 @@ #include "terminal.h" // handle the terminal interface #include "menu.h" // menu utilities #include "font.h" // to draw text +#include "led_ws2812b.h" // control WS2812b LEDs /** watchdog period in ms */ #define WATCHDOG_PERIOD 10000 @@ -934,6 +935,13 @@ void main(void) nvic_enable_irq(GPIO_NVIC_EXTI_IRQ(DIAL_SWITCH_PIN)); // enable interrupt puts_debug("OK\n"); + puts_debug("setup WS2812b LED matrix: "); + led_ws2812b_setup(); // configure peripheral for communication with WS2812b LEDs + led_ws2812b_set_rgb(0, 0xff, 0, 0); // set test color + led_ws2812b_set_rgb(1, 0, 0xff, 0); // set test color + led_ws2812b_set_rgb(2, 0, 0, 0xff); // set test color + puts_debug("OK\n"); + puts_debug("setup RGB matrix: "); // configure pin for output enable rcc_periph_clock_enable(GPIO_RCC(RGBMATRIX_OE_PIN)); // enable clock for GPIO port peripheral