]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/usb_usb/main.cpp
xt_usb: Fix scan code print for debug
[max/tmk_keyboard.git] / converter / usb_usb / main.cpp
index 5b542a75c10c055055bb19556bc153761f7053f8..76e88922cb41205243ce78da89263033ca48cc0b 100644 (file)
@@ -42,7 +42,11 @@ static void LUFA_setup(void)
     wdt_disable();
 
     /* Disable clock division */
+#if (F_CPU == 8000000)
+    clock_prescale_set(clock_div_2);    // 16MHz crystal divided by 2
+#else
     clock_prescale_set(clock_div_1);
+#endif
 
     // Leonardo needs. Without this USB device is not recognized.
     USB_Disable();
@@ -75,11 +79,13 @@ int main(void)
      */
     sei();
 
+/* Some keyboards bootup quickly and cannot be initialized with this startup wait.
     // wait for startup of sendchar routine
     while (USB_DeviceState != DEVICE_STATE_Configured) ;
     if (debug_enable) {
         _delay_ms(1000);
     }
+*/
 
     debug("init: done\n");