X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/99145a8d7c88d9af065cfb7f5e8507d5b65ff811..14c5615474b46716d69141ed459c5aa2af3bd65d:/Bootloaders/CDC/BootloaderCDC.c diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c index 54c7b7e49..0add977ce 100644 --- a/Bootloaders/CDC/BootloaderCDC.c +++ b/Bootloaders/CDC/BootloaderCDC.c @@ -71,8 +71,8 @@ int main(void) MCUSR &= ~(1 << WDRF); wdt_disable(); - /* Disable Clock Division */ - SetSystemClockPrescaler(0); + /* Disable clock division */ + clock_prescale_set(clock_div_1); /* Relocate the interrupt vector table to the bootloader section */ MCUCR = (1 << IVCE); @@ -167,6 +167,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) Endpoint_ClearSetupIN(); + /* Acknowledge status stage */ while (!(Endpoint_IsSetupOUTReceived())); Endpoint_ClearSetupOUT(); } @@ -184,6 +185,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) Endpoint_ClearSetupOUT(); + /* Acknowledge status stage */ while (!(Endpoint_IsSetupINReady())); Endpoint_ClearSetupIN(); } @@ -194,6 +196,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) { Endpoint_ClearSetupReceived(); + /* Acknowledge status stage */ while (!(Endpoint_IsSetupINReady())); Endpoint_ClearSetupIN(); }