From 87b11345a55d076966846d87b60d0f315b8bb984 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 6 Jul 2023 18:48:02 +1000 Subject: Get rid of `USB_LED_CAPS_LOCK` (#21436) --- platforms/avr/sleep_led.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'platforms/avr/sleep_led.c') diff --git a/platforms/avr/sleep_led.c b/platforms/avr/sleep_led.c index b05431633b..ad6253be93 100644 --- a/platforms/avr/sleep_led.c +++ b/platforms/avr/sleep_led.c @@ -109,16 +109,19 @@ ISR(TIMERx_COMPA_vect) { uint8_t duration : 2; uint8_t index : 6; } pwm; - } timer = {.row = 0}; + } timer = {.row = 0}; + static led_t led_state = {0}; timer.row++; // LED on if (timer.pwm.count == 0) { - led_set(1 << USB_LED_CAPS_LOCK); + led_state.caps_lock = true; + led_set(led_state.raw); } // LED off if (timer.pwm.count == pgm_read_byte(&breathing_table[timer.pwm.index])) { - led_set(0); + led_state.caps_lock = false; + led_set(led_state.raw); } } -- cgit v1.2.3