mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-05-04 23:12:57 +00:00
Get rid of USB_LED_SCROLL_LOCK (#21405)
This commit is contained in:
@@ -19,26 +19,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
bool led_update_user(led_t led_state) {
|
||||
setPinOutput(B4);
|
||||
setPinOutput(D6);
|
||||
setPinOutput(D7);
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
if (led_state.num_lock) {
|
||||
writePinHigh(D7);
|
||||
} else {
|
||||
writePinLow(D7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
if (led_state.caps_lock) {
|
||||
writePinHigh(B4);
|
||||
} else {
|
||||
writePinLow(B4);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
if (led_state.scroll_lock) {
|
||||
writePinHigh(D6);
|
||||
} else {
|
||||
writePinLow(D6);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,24 +22,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
bool led_update_user(led_t led_state) {
|
||||
DDRB |= (1 << 4) | (1 << 5) | (1 << 6);
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
if (led_state.num_lock) {
|
||||
PORTB |= (1 << 4);
|
||||
} else {
|
||||
PORTB &= ~(1 << 4);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
if (led_state.caps_lock) {
|
||||
PORTB |= (1 << 5);
|
||||
} else {
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
if (led_state.scroll_lock) {
|
||||
PORTB |= (1 << 6);
|
||||
} else {
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user