diff options
Diffstat (limited to 'src/drivers/ao_pca9922.c')
-rw-r--r-- | src/drivers/ao_pca9922.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/ao_pca9922.c b/src/drivers/ao_pca9922.c index dc006f55..6d8d18d8 100644 --- a/src/drivers/ao_pca9922.c +++ b/src/drivers/ao_pca9922.c @@ -57,6 +57,13 @@ ao_led_set(uint8_t colors) } 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) { ao_led_state ^= colors; @@ -74,5 +81,6 @@ ao_led_for(uint8_t colors, uint16_t ticks) __reentrant void ao_led_init(uint8_t enable) { + (void) enable; ao_enable_output(AO_PCA9922_CS_PORT, AO_PCA9922_CS_PIN, AO_PCA9922_CS, 1); } |