projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed NO_CLEARSET_FEATURE_REQUEST compile time token to NO_FEATURELESS_CONTROL_ONLY...
[pub/USBasp.git]
/
Demos
/
MouseFullInt
/
MouseFullInt.c
diff --git
a/Demos/MouseFullInt/MouseFullInt.c
b/Demos/MouseFullInt/MouseFullInt.c
index
28267a1
..
7e69d81
100644
(file)
--- a/
Demos/MouseFullInt/MouseFullInt.c
+++ b/
Demos/MouseFullInt/MouseFullInt.c
@@
-69,8
+69,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
Joystick_Init();
\r
\r
/* Hardware Initialization */
\r
Joystick_Init();
\r
@@
-200,6
+200,10
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
+
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupOUTReceived()));
\r
+ Endpoint_ClearSetupOUT();
\r
}
\r
\r
break;
\r
}
\r
\r
break;
\r
@@
-214,7
+218,8
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */
\r
UsingReportProtocol = (wValue != 0x0000);
\r
\r
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */
\r
UsingReportProtocol = (wValue != 0x0000);
\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
@@
-230,7
+235,8
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
/* Get idle period in MSB */
\r
IdleCount = (wValue >> 8);
\r
\r
/* Get idle period in MSB */
\r
IdleCount = (wValue >> 8);
\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
@@
-245,6
+251,10
@@
EVENT_HANDLER(USB_UnhandledControlPacket)
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
\r
/* Send the flag to the host */
\r
Endpoint_ClearSetupIN();
\r
+
\r
+ /* Acknowledge status stage */
\r
+ while (!(Endpoint_IsSetupOUTReceived()));
\r
+ Endpoint_ClearSetupOUT();
\r
}
\r
\r
break;
\r
}
\r
\r
break;
\r