summaryrefslogtreecommitdiffstats
path: root/app/tims_keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/tims_keyboard.c')
-rw-r--r--app/tims_keyboard.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/app/tims_keyboard.c b/app/tims_keyboard.c
index c3c947b..4897c4d 100644
--- a/app/tims_keyboard.c
+++ b/app/tims_keyboard.c
@@ -27,19 +27,33 @@ main (void)
nvic_set_priority (NVIC_EXTI0_IRQ, 0xc0);
usart_init ();
-
ticker_init ();
#ifdef DEBUG
- printf ("Hello world!\r\n");
+ printf ("USART and ticker started\r\n");
+#endif
+
+ usb_init ();
+
+#ifdef DEBUG
+ printf ("USB started\r\n");
#endif
atkbd_init ();
- usb_init ();
+#ifdef DEBUG
+ printf ("ATKBD i/f started\r\n");
+#endif
+ while (ticks < AT_KBD_INIT_TIME)
+ usb_poll ();
- usb_run ();
+ atkbd_start ();
+#ifdef DEBUG
+ printf ("Keyboard started\r\n");
+#endif
+
+ usb_run ();
return 0;
}