Browse Source

V-USB: Fix initial dropped keypress (#11263)

Ryan 4 năm trước cách đây
mục cha
commit
78b2f120e5
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 3
      tmk_core/protocol/vusb/main.c

+ 2 - 3
tmk_core/protocol/vusb/main.c

@@ -98,14 +98,13 @@ int main(void) {
     clock_prescale_set(clock_div_1);
 #endif
     keyboard_setup();
-
-    host_set_driver(vusb_driver());
     setup_usb();
     sei();
+    keyboard_init();
+    host_set_driver(vusb_driver());
 
     wait_ms(50);
 
-    keyboard_init();
 #ifdef SLEEP_LED_ENABLE
     sleep_led_init();
 #endif