1
0

pro micro LEDs as capslock indicator

This commit is contained in:
di0ib 2016-10-19 19:34:17 -10:00
parent 63724f441e
commit 3b816b9593
3 changed files with 14 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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);
}
}