-
- // handle LED indicators
- static uint8_t prev_leds = 0;
- if (prev_leds != usb_keyboard_leds) {
- uint8_t leds = 0;
- if (usb_keyboard_leds&(1<<USB_LED_SCROLL_LOCK))
- leds |= (1<<PS2_LED_SCROLL_LOCK);
- if (usb_keyboard_leds&(1<<USB_LED_NUM_LOCK))
- leds |= (1<<PS2_LED_NUM_LOCK);
- if (usb_keyboard_leds&(1<<USB_LED_CAPS_LOCK))
- leds |= (1<<PS2_LED_CAPS_LOCK);
-
- ps2_set_leds(leds);
- prev_leds = usb_keyboard_leds;
- }
-