projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed incorrect/missing control status stage transfers on demos, bootloaders and...
[pub/USBasp.git]
/
Projects
/
AVRISP_Programmer
/
AVRISP_Programmer.c
diff --git
a/Projects/AVRISP_Programmer/AVRISP_Programmer.c
b/Projects/AVRISP_Programmer/AVRISP_Programmer.c
index
9ba3c0e
..
5859367
100644
(file)
--- a/
Projects/AVRISP_Programmer/AVRISP_Programmer.c
+++ b/
Projects/AVRISP_Programmer/AVRISP_Programmer.c
@@
-167,8
+167,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
/* Hardware Initialization */
\r
LEDs_Init();
\r
\r
/* Hardware Initialization */
\r
LEDs_Init();
\r
@@
-267,7
+267,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_GetLineEncoding:
\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
case REQ_GetLineEncoding:
\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
- /* Acknowedge the SETUP packet, ready for data transfer */
\r
+ /* Acknow
l
edge the SETUP packet, ready for data transfer */
\r
Endpoint_ClearSetupReceived();
\r
\r
/* Write the line coding data to the control endpoint */
\r
Endpoint_ClearSetupReceived();
\r
\r
/* Write the line coding data to the control endpoint */
\r
@@
-281,7
+281,7
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_SetLineEncoding:
\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
case REQ_SetLineEncoding:
\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
- /* Acknowedge the SETUP packet, ready for data transfer */
\r
+ /* Acknow
l
edge the SETUP packet, ready for data transfer */
\r
Endpoint_ClearSetupReceived();
\r
\r
/* Read the line coding data in from the host into the global struct */
\r
Endpoint_ClearSetupReceived();
\r
\r
/* Read the line coding data in from the host into the global struct */
\r
@@
-298,10
+298,11
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
case REQ_SetControlLineState:
\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
case REQ_SetControlLineState:
\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
\r
{
\r
- /* Acknowedge the SETUP packet, ready for data transfer */
\r
+ /* Acknow
l
edge the SETUP packet, ready for data transfer */
\r
Endpoint_ClearSetupReceived();
\r
\r
Endpoint_ClearSetupReceived();
\r
\r
- /* Send an empty packet to acknowedge the command */
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupINReady()));
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r
Endpoint_ClearSetupIN();
\r
}
\r
\r