diff options
| author | Hannes Egler <hannes.egler@gmail.com> | 2018-05-29 05:18:39 +0200 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-05-28 20:18:39 -0700 |
| commit | dfa7a708fef77ac1570face29d7e8413f3e725ee (patch) | |
| tree | fb39e34012a29a4d1a361014b67605f9ea8666bc | |
| parent | 2b677ddac9aaba14f75787ab4b6d81054ad6ffd4 (diff) | |
| download | qmk_firmware-dfa7a708fef77ac1570face29d7e8413f3e725ee.tar.gz qmk_firmware-dfa7a708fef77ac1570face29d7e8413f3e725ee.zip | |
Indicator led support for KBD8X (#3064)
* Support for indicator LEDs
* fixes for backlighting support
* more fixes
| -rw-r--r-- | keyboards/kbd8x/kbd8x.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbd8x/kbd8x.c index 51e785241..af7ab7a07 100644 --- a/keyboards/kbd8x/kbd8x.c +++ b/keyboards/kbd8x/kbd8x.c | |||
| @@ -39,5 +39,26 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
| 39 | void led_set_kb(uint8_t usb_led) { | 39 | void led_set_kb(uint8_t usb_led) { |
| 40 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | 40 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here |
| 41 | 41 | ||
| 42 | if(usb_led & (1<<USB_LED_NUM_LOCK)) | ||
| 43 | { | ||
| 44 | num_led_on(); | ||
| 45 | } else { | ||
| 46 | num_led_off(); | ||
| 47 | } | ||
| 48 | |||
| 49 | if(usb_led & (1<<USB_LED_CAPS_LOCK)) | ||
| 50 | { | ||
| 51 | caps_led_on(); | ||
| 52 | } else { | ||
| 53 | caps_led_off(); | ||
| 54 | } | ||
| 55 | |||
| 56 | if(usb_led & (1<<USB_LED_SCROLL_LOCK)) | ||
| 57 | { | ||
| 58 | scroll_led_on(); | ||
| 59 | } else { | ||
| 60 | scroll_led_off(); | ||
| 61 | } | ||
| 62 | |||
| 42 | led_set_user(usb_led); | 63 | led_set_user(usb_led); |
| 43 | } | 64 | } |
