+ // Set as output.
+ DDRB |= (1<<0) | (1<<4);
+
+ if (usb_led & (1<<USB_LED_CAPS_LOCK))
+ {
+ // Output low.
+ PORTB &= ~(1<<0);
+ }
+ else
+ {
+ // Output high.
+ PORTB |= (1<<0);
+ }
+
+ if (usb_led & (1<<USB_LED_NUM_LOCK))
+ {
+ // Output low.
+ PORTB &= ~(1<<4);
+ }
+ else
+ {
+ // Output high.
+ PORTB |= (1<<4);
+ }