Cypress技术论坛
直播中

刘佳

7年用户 142经验值
私信 关注
[问答]

FX2的多个配置描述符

我想使用多个配置描述符。其中一个会有DirectSound接口(和界面不会从柏树驱动器接收数据),其他的就没有接口,而Cypress司机会提供DirectSound会使用定义的接口供应商数据。
我已经添加了额外的配置描述符(及相关的接口和端点描述符)来dscr.a51。我也改setupcommand(void),sc_get_descriptor / gd_configuration(andgd_other_speed_configuration)将返回正确的描述符。我也修改了ISR的特性和高速使他们正确处理开关配置类型来otherspeed_dscr config_dscr。
如果imanully输入得到DirectSound描述符的命令,我回到正确的描述符。然而,当我送命令设置thedirectsounddescriptor,什么也没有发生;我不看DirectSound设备没有数据流thefx2。
当我在thecyconsole或u***controlcenter,我看到两个配置,但他们都是“配置1”。我知道我的DirectSound配置描述符设置正确的回忆,得到广义工作正常,并显示配置2。
我是否需要连接的USB使用u***cs为了新的DirectSound描述符配置可看吗?为什么不能thecontrolcenter或控制台看到其他配置描述符?

以上来自于百度翻译


     以下为原文
  I would like to use multiple configuration descriptors.  One of them would have a DirectSound interface (and that interface would not receive data from the Cypress driver), the other would not have that interface and instead the Cypress driver would provide the data that DirectSound would have using the vendor-defined interface.
    I have added the extra configuration descriptor (and associated interface/endpoint descriptors) to dscr.a51.  I also modified SetupCommand(void) so that SC_GET_DESCRIPTOR / GD_CONFIGURATION (and GD_OTHER_SPEED_CONFIGURATION) will return the correct descriptors.  I also modified the ISR's Ures and Highspeed so that they correctly handle switching the configuration types from CONFIG_DSCR to OTHERSPEED_DSCR.
    If I manully enter the commands for getting the DirectSound descriptor, I get back the correct descriptor.  However, when I send the command for setting the DirectSound descriptor, nothing happens; I don't see a DirectSound device and no data flows to the FX2.
    When I look in the CyConsole or the USB Control Center, I can see two configurations, but they're both "configuration 1".  I know that my DirectSound config descriptor is set correctly - recall that get descriptor works fine, and shows configuration 2.
    Do I need to disconnect and reconnect from the USB using USBCS in order for the new DirectSound configuration descriptor to be seen?  Why can't the Control Center or Console see the other configuration descriptor?

回帖(3)

傅姁妮

2019-4-19 09:34:52
你好,
CY[压USB设备驱动程序,CysB.SIS,和我们的库目前不支持多种配置。它现在只支持一个配置。
当做,
加亚特里

以上来自于百度翻译


     以下为原文
   Hi,
     
    Cy[press U*** device driver, CyUSB.sys, and our libraries currently doesn't support multiple configurations. It supports only one configuration as of now.  
     
    Regards,
    Gayathri
举报

刘佳

2019-4-19 09:47:32
你好,Gayathri,谢谢你提供的信息。快速谷歌表明WiUSB也有一个配置限制。
是否有可能通过做“重新计算”来“伪造”多个配置?例如,我的描述符将报告我只有一个配置,但是我的软件将知道有两个配置。因此,它将发出一个卖主命令,它将强制与UBCS=0x80断开连接;等待三秒;更改我为枚举报告的配置描述符;然后重新连接到USBC&= ~0x80。
我想这会实现我的目标,但是我很想听听你是否有其他的建议。

以上来自于百度翻译


     以下为原文
  Hi Gayathri, thanks for the information.  A quick google suggests thatWinUSB also has a one-configuration limitation.
     
    Would it be possible to "fake" multiple configurations by doing what amounts to Re-Numeration?  For example, my descriptors will report that I only have one configuration, but my software will know that I secretly have two configurations.  So it will issue a vendor command which would force a disconnect with USBCS |= 0x80; wait three seconds; change which configuration descriptor I report for enumeration; and then reconnect with USBCS &= ~0x80.
     
    I think that will accomplish my goal, but I would be interested to hear if you have any other suggestions.
举报

何柳青

2019-4-19 10:02:48
嗨,安得烈,
当您说两种配置时,它们都实现2个单独的类,或者它们都是供应商专用类。CysUBSIS将只传递描述符而不考虑它包含的内容。归结到能够设置配置的问题(我记得Windows低级别驱动程序不允许我们这样做)。我查一下然后再给你答复。
当做,
阿南德

以上来自于百度翻译


     以下为原文
  Hi Andrew,
    When you say two configuration are they both implementing 2 separate classes or are they both vendor specific class. CyUSB.sys will just pass up the descriptor irrespective of what it contains. It comes down to the matter of being able to set configuration (I remember windows low level drivers not letting us do that). I'll check on that and get back to you.
    Regards,
    Anand
举报

更多回帖

发帖
×
20
完善资料,
赚取积分