summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryjun <[email protected]>2024-06-17 22:07:08 +0800
committersakumisu <[email protected]>2024-06-17 22:24:13 +0800
commit740627cf3c38890aa2ecd93c66800bd7741b300a (patch)
tree0543b20571622ac248df029ee05b076338f99b41
parent7a26ad5082ec72864ec7a641c3b68ae8e84aa33a (diff)
update(demo/video): using endpoint desc init macro in video demo
-rw-r--r--demo/video_static_h264_template.c7
-rw-r--r--demo/video_static_mjpeg_template.c7
-rw-r--r--demo/video_static_yuyv_template.c7
3 files changed, 3 insertions, 18 deletions
diff --git a/demo/video_static_h264_template.c b/demo/video_static_h264_template.c
index a2d55ca8..05da373c 100644
--- a/demo/video_static_h264_template.c
+++ b/demo/video_static_h264_template.c
@@ -59,12 +59,7 @@ const uint8_t video_descriptor[] = {
VIDEO_VS_FRAME_H264_DESCRIPTOR_INIT(0x01, WIDTH, HEIGHT, MIN_BIT_RATE, MAX_BIT_RATE, DBVAL(INTERVAL), 0x01, DBVAL(INTERVAL)),
VIDEO_VS_DESCRIPTOR_INIT(0x01, 0x01, 0x01),
/* 1.2.2.2 Standard VideoStream Isochronous Video Data Endpoint Descriptor */
- 0x07, /* bLength */
- USB_DESCRIPTOR_TYPE_ENDPOINT, /* bDescriptorType: ENDPOINT */
- 0x81, /* bEndpointAddress: IN endpoint 2 */
- 0x01, /* bmAttributes: Isochronous transfer type. Asynchronous synchronization type. */
- WBVAL(VIDEO_PACKET_SIZE), /* wMaxPacketSize */
- 0x01, /* bInterval: One frame interval */
+ USB_ENDPOINT_DESCRIPTOR_INIT(VIDEO_IN_EP, 0x05, VIDEO_PACKET_SIZE, 0x01),
///////////////////////////////////////
/// string0 descriptor
diff --git a/demo/video_static_mjpeg_template.c b/demo/video_static_mjpeg_template.c
index 02e12c12..96c3b232 100644
--- a/demo/video_static_mjpeg_template.c
+++ b/demo/video_static_mjpeg_template.c
@@ -59,12 +59,7 @@ const uint8_t video_descriptor[] = {
VIDEO_VS_FRAME_MJPEG_DESCRIPTOR_INIT(0x01, WIDTH, HEIGHT, MIN_BIT_RATE, MAX_BIT_RATE, MAX_FRAME_SIZE, DBVAL(INTERVAL), 0x01, DBVAL(INTERVAL)),
VIDEO_VS_DESCRIPTOR_INIT(0x01, 0x01, 0x01),
/* 1.2.2.2 Standard VideoStream Isochronous Video Data Endpoint Descriptor */
- 0x07, /* bLength */
- USB_DESCRIPTOR_TYPE_ENDPOINT, /* bDescriptorType: ENDPOINT */
- 0x81, /* bEndpointAddress: IN endpoint 2 */
- 0x01, /* bmAttributes: Isochronous transfer type. Asynchronous synchronization type. */
- WBVAL(VIDEO_PACKET_SIZE), /* wMaxPacketSize */
- 0x01, /* bInterval: One frame interval */
+ USB_ENDPOINT_DESCRIPTOR_INIT(VIDEO_IN_EP, 0x05, VIDEO_PACKET_SIZE, 0x01),
///////////////////////////////////////
/// string0 descriptor
diff --git a/demo/video_static_yuyv_template.c b/demo/video_static_yuyv_template.c
index a3790089..57728480 100644
--- a/demo/video_static_yuyv_template.c
+++ b/demo/video_static_yuyv_template.c
@@ -61,12 +61,7 @@ const uint8_t video_descriptor[] = {
VIDEO_VS_COLOR_MATCHING_DESCRIPTOR_INIT(),
VIDEO_VS_DESCRIPTOR_INIT(0x01, 0x01, 0x01),
/* 1.2.2.2 Standard VideoStream Isochronous Video Data Endpoint Descriptor */
- 0x07, /* bLength */
- USB_DESCRIPTOR_TYPE_ENDPOINT, /* bDescriptorType: ENDPOINT */
- 0x81, /* bEndpointAddress: IN endpoint 2 */
- 0x01, /* bmAttributes: Isochronous transfer type. Asynchronous synchronization type. */
- WBVAL(VIDEO_PACKET_SIZE), /* wMaxPacketSize */
- 0x01, /* bInterval: One frame interval */
+ USB_ENDPOINT_DESCRIPTOR_INIT(VIDEO_IN_EP, 0x05, VIDEO_PACKET_SIZE, 0x01),
///////////////////////////////////////
/// string0 descriptor