X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fusb_usb%2Fmain.cpp;h=76e88922cb41205243ce78da89263033ca48cc0b;hb=06e3f8485612e5f7e46711530a63312c5f62a80b;hp=5b542a75c10c055055bb19556bc153761f7053f8;hpb=338744ba2fdfdcd07824f325a8112e041d6cd0a5;p=max%2Ftmk_keyboard.git diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp index 5b542a75..76e88922 100644 --- a/converter/usb_usb/main.cpp +++ b/converter/usb_usb/main.cpp @@ -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");