summaryrefslogtreecommitdiff
path: root/src/class/video
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-10-24 13:11:21 +0700
committerhathach <[email protected]>2021-10-24 13:11:21 +0700
commit5af989384bd95dbf16f824bcc48e56f3ea283080 (patch)
tree6bf7c17387612edfb8ea1bd010472db291addc32 /src/class/video
parent6f5b197a98545c70efeeb4adcad0d41a3d30a57c (diff)
remove ep descriptor wMaxPacketSize bitfield due to endian issue
Diffstat (limited to 'src/class/video')
-rw-r--r--src/class/video/video_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c
index d9bd44f61..eeb068197 100644
--- a/src/class/video/video_device.c
+++ b/src/class/video/video_device.c
@@ -582,11 +582,11 @@ static bool _open_vs_itf(uint8_t rhport, videod_streaming_interface_t *stm, uint
TU_ASSERT(cur < end);
tusb_desc_endpoint_t const *ep = (tusb_desc_endpoint_t const*)cur;
if (!stm->max_payload_transfer_size) {
- video_probe_and_commit_control_t const *param =
- (video_probe_and_commit_control_t const*)&stm->ep_buf;
+ video_probe_and_commit_control_t const *param = (video_probe_and_commit_control_t const*)&stm->ep_buf;
uint_fast32_t max_size = param->dwMaxPayloadTransferSize;
if ((TUSB_XFER_ISOCHRONOUS == ep->bmAttributes.xfer) &&
- (ep->wMaxPacketSize.size < max_size)) {
+ (tu_edpt_packet_size(ep) < max_size))
+ {
/* FS must be less than or equal to max packet size */
return false;
}