Get rid of USB_LED_SCROLL_LOCK (#21405)
This commit is contained in:
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,29 @@ 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) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
}
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,29 @@ 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) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
}
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,23 +12,29 @@ 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) {
|
||||
if (led_state.num_lock) {
|
||||
DDRB |= (1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5);
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
DDRB |= (1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6);
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 6); PORTB &= ~(1 << 6);
|
||||
} else {
|
||||
DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 7); PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7); PORTB &= ~(1 << 7);
|
||||
}
|
||||
if (led_state.scroll_lock) {
|
||||
DDRB |= (1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
} else {
|
||||
DDRB &= ~(1 << 7);
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user