完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
谁能举一个例子,说明如何在扩展单元描述符上定义 31 个以上的控件?
我相信这需要第二个扩展单元。 我尝试通过以下方式添加它,但它没有奏效。 /* Processing Unit Descriptor */ 0x0D, /* Descriptor size */ CX3_CS_INTRFC_DESCR, /* Class specific interface desc type */ 0x05, /* Processing Unit Descriptor type: VC_PROCESSING_UNIT*/ 0x02, /* ID of this unit */ 0x01, /* Source ID: 1: Connected to input terminal */ 0x00, 0x40, /* Digital multiplier */ 0x03, /* Size of controls field for this terminal: 3 bytes */ /* A bit set to 1 indicates that the mentioned */ /* Control is supported for the video stream. */ 0b0111'1111, /* D0: Brightness * D1: Contrast * D2: Hue * D3: Saturation * D4: Sharpness * D5: Gamma * D6: White Balance Temperature * D7: White Balance Component */ 0b0001'0011, /* D8: Backlight Compensation * D9: Gain * D10: Power Line Frequency * D11: Hue, Auto * D12: White Balance Temperature, Auto * D13: White Balance Component, Auto * D14: Digital Multiplier * D15: Digital Multiplier Limit */ 0b0000'0000, /* D16: Analog Video Standard * D17: Analog Video Lock Status * D18..(n*8-1): Reserved. Set to zero */ 0x00, /* String desc index: Not used */ 0x00, /* Analog Video Standards Supported: None */ /* Extension Unit Descriptor */ //0x1C, /* Descriptor size */ 0x1D, /* Descriptor size (4 control bytes) */ CX3_CS_INTRFC_DESCR, /* Class specific interface desc type */ 0x06, /* Extension Unit Descriptor type */ 0x03, /* ID of this terminal */ 0x0C, 0x89, 0xB6, 0xAC, /* GUID specific to AN75779 firmware. Obtained from Visual studio */ 0xB3, 0xA3, 0x60, 0x40, /* static const GUID <> = */ 0x8B, 0x9A, 0xDF, 0x34, /* { 0xacb6890c, 0xa3b3, 0x4060,{0x8b, 0x9a, 0xdf, 0x34, 0xee, 0xf3, 0x9a, 0x2e} };*/ 0xEE, 0xF3, 0x9A, 0x2E, //0x01, /* Number of controls in this terminal */ //0x1F, /* Number of controls in this terminal */ 1F = 31 0x01, /* Number of input pins in this terminal */ 0x02, /* Source ID : 2 : Connected to Proc Unit */ //0x03, /* Size of controls field for this terminal : 3 bytes */ 0x04, /* Size of controls field for this terminal : 4 bytes */ 0b1111'1111, /* Controls supported */ 0b1111'1111, /* Controls supported */ 0b1111'1111, /* Controls supported */ 0b0111'1111, /* Controls supported */ 0x00, /* String descriptor index : Not used */#if true /* 2nd Extension Unit Descriptor */ 0x1C, /* Descriptor size 28 bytes*/ CX3_CS_INTRFC_DESCR, /* Class specific interface desc type */ 0x06, /* Extension Unit Descriptor type */ 0x04, /* ID of this terminal */ 0xAF, 0x80, 0x74, 0x32, /* GUID specific to AN75779 firmware. Obtained from Visual studio */ 0x25, 0x17, 0x49, 0x27, /* static const GUID <> = */ 0x9E, 0x71, 0xAB, 0x4D, /* { 0xacb6890c, 0xa3b3, 0x4060,{0x8b, 0x9a, 0xdf, 0x34, 0xee, 0xf3, 0x9a, 0x2e} };*/ 0xD9, 0x82, 0x91, 0x95, 0x18, /* Number of controls in this terminal */ 0x01, /* Number of input pins in this terminal */ 0x03, /* Source ID : 3 : Connected to Ext. Unit */ 0x03, /* Size of controls field for this terminal : 3 bytes */ 0b1111'1111, /* Controls supported */ 0b1111'1111, /* Controls supported */ 0b1111'1111, /* Controls supported */ 0x00, /* String descriptor index : Not used */#endif /* Output Terminal Descriptor */ 0x09, /* Descriptor size */ CX3_CS_INTRFC_DESCR, /* Class specific interface desc type */ 0x03, /* Output Terminal Descriptor type */ 0x05, /* ID of this terminal */ 0x01, 0x01, /* USB Streaming terminal type */ 0x00, /* No association terminal */ 0x04, /* Source ID : 3 : Connected to Extn Unit */ 0x00, /* String desc index : Not used */ |
|
相关推荐
1个回答
|
|
了在扩展单元中使用更多数量的控件,必须相应地更新 b " numControls、bControlSi " ze "、b " mContro " ls 和 b " " l " ength 字段。 如需参考,请查看以下带有 45 个控件的扩展单元描述符。
/* 扩展单元描述符 */ 0x1F, /* blength-Descriptor 大小——当前描述符的大小为 31 (0x1F) 字节*/ 0x24,/* 类特定接口描述类型*/ 0x06,/* 扩展单元描述符类型*/ 0x03,/* 此终端的 ID */ 0xff,0xff,0xff,0xFF,0xFF,/* 填写你来自 Visual Studio 的 16 字节 GUID */ 0xff,0xff,0xff,0xFF, 0xff,0xff,0xff,0xFF, 0xff,0xff,0xff,0xFF, 0x2D,/* bnumControls-此终端中的控件数量-如果 45-0x2D */ 0x01,/* 此端子中输入引脚的数量*/ 0x02,/* 来源 ID:2:已连接到 Proc Unit */ 0x06, /* bControlSize-此终端的控件字段大小:6 字节 */ /* (45/8 = 5.625) — > 所以,需要 6 个字节才能容纳 45 个控件 */ 0x00,@@ 0x00,0x00,0x00,0x00,0x00,0x00 /* bmControls-如果不支持控件,则全部为零*/ 0x00,/* 字符串描述索引:未使用*/ #endif |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
2390 浏览 1 评论
摩尔斯微电子推出社区论坛与开源GitHub资源库,新资源的上线将加速全球工程师与开发者的Wi-Fi开发进程
1433 浏览 0 评论
8974 浏览 1 评论
9537 浏览 0 评论
32470 浏览 3 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 14:07 , Processed in 0.480361 second(s), Total 42, Slave 35 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号