\r
/** Writes a report to the attached device.\r
*\r
- * \param ReportOUTData Buffer containing the report to send to the device\r
- * \param ReportIndex Index of the report in the device (zero if the device does not use multiple reports)\r
- * \param ReportType Type of report to send, either HID_REPORTTYPE_OUTPUT or HID_REPORTTYPE_FEATURE\r
- * \param ReportLength Length of the report to send\r
+ * \param[in] ReportOUTData Buffer containing the report to send to the device\r
+ * \param[in] ReportIndex Index of the report in the device (zero if the device does not use multiple reports)\r
+ * \param[in] ReportType Type of report to send, either HID_REPORTTYPE_OUTPUT or HID_REPORTTYPE_FEATURE\r
+ * \param[in] ReportLength Length of the report to send\r
*/\r
void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength)\r
{\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
\r
/* Wait until USB device disconnected */\r
- while (USB_IsConnected);\r
+ USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
break;\r
}\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
\r
/* Wait until USB device disconnected */\r
- while (USB_IsConnected);\r
+ USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
break;\r
}\r
\r