/* * Created on: Jul 31, 2024 */ #include #include "hsv2rgb.h" #include "led.h" #include "rand.h" static uint16_t rgb_rnd; static uint16_t rgb_work[4]; /* * rainbow puke */ static void rgb_0_rainbow(uint8_t tick) { } /* * static color with bright flickers */ static void rgb_1_flicker(uint8_t tick) { } /* * alternate between two colors */ static void rgb_2_alternate(uint8_t tick) { } const void (*ledprog_rgb[4])(uint8_t) = { (const void (*)(uint8_t))rgb_0_rainbow, (const void (*)(uint8_t))rgb_1_flicker, (const void (*)(uint8_t))rgb_2_alternate }; void ledprog_rgb_init() { uint8_t i; rgb_rnd = prng_get16(); // global program initialization for (i = 0; i < 4; i++) { rgb_work[i] = 0; } }