aboutsummaryrefslogtreecommitdiff
path: root/protocol/vusb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/vusb/main.c')
-rw-r--r--protocol/vusb/main.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/protocol/vusb/main.c b/protocol/vusb/main.c
index 1bf9035b3..1ba40a27a 100644
--- a/protocol/vusb/main.c
+++ b/protocol/vusb/main.c
@@ -62,6 +62,11 @@ int main(void)
62 62
63 debug("initForUsbConnectivity()\n"); 63 debug("initForUsbConnectivity()\n");
64 initForUsbConnectivity(); 64 initForUsbConnectivity();
65 int i;
66 while(--i){ /* To configured */
67 usbPoll();
68 _delay_ms(1);
69 }
65 70
66 debug("main loop\n"); 71 debug("main loop\n");
67 while (1) { 72 while (1) {
@@ -90,10 +95,15 @@ int main(void)
90 } 95 }
91 } 96 }
92#endif 97#endif
93 if (!suspended) 98 if (!suspended) {
94 usbPoll(); 99 usbPoll();
95 keyboard_proc(); 100
96 if (!suspended) 101 // TODO: configuration process is incosistent. it sometime fails.
102 // To prevent failing to configure NOT scan keyboard during configuration
103 if (usbConfiguration && usbInterruptIsReady()) {
104 keyboard_proc();
105 }
97 vusb_transfer_keyboard(); 106 vusb_transfer_keyboard();
107 }
98 } 108 }
99} 109}