pro micro LEDs as capslock indicator
This commit is contained in:
parent
63724f441e
commit
3b816b9593
Binary file not shown.
Binary file not shown.
@ -22,5 +22,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
void led_set(uint8_t usb_led)
|
||||
{
|
||||
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD |= (1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user