Fix transfer failure when reconnecting
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user