ADB keyboard LEDs support
This commit is contained in:
parent
40c24dc89a
commit
06db39583f
5 changed files with 60 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue