Skip to content

Commit

Permalink
support uvc bulk multiple transfer per sample
Browse files Browse the repository at this point in the history
fix espressif#360

Signed-off-by: zry98 <[email protected]>
  • Loading branch information
zry98 committed May 21, 2024
1 parent ebcc082 commit d3fa962
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/usb/usb_stream/usb_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2043,8 +2043,16 @@ IRAM_ATTR static void _uvc_process_payload(_uvc_stream_handle_t *strmh, size_t r
return;
}
} else if (strmh->reassembling) {
ESP_LOGV(TAG, "reassembling %u + %u", strmh->got_bytes, payload_len);
data_len = payload_len;
if (bulk_xfer) {
header_len = payload[0];
data_len = payload_len - header_len;
/* checking the end-of-header */
variable_offset = 2;
header_info = payload[1];
} else {
data_len = payload_len;
}
ESP_LOGV(TAG, "reassembling %u + %u", strmh->got_bytes, data_len);
} else {
if (payload_len > 1) {
#ifdef CONFIG_UVC_CHECK_HEADER_EOH
Expand Down

0 comments on commit d3fa962

Please sign in to comment.