summaryrefslogtreecommitdiff
path: root/tinyusb/host/usbh.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-26 14:18:14 +0700
committerhathach <[email protected]>2013-03-26 14:18:14 +0700
commit0b08dc7724a67f09be16fad3d6702ce0d7566f03 (patch)
tree6d85e58aa927593195632faca86b27a49071b27c /tinyusb/host/usbh.c
parent205a21ff045087214afebd593134ed325138e6fd (diff)
fix bug with enum task skipping decriptor
Diffstat (limited to 'tinyusb/host/usbh.c')
-rw-r--r--tinyusb/host/usbh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 67ad72ac0..7deb68bb3 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -408,7 +408,7 @@ OSAL_TASK_DECLARE(usbh_enumeration_task)
// TODO check class_open_subtask status
if (length == 0) // Interface open failed, for example a subclass is not supported
{
- p_desc += p_desc[DESCRIPTOR_OFFSET_TYPE]; // skip this interface, the rest will be skipped by the above loop
+ p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH]; // skip this interface, the rest will be skipped by the above loop
// TODO can optimize the length --> open_subtask return a OPEN FAILED status
}else
{
@@ -417,7 +417,7 @@ OSAL_TASK_DECLARE(usbh_enumeration_task)
}
} else // unsupported class (not enable or yet implemented)
{
- p_desc += p_desc[DESCRIPTOR_OFFSET_TYPE]; // skip this interface, the rest will be skipped by the above loop
+ p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH]; // skip this interface, the rest will be skipped by the above loop
}
}
}