projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added DataflashManager_WriteBlocks_RAM() and DataflashManager_ReadBlocks_RAM() functi...
[pub/USBasp.git]
/
Bootloaders
/
CDC
/
BootloaderCDC.c
diff --git
a/Bootloaders/CDC/BootloaderCDC.c
b/Bootloaders/CDC/BootloaderCDC.c
index
54c7b7e
..
0add977
100644
(file)
--- a/
Bootloaders/CDC/BootloaderCDC.c
+++ b/
Bootloaders/CDC/BootloaderCDC.c
@@
-71,8
+71,8
@@
int main(void)
MCUSR &= ~(1 << WDRF);
\r
wdt_disable();
\r
\r
MCUSR &= ~(1 << WDRF);
\r
wdt_disable();
\r
\r
- /* Disable
Clock D
ivision */
\r
-
SetSystemClockPrescaler(0
);
\r
+ /* Disable
clock d
ivision */
\r
+
clock_prescale_set(clock_div_1
);
\r
\r
/* Relocate the interrupt vector table to the bootloader section */
\r
MCUCR = (1 << IVCE);
\r
\r
/* Relocate the interrupt vector table to the bootloader section */
\r
MCUCR = (1 << IVCE);
\r
@@
-167,6
+167,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
Endpoint_ClearSetupIN();
\r
\r
\r
Endpoint_ClearSetupIN();
\r
\r
+ /* Acknowledge status stage */
\r
while (!(Endpoint_IsSetupOUTReceived()));
\r
Endpoint_ClearSetupOUT();
\r
}
\r
while (!(Endpoint_IsSetupOUTReceived()));
\r
Endpoint_ClearSetupOUT();
\r
}
\r
@@
-184,6
+185,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
Endpoint_ClearSetupOUT();
\r
\r
\r
Endpoint_ClearSetupOUT();
\r
\r
+ /* Acknowledge status stage */
\r
while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
@@
-194,6
+196,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
{
\r
Endpoint_ClearSetupReceived();
\r
\r
{
\r
Endpoint_ClearSetupReceived();
\r
\r
+ /* Acknowledge status stage */
\r
while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r