#include "timer.h"
#include "matrix.h"
#include "led.h"
+#include "host.h"
+#include "keyboard.h"
/* KEY CODE to Matrix
dprintf("host.Task: %d\n", timer);
}
+ static uint8_t usb_state = 0;
+ if (usb_state != usb_host.getUsbTaskState()) {
+ usb_state = usb_host.getUsbTaskState();
+ dprintf("usb_state: %02X\n", usb_state);
+
+ // restore LED state when keyboard comes up
+ if (usb_state == USB_STATE_RUNNING) {
+ dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low");
+ keyboard_set_leds(host_keyboard_leds());
+ }
+ }
return 1;
}