diff options
author | IBNobody <ibnobody@gmail.com> | 2016-09-28 20:19:28 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-09-28 20:19:28 -0500 |
commit | 3d45860dc280c7595763256ecd4874220abf0ab2 (patch) | |
tree | 532576d32212dc2aa5028b39050a6ae3fcb693bb /keyboards/vision_division/vision_division.c | |
parent | 24a953ae64adc8e0c26059fbe76088eb65d90d9e (diff) | |
download | qmk_firmware-3d45860dc280c7595763256ecd4874220abf0ab2.tar.gz |
Updating Vision to beta layout.
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 eb9336fa3..a0e0f449c 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); } + |