From 740627cf3c38890aa2ecd93c66800bd7741b300a Mon Sep 17 00:00:00 2001 From: yjun Date: Mon, 17 Jun 2024 22:07:08 +0800 Subject: update(demo/video): using endpoint desc init macro in video demo --- demo/video_static_h264_template.c | 7 +------ demo/video_static_mjpeg_template.c | 7 +------ demo/video_static_yuyv_template.c | 7 +------ 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 -- cgit v1.3.1