aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/ClassDriver/CDCHost/CDCHost.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/ClassDriver/CDCHost/CDCHost.c')
-rw-r--r--Demos/Host/ClassDriver/CDCHost/CDCHost.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
index 7aa8deeee..4f67f3fbe 100644
--- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c
+++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
@@ -72,9 +72,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);