\r
/** Flag to indicate if the bootloader is waiting to exit. When the host requests the bootloader to exit and\r
* jump to the application address it specifies, it sends two sequential commands which must be properly\r
- * acknowedged. Upon reception of the first the RunBootloader flag is cleared and the WaitForExit flag is set,\r
+ * acknowledged. Upon reception of the first the RunBootloader flag is cleared and the WaitForExit flag is set,\r
* causing the bootloader to wait for the final exit command before shutting down.\r
*/\r
bool WaitForExit = false;\r
\r
Endpoint_ClearSetupOUT();\r
\r
- /* Send ZLP to the host to acknowedge the request */\r
+ /* Acknowledge status stage */\r
+ while (!(Endpoint_IsSetupINReady()));\r
Endpoint_ClearSetupIN();\r
\r
break;\r
\r
Endpoint_ClearSetupIN();\r
\r
- /* Send ZLP to the host to acknowedge the request */\r
+ /* Acknowledge status stage */\r
while (!(Endpoint_IsSetupOUTReceived()));\r
Endpoint_ClearSetupOUT();\r
\r
\r
Endpoint_ClearSetupIN();\r
\r
+ /* Acknowledge status stage */\r
while (!(Endpoint_IsSetupOUTReceived()));\r
Endpoint_ClearSetupOUT();\r
\r
\r
/* Reset the status value variable to the default OK status */\r
DFU_Status = OK;\r
- \r
- Endpoint_ClearSetupIN();\r
\r
+ /* Acknowledge status stage */\r
+ while (!(Endpoint_IsSetupINReady()));\r
+ Endpoint_ClearSetupIN();\r
+ \r
break;\r
case DFU_GETSTATE:\r
Endpoint_ClearSetupReceived();\r
\r
Endpoint_ClearSetupIN();\r
\r
+ /* Acknowledge status stage */\r
while (!(Endpoint_IsSetupOUTReceived()));\r
Endpoint_ClearSetupOUT();\r
\r
/* Reset the current state variable to the default idle state */\r
DFU_State = dfuIDLE;\r
\r
+ /* Acknowledge status stage */\r
+ while (!(Endpoint_IsSetupINReady()));\r
Endpoint_ClearSetupIN();\r
\r
break;\r