aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/ClassDriver
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/ClassDriver')
-rw-r--r--Demos/Host/ClassDriver/CDCHost/CDCHost.c5
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c5
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.c5
-rw-r--r--Demos/Host/ClassDriver/StillImageHost/StillImageHost.c5
4 files changed, 8 insertions, 12 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);
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);
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index 9f76bc754..844fa334c 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@ -73,9 +73,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);
diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
index 2f0e5a2d1..deb8a5504 100644
--- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
+++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.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);