You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
421 B

  1. #include "rev2.h"
  2. #include "led.h"
  3. void led_init_ports(void) {
  4. // * Set our LED pins as output
  5. DDRB &= ~(1<<5);
  6. //Set output high, so the capslock led is off
  7. PORTB |= (1 << 5);
  8. }
  9. void led_set_kb(uint8_t usb_led) {
  10. if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
  11. // Turn capslock on
  12. PORTF |= (1<<5);
  13. } else {
  14. // Turn capslock off
  15. PORTF &= ~(1<<5);
  16. }
  17. led_set_user(usb_led);
  18. }