1
0
Fork 0

Get rid of USB_LED_CAPS_LOCK (#21436)

This commit is contained in:
Ryan 2023-07-06 18:48:02 +10:00 committed by GitHub
parent 928e03e8d6
commit 87b11345a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 214 additions and 226 deletions

View file

@ -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);
}
}