From c88477f285ae9206846cf02b14337dd0837fee2e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 Jun 2015 11:12:28 +0100 Subject: initialize the keyboard after usb comes up so we can reply to usb quickly --- app/tims_keyboard.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'app/tims_keyboard.c') diff --git a/app/tims_keyboard.c b/app/tims_keyboard.c index 4897c4d..b67e46a 100644 --- a/app/tims_keyboard.c +++ b/app/tims_keyboard.c @@ -26,33 +26,12 @@ main (void) nvic_set_priority (NVIC_SYSTICK_IRQ, 0x80); nvic_set_priority (NVIC_EXTI0_IRQ, 0xc0); - usart_init (); - ticker_init (); - -#ifdef DEBUG - printf ("USART and ticker started\r\n"); -#endif + atkbd_init(); usb_init (); -#ifdef DEBUG - printf ("USB started\r\n"); -#endif - - atkbd_init (); - -#ifdef DEBUG - printf ("ATKBD i/f started\r\n"); -#endif - - while (ticks < AT_KBD_INIT_TIME) - usb_poll (); - - atkbd_start (); - -#ifdef DEBUG - printf ("Keyboard started\r\n"); -#endif + usart_init (); + ticker_init (); usb_run (); return 0; -- cgit v1.2.3