diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-09-28 23:57:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 23:57:50 -0400 |
commit | f0db230c461b77d0d24984d4f0dcd26f12e67076 (patch) | |
tree | 054ee42af8683f22b3f0ddf36a43d8c33d713454 /keyboards/vision_division/vision_division.c | |
parent | 812219e8a0bf5f317c000d3c5247cdb93a6d7fff (diff) | |
parent | 78767bf2084a1d63edd0957e09048d34ef448380 (diff) |
Merge pull request #790 from IBNobody/master
Fix #770, Fix #779, Update Vision
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); } + |