summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorkkitayam <[email protected]>2021-09-26 21:52:56 +0900
committerkkitayam <[email protected]>2021-09-29 21:23:19 +0900
commit0c89292a8dae9e5dad98a33ed3b66a4b5e796ff0 (patch)
tree8ae5504028fd8b37d90a4ef6fe5d8006cd944a61 /examples
parent319db9573c679e45a663326fbd4baa240a3da0ea (diff)
Fix transfer failure when reconnecting
Diffstat (limited to 'examples')
-rw-r--r--examples/device/video_capture/src/tusb_config.h10
-rw-r--r--examples/device/video_capture/src/usb_descriptors.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/device/video_capture/src/tusb_config.h b/examples/device/video_capture/src/tusb_config.h
index fb194c55a..06a949b1c 100644
--- a/examples/device/video_capture/src/tusb_config.h
+++ b/examples/device/video_capture/src/tusb_config.h
@@ -90,12 +90,6 @@
#define CFG_TUD_ENDPOINT0_SIZE 64
#endif
-// video streaming endpoint size
-#define CFG_TUD_VIDEO_EP_BUFSIZE 256
-
-// The number of video streaming interfaces
-#define CFG_TUD_VIDEO_STREAMING 1
-
//------------- CLASS -------------//
#define CFG_TUD_CDC 0
#define CFG_TUD_MSC 0
@@ -104,8 +98,12 @@
#define CFG_TUD_AUDIO 0
// The number of video control interfaces
#define CFG_TUD_VIDEO 1
+// The number of video streaming interfaces
+#define CFG_TUD_VIDEO_STREAMING 1
#define CFG_TUD_VENDOR 0
+// video streaming endpoint size
+#define CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE 256
//--------------------------------------------------------------------
// APPLICATION CONFIGURATION
diff --git a/examples/device/video_capture/src/usb_descriptors.c b/examples/device/video_capture/src/usb_descriptors.c
index a9fa2c043..b0e41b97e 100644
--- a/examples/device/video_capture/src/usb_descriptors.c
+++ b/examples/device/video_capture/src/usb_descriptors.c
@@ -45,7 +45,7 @@ tusb_desc_device_t const desc_device =
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
- // Use Interface Association Descriptor (IAD) for CDC
+ // Use Interface Association Descriptor (IAD) for Video
// As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
.bDeviceClass = TUSB_CLASS_MISC,
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
@@ -104,7 +104,9 @@ uint8_t const desc_fs_configuration[] =
// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0, 500),
// IAD for Video Control
- TUD_VIDEO_CAPTURE_DESCRIPTOR(4, EPNUM_VIDEO_IN, FRAME_WIDTH, FRAME_HEIGHT, FRAME_RATE, CFG_TUD_VIDEO_EP_BUFSIZE)
+ TUD_VIDEO_CAPTURE_DESCRIPTOR(4, EPNUM_VIDEO_IN,
+ FRAME_WIDTH, FRAME_HEIGHT, FRAME_RATE,
+ CFG_TUD_VIDEO_STREAMING_EP_BUFSIZE)
};
// Invoked when received GET CONFIGURATION DESCRIPTOR