summaryrefslogtreecommitdiffstats
path: root/adb/matrix.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-01-13 14:46:57 +0100
committertmk <nobody@nowhere>2011-01-13 14:46:57 +0100
commit06db39583fe87a8d13c0c345887b71a577198049 (patch)
treeab0b5d0c879f9c0faa8e8380e6ddd19ee3e6acaf /adb/matrix.c
parent40c24dc89ad3cbcd8bf49d305c08096f198cce95 (diff)
downloadqmk_firmware-06db39583fe87a8d13c0c345887b71a577198049.tar.gz
qmk_firmware-06db39583fe87a8d13c0c345887b71a577198049.tar.xz
ADB keyboard LEDs support
Diffstat (limited to 'adb/matrix.c')
-rw-r--r--adb/matrix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/adb/matrix.c b/adb/matrix.c
index ca8858d0b..550506ec4 100644
--- a/adb/matrix.c
+++ b/adb/matrix.c
@@ -9,6 +9,7 @@
#include "util.h"
#include "debug.h"
#include "adb.h"
+#include "usb_keyboard.h"
#include "matrix_skel.h"
@@ -71,8 +72,13 @@ uint8_t matrix_scan(void)
uint16_t codes;
uint8_t key0, key1;
- _matrix_is_modified = false;
+ static uint8_t prev_led = 0;
+ if (prev_led != usb_keyboard_leds) {
+ adb_host_kbd_led(~usb_keyboard_leds);
+ prev_led = usb_keyboard_leds;
+ }
+ _matrix_is_modified = false;
codes = adb_host_kbd_recv();
key0 = codes>>8;
key1 = codes&0xFF;