diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-26 09:58:43 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-26 09:58:43 +0000 |
commit | 1756087c3e1ecd21a594eaf7415c12ba1c852a32 (patch) | |
tree | af19541b036148bfe72ff42e6166802a71f11e80 /Demos/Host/LowLevel/MassStorageHost | |
parent | b2cf4d32221075c96a7487b1fc0baa2598d373fe (diff) | |
download | lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.tar.gz lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.tar.bz2 lufa-1756087c3e1ecd21a594eaf7415c12ba1c852a32.zip |
Optimize vendor/product description string display code in MassStorageHost.
Remove all Host mode class demos other than the CDCHost class driver demo, so that they can be re-added as they are made once the host mode class framework is designed.
Fixed USB_Host_SendControlRequest() not re-suspending the USB bus when initial device ready-wait fails.
Fixed USB Pad regulator not being disabled on some AVR models when the USB_OPT_REG_DISABLED option is used.
Diffstat (limited to 'Demos/Host/LowLevel/MassStorageHost')
-rw-r--r-- | Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c | 11 | ||||
-rw-r--r-- | Demos/Host/LowLevel/MassStorageHost/makefile | 2 |
2 files changed, 2 insertions, 11 deletions
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c index a1febf204..200c81ad4 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c @@ -223,18 +223,9 @@ void MassStorage_Task(void) ShowDiskReadError(PSTR("Inquiry"), (SCSICommandStatus.Status != Command_Pass), ErrorCode);
break;
}
-
- /* VendorID and ProductID are fixed-length non-null terminated strings - need to terminate them before displaying */
- char VendorID[9];
- char ProductID[17];
-
- memcpy(&VendorID, &InquiryData.VendorID, 8);
- memcpy(&ProductID, &InquiryData.ProductID, 16);
- VendorID[8] = 0x00;
- ProductID[16] = 0x00;
/* Print vendor and product names of attached device */
- printf_P(PSTR("Vendor \"%s\", Product \"%s\"\r\n"), VendorID, ProductID);
+ printf_P(PSTR("Vendor \"%.8s\", Product \"%.16s\"\r\n"), InquiryData.VendorID, InquiryData.ProductID);
/* Wait until disk ready */
puts_P(PSTR("Waiting until ready.."));
diff --git a/Demos/Host/LowLevel/MassStorageHost/makefile b/Demos/Host/LowLevel/MassStorageHost/makefile index 96d1b9ffa..74940b740 100644 --- a/Demos/Host/LowLevel/MassStorageHost/makefile +++ b/Demos/Host/LowLevel/MassStorageHost/makefile @@ -60,7 +60,7 @@ # MCU name
-MCU = at90usb1287
+MCU = at90usb647
# Target board (see library "Board Types" documentation, USER or blank for projects not requiring
|