diff options
Diffstat (limited to 'Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c')
-rw-r--r-- | Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c index c9120d596..d22e07400 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c @@ -71,9 +71,8 @@ int main(void) uint16_t ConfigDescriptorSize;
uint8_t ConfigDescriptorData[512];
- if ((USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) ||
- (ConfigDescriptorSize > sizeof(ConfigDescriptorData)) ||
- (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData)))
+ if (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
+ sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
{
printf("Error Retrieving Configuration Descriptor.\r\n");
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|