kc60.c 286 B

12345678910111213141516
  1. #include "kc60.h"
  2. void led_set_kb(uint8_t usb_led)
  3. {
  4. if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
  5. // output low
  6. DDRB |= (1<<2);
  7. PORTB &= ~(1<<2);
  8. } else {
  9. // Hi-Z
  10. DDRB &= ~(1<<2);
  11. PORTB &= ~(1<<2);
  12. }
  13. led_set_user(usb_led);
  14. }