mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Add LED compatibility for other boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -79,7 +79,8 @@ uint32_t pixel[] = {
|
||||
0xffffff00 // 7: white
|
||||
};
|
||||
|
||||
void led_driver_color(uint8_t color, float brightness) {
|
||||
void led_driver_color(uint8_t color, uint32_t led_brightness, float progress) {
|
||||
float brightness = ((float)led_brightness / MAX_BTNESS) * progress;
|
||||
uint32_t pixel_color = pixel[color];
|
||||
uint8_t r = (pixel_color >> 16) & 0xFF;
|
||||
uint8_t g = (pixel_color >> 24) & 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user