Implement changing color test for SK6812

This commit is contained in:
Mario Hüttel 2021-03-12 22:32:59 +01:00
parent f2183c5dac
commit f31160964b

View File

@ -16,14 +16,17 @@ static void wait_for_ticks(uint32_t ticks)
int main(void)
{
uint32_t led_val = 0xAAUL;
RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
GPIOA->MODER |= (1<<3*2);
SysTick_Config(800000);
while(1) {
__disable_irq();
sk6812_send_led(0x000000FF);
sk6812_send_led(led_val);
__enable_irq();
wait_for_ticks(30);
led_val += 20;
}
}