Skip to content

Commit d6ba924

Browse files
author
Josuah Demangeon
committed
usb: uvc: prepare the header to be used for both host and device
When USB device is not defined, there is no macro for the maximum number of dwFrameInterval[] defined, so default to 1 instead of CONFIG_USBD_VIDEO_MAX_FRMIVAL. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent e57477d commit d6ba924

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/zephyr/usb/class/usb_uvc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,11 @@ struct uvc_frame_discrete_descriptor {
422422
uint32_t dwMaxVideoFrameBufferSize;
423423
uint32_t dwDefaultFrameInterval;
424424
uint8_t bFrameIntervalType;
425+
#ifdef CONFIG_USBD_VIDEO_MAX_FRMIVAL
425426
uint32_t dwFrameInterval[CONFIG_USBD_VIDEO_MAX_FRMIVAL];
427+
#else
428+
uint32_t dwFrameInterval[1];
429+
#endif
426430
} __packed;
427431

428432
struct uvc_color_descriptor {

0 commit comments

Comments
 (0)