This lets a subset of the LEDs be controlled independent of other LED settings.
Signed-off-by: Keith Packard <keithp@keithp.com>
void
ao_led_set(AO_LED_TYPE colors);
+/* Set all LEDs in 'mask' to the specified state */
+void
+ao_led_set_mask(uint8_t colors, uint8_t mask);
+
/* Toggle the specified LEDs */
void
ao_led_toggle(AO_LED_TYPE colors);
ao_led_apply();
}
+void
+ao_led_set_mask(uint8_t colors, uint8_t mask)
+{
+ ao_led_state = (ao_led_state & ~mask) | (colors & mask);
+ ao_led_apply();
+}
+
void
ao_led_toggle(uint8_t colors)
{
void
ao_led_init(uint8_t enable)
{
+ (void) enable;
ao_enable_output(AO_PCA9922_CS_PORT, AO_PCA9922_CS_PIN, AO_PCA9922_CS, 1);
}