diff options
| author | YixingShen <[email protected]> | 2026-03-07 02:03:50 +0800 |
|---|---|---|
| committer | YixingShen <[email protected]> | 2026-03-07 02:03:50 +0800 |
| commit | fe26e45e64dc0c356ddba3470343244c7544b3ac (patch) | |
| tree | 73e3a0b486f76d951b9b84a32504e45d7ae14ac0 | |
| parent | 6c2c309316794ee580603db1b48422f9c648b1ad (diff) | |
fixed _open_vc_itf parsing
Standard Interface Descriptor (Video Control)
Video Control Header Descriptor
Video Control Camera Terminal Descriptor
Video Control Output Terminal Descriptor
Standard Endpoint Descriptor
Class-Specific VC Interrupt Endpoint Descriptor
Video Control Header Descriptor's wTotalLength
= Header Descriptor + Camera Terminal Descriptor + Output Terminal Descriptor
_end_of_control_descriptor is Output Terminal Descriptor End
the "end" should +7 for _find_desc searchig Standard Endpoint Descriptor
| -rw-r--r-- | src/class/video/video_device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c index b2375def9..24f31c6ad 100644 --- a/src/class/video/video_device.c +++ b/src/class/video/video_device.c @@ -771,7 +771,10 @@ static bool _open_vc_itf(uint8_t rhport, videod_interface_t *self, uint_fast8_t TU_ASSERT(vc->ctl.bInCollection <= CFG_TUD_VIDEO_STREAMING); /* Update to point the end of the video control interface descriptor. */ - end = _end_of_control_descriptor(cur); + end = _end_of_control_descriptor(cur) + 7; + //tusb_desc_video_control_header wTotalLength = + // tusb_desc_video_control_header + tusb_desc_video_control_camera_terminal_t + tusb_desc_video_control_output_terminal_t + // has no status Interrupt EP desc, then "end" should +7 for _find_desc searchig EP desc /* Advance to the next descriptor after the class-specific VC interface header descriptor. */ cur += vc->std.bLength + vc->ctl.bLength; |
