diff options
Diffstat (limited to 'Demos/Host/ClassDriver')
-rw-r--r-- | Demos/Host/ClassDriver/CDCHost/CDCHost.c | 5 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/MouseHost/MouseHost.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c index 0cbb77122..6678b2276 100644 --- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c +++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c @@ -73,15 +73,14 @@ int main(void) uint8_t ConfigDescriptorData[512];
if ((USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) ||
- (ConfigDescriptorSize > sizeof(ConfigDescriptorData)))
+ (ConfigDescriptorSize > sizeof(ConfigDescriptorData)) ||
+ (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData)))
{
printf("Error Retrieving Configuration Descriptor.\r\n");
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
break;
}
-
- USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData);
if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,
ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index 61d7d7bb6..ec4316386 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c @@ -75,15 +75,14 @@ int main(void) uint8_t ConfigDescriptorData[512];
if ((USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful) ||
- (ConfigDescriptorSize > sizeof(ConfigDescriptorData)))
+ (ConfigDescriptorSize > sizeof(ConfigDescriptorData)) ||
+ (USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData)))
{
printf("Error Retrieving Configuration Descriptor.\r\n");
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
USB_HostState = HOST_STATE_WaitForDeviceRemoval;
break;
}
-
- USB_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData);
if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,
ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)
|