summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixingShen <[email protected]>2026-03-09 22:13:59 +0800
committerYixingShen <[email protected]>2026-03-09 22:13:59 +0800
commitce305af6534e098ee98ab2d8bc2229e2300dc2f0 (patch)
tree771aee1d412f2b9c37c011e70261e2ba5bd80215
parent3e22de0a4782d6062959aec27e5304f1b4d4a557 (diff)
revert _end_of_control_descriptor to Revision: 0a45308a296251e4376815b21f89f0038c75a60e
-rw-r--r--src/class/video/video_device.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c
index d1c699940..bbcfe45d5 100644
--- a/src/class/video/video_device.c
+++ b/src/class/video/video_device.c
@@ -399,13 +399,7 @@ static void const* _find_desc_ep(void const *beg, void const *end)
static inline void const* _end_of_control_descriptor(void const *desc)
{
tusb_desc_vc_itf_t const *vc = (tusb_desc_vc_itf_t const *)desc;
- uint8_t const *end = (uint8_t const*)desc + vc->std.bLength
- + tu_le16toh(vc->ctl.wTotalLength);
- if (vc->std.bNumEndpoints) {
- end += sizeof(tusb_desc_endpoint_t); // standard EP descriptor
- end += 5; // class-specific EP descriptor (fixed 5 bytes per UVC spec)
- }
- return end;
+ return ((uint8_t const*) desc) + vc->std.bLength + tu_le16toh(vc->ctl.wTotalLength);
}
/** Find the first entity descriptor with the entity ID