diff options
author | xyverz <xyverz@gmail.com> | 2016-09-30 23:16:50 -0700 |
---|---|---|
committer | xyverz <xyverz@gmail.com> | 2016-09-30 23:16:50 -0700 |
commit | e69e4c1ef2cd553597e10d1ae5b0384d29f2c16f (patch) | |
tree | 957641d33f60e75b8fd747da11ed3bca06f0cfab /keyboards/vision_division/vision_division.c | |
parent | e3c3170610561042df3d67f358c15553878a2012 (diff) | |
parent | 35e6870e5c8943c044187256e01c96ef400ca067 (diff) | |
download | qmk_firmware-e69e4c1ef2cd553597e10d1ae5b0384d29f2c16f.tar.gz |
Merge remote-tracking branch 'jackhumbert/master'
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); } + |