uint8_t Printer_GetDeviceID(char* DeviceIDString, uint16_t BufferSize)\r
{\r
uint8_t ErrorCode = HOST_SENDCONTROL_Successful;\r
- uint16_t DeviceIDStringLength;\r
+ uint16_t DeviceIDStringLength = 0;\r
\r
USB_ControlRequest = (USB_Request_Header_t)\r
{\r
\r
if ((ErrorCode = USB_Host_SendControlRequest(&DeviceIDStringLength)) != HOST_SENDCONTROL_Successful)\r
return ErrorCode;\r
+ \r
+ if (!(DeviceIDStringLength))\r
+ {\r
+ DeviceIDString[0] = 0x00;\r
+ return HOST_SENDCONTROL_Successful;\r
+ }\r
\r
DeviceIDStringLength = SwapEndian_16(DeviceIDStringLength);\r
\r
*/\r
typedef struct\r
{\r
- uint8_t ReponseCode;\r
+ uint8_t ResponseCode;\r
\r
uint8_t SegmentNumber;\r
\r
* \section Sec_ChangeLogXXXXXX Version XXXXXX\r
*\r
* <b>New:</b>\r
+ *\r
+ * <b>Changed:</b>\r
+ *\r
+ * <b>Fixed:</b>\r
+ * - Fixed PrinterHost demo returning invalid Device ID data when the attached device does not have a\r
+ * device ID (thanks to Andrei Krainev)\r
+ *\r
+ * \section Sec_ChangeLog090924 Version 090924\r
+ *\r
+ * <b>New:</b>\r
* - Added new host mode class drivers and matching demos to the library for rapid application development\r
* - Added flag to the HID report parser to indicate if a device has multiple reports\r
* - Added new EVENT_USB_Device_StartOfFrame() event, controlled by the new USB_Device_EnableSOFEvents() and\r
* or post your suggestion as an enhancement request to the project bug tracker.\r
*\r
* <b>Targeted for This Release (SVN Development Only):</b>\r
- * - N/A\r
+ * - Add hub support to match Atmel's stack\r
+ * - Add ability to get number of bytes not written with pipe/endpoint write routines after an error\r
*\r
* <b>Targeted for Future Releases:</b>\r
- * - Add hub support to match Atmel's stack\r
* - Add standardized descriptor names to device and host class driver structures\r
* - Remake AVRStudio project files\r
* - Add detailed overviews of how each demo works\r
*\r
* \section Sec_MigrationXXXXXX Migrating from 090810 to XXXXXX\r
*\r
+ * \section Sec_Migration090924 Migrating from 090810 to 090924\r
+ *\r
* <b>Non-USB Library Components</b>\r
* - The ADC_Off() function has been renamed to \ref ADC_ShutDown() to be consistent with the rest of the library.\r
* - The \ref SPI_Init() routine's parameters have changed, so that the clock polarity and data sampling modes can be set. See\r