LEDs review

This commit is contained in:
2026-09-23 22:54:22 -05:00
parent b21a3cf63a
commit 8d635d41c6
2 changed files with 92 additions and 15 deletions
+18 -2
View File
@@ -84,6 +84,7 @@ void init_leds();
class LEDController {
private:
static void set_led(uint32_t led, uint32_t color);
static void clear_range(uint32_t first_led, uint32_t led_count, LEDColor color);
public:
/// Sets the color of an indicator LED.
///
@@ -99,11 +100,26 @@ public:
set_led(static_cast<uint32_t>(led), color.value());
}
/// Outputs the data to the leds.
/// Outputs the pending data to the LEDs.
static void flush();
/// Clears the LEDs
/// Sets all LEDs to off without transmitting.
static void clear();
/// Sets all LEDs to `color` without transmitting.
static void clear(LEDColor color);
/// Sets all indicator LEDs to off without transmitting.
static void clear_indicators();
/// Sets all indicator LEDs to `color` without transmitting.
static void clear_indicators(LEDColor color);
/// Sets all shape-display LEDs to off without transmitting.
static void clear_shape_display();
/// Sets all shape-display LEDs to `color` without transmitting.
static void clear_shape_display(LEDColor color);
};