diff options
author | IBNobody <protospherex@gmail.com> | 2016-10-29 11:13:15 -0500 |
---|---|---|
committer | IBNobody <protospherex@gmail.com> | 2016-10-29 11:13:15 -0500 |
commit | e40c33f754a86c4dd7bd3c7b5c7efe822f2893bc (patch) | |
tree | bf372a8afead88128f68d373435025a16fbf53c2 /keyboards/vision_division/vision_division.c | |
parent | 973f526bb4928bf3aec6067aa444b31ace997c8a (diff) | |
parent | 32f88c07173b795c6981c779057dceba00aeb1cb (diff) |
Merge branch 'master' of https://github.com/IBNobody/qmk_firmware
Diffstat (limited to 'keyboards/vision_division/vision_division.c')
-rw-r--r-- | keyboards/vision_division/vision_division.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/keyboards/vision_division/vision_division.c b/keyboards/vision_division/vision_division.c index eb9336fa33..a0e0f449c4 100644 --- a/keyboards/vision_division/vision_division.c +++ b/keyboards/vision_division/vision_division.c @@ -24,5 +24,45 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (usb_led & (1 << USB_LED_CAPS_LOCK)) + { + // HI + DDRD |= (1<<4); + PORTD |= (1<<4); + } + else + { + // Hi-Z + DDRD &= ~(1<<4); + PORTD &= ~(1<<4); + } + + if (usb_led & (1 << USB_LED_NUM_LOCK)) + { + // HI + DDRD |= (1<<5); + PORTD |= (1<<5); + } + else + { + // Hi-Z + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) + { + // HI + DDRD |= (1<<6); + PORTD |= (1<<6); + } + else + { + // Hi-Z + DDRD &= ~(1<<6); + PORTD &= ~(1<<6); + } + led_set_user(usb_led); } + |