rev1.c 330 B

1234567891011121314151617
  1. #include "rev1.h"
  2. void led_init_ports() {
  3. // * Set our LED pins as output
  4. DDRF |= (1<<0);
  5. }
  6. void led_set_kb(uint8_t usb_led) {
  7. DDRF |= (1<<0);
  8. if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
  9. // Turn capslock on
  10. PORTF |= (1<<0);
  11. } else {
  12. // Turn capslock off
  13. PORTF &= ~(1<<0);
  14. }
  15. }