daisy.c 364 B

123456789101112131415
  1. #include "daisy.h"
  2. void led_set_kb(uint8_t usb_led) {
  3. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  4. if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
  5. // output low
  6. DDRC |= (1<<PC6);
  7. PORTC &= ~(1<<PC6);
  8. } else {
  9. // Hi-Z
  10. DDRC &= ~(1<<PC6);
  11. PORTC &= ~(1<<PC6);
  12. }
  13. led_set_user(usb_led);
  14. }