Make sure that long reads are aborted early if the connection times out while waiting...
[pub/USBasp.git] / Bootloaders / TeensyHID / TeensyHID.c
index 6cacfaf..5431a57 100644 (file)
@@ -49,6 +49,9 @@ int main(void)
        /* Setup hardware required for the bootloader */\r
        SetupHardware();\r
        \r
+       /* Enable global interrupts so that the USB stack can function */\r
+       sei();\r
+\r
        while (RunBootloader)\r
          USB_USBTask();\r
        \r
@@ -68,9 +71,6 @@ void SetupHardware(void)
        MCUSR &= ~(1 << WDRF);\r
        wdt_disable();\r
 \r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
        /* Relocate the interrupt vector table to the bootloader section */\r
        MCUCR = (1 << IVCE);\r
        MCUCR = (1 << IVSEL);\r