完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们在我们的产品中使用了CY7C68013A USB控制器。PC软件目前正在使用第三方驱动解决方案,我们希望转换为使用CyPress套件USB 3.4.1库。目前的应用程序是用C++编写的,所以我首先尝试使用CyAPI.LIB。编制好,但是如果有一个(柏)装置(与我们的VID,PID)连接到USB端口,声明:设备=新ccyu***device(空);抛出一个异常。如果没有设备连接,它不抛出异常。于是我决定尝试一个C #溶液,并开始与控制中心的例子。再次,如果一个设备连接以下声明:USB设备=新u***devicelist(devicemask);将在输出窗口中生成一个消息:8-10类型“系统第一次异常。argumentnullexception”发生在mscorlib.dll如果没有设备连接,没有例外。我不知道下一步该去哪里,有什么建议。谢谢,Bjarne
以上来自于百度翻译 以下为原文 We are using a CY7C68013A USB controller in a couple of our product. The PC software currently is using a third party driver solution and we would like to convert to using the Cypress Suite USB 3.4.1 libraries. The application currently is written in C++ so the first go at it I was trying to use the CYAPI.lib. It compiles fine, but if there is a (Cypress) device (with our VID,PID) connected to the USB port, the statement: USBDevice = new CCyUSBDevice(NULL); throws an exception. If no device is connected, it does not throw the exception. I then decided to try a C# solution, and started with the Control Center example. Again, if a device is connected the following statement: u***Devices = new USBDeviceList(DeviceMask); will generate 8-10 messages in the output window: A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll If no device is connected, no exceptions. I am not sure where to look next, any suggestions. Thanks, Bjarne |
|
相关推荐
8个回答
|
|
您提供无效供给处理名称…我相信这就是错误背后的原因。你能上传你的整个代码吗?
以上来自于百度翻译 以下为原文 you are supplying NULL instead of supplying the handle name... I believe that is the reason behind the error here... Can you upload your entire code here... |
|
|
|
谢谢你的回复。由于某些原因,我不再在C++语句中得到异常,而且我不知道我改变了什么。帮助文件说,如果不需要PNP通知,它似乎可以与NULL或句柄一起工作。(代码现在是我的旧代码中的密码,所以发布它没有多大意义)。继续,我现在想知道如何实现PNP回调,如果在某个地方有C++例子肯定会很好。你知道为什么我会在(未修改的)控制中心C的例子中得到例外吗?我最终想移动到托管代码。
以上来自于百度翻译 以下为原文 Thank you for the reply aasi. For some reason I don't get the exception in the C++ statement anymore, and I am not sure what I changed The help file says that supplying NULL for the handle is OK, if you don't want PnP notification, and it seems to work with NULL or a handle now. (The code is presently hacks into my old code, so it would not make much sense to post it). Moving on, I am now trying to figure out how to implement the PnP callbacks, it sure would be nice if there was a C++ example somewhere. Do you know why I might get the exceptions in the (unmodified) Control Center C# example? I do eventually want to move to managed code. |
|
|
|
如果您安装了SUITeUB3.4,您可以在C:程序文件 CyPress CyPress套件USB 3.4.1CyAPAPI示例中找到C++实例。我认为尖叫的例子应该是实现PNP回调…我不知道为什么未修改的控制中心代码没有编译…我记得能够正确地编译它…当你试图编译它时,你看到了什么错误?
以上来自于百度翻译 以下为原文 If you have installed suiteu***3.4 You can find C++ examples in C:Program FilesCypressCypress Suite USB 3.4.1CyAPIexamples... I think screamer example should be implementing PnP callbacks... I'm not sure why unmodified control center code is not compiling... i remember being able to compile it properly... What error are you seeing when you try to compile it... |
|
|
|
谢谢,我只是在顶级目录中寻找例子,我应该进一步挖掘。在C #控制中心'问题',这是一个运行时异常,不是一个编译错误,当我到了执行下面的语句:在调试模式下USB设备=新u***devicelist(devicemask);将在输出窗口中生成一个消息:8-10类型“system.argumentnullexceptio第一次异常N’发生在mscorlib.dll如果没有设备连接,没有例外。
以上来自于百度翻译 以下为原文 Thank you, I was only looking in the examples directory at the top level, I should have dug further down. On the C# Control Center 'problem', it is a runtime exception, not a compile error, I get when executing the following statement in debug mode: u***Devices = new USBDeviceList(DeviceMask); will generate 8-10 messages in the output window: A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll If no device is connected, no exceptions. |
|
|
|
Dude,我试着在我的末尾复制这个问题…它对我来说很好…请问你的设备属于一个特定的类或是通用的USB…描述符表的长度是多少?
以上来自于百度翻译 以下为原文 Dude, I tried replicating the issue at my end... it works fine for me... does your device belong to a specific class or is it generic u***... What is the length of your descriptor table... |
|
|
|
有趣的是,您是否在调试模式下运行应用程序,而在VisualStudio输出窗口中没有看到此消息?应用程序工作,但我总是关注当我看到异常被抛出,我问为什么这可能是。
以上来自于百度翻译 以下为原文 Interesting, did you run the application in debug mode, and you did not see this message in the Visual Studio output window? The application works, but I am always concerned when I see exceptions being thrown, and I was asking why this might be. |
|
|
|
我没有看到这些例外…我在我的板上运行了BulkLoad示例,连接到CysB.SyS,我没有看到这些错误…由于您刚才谈到使用第三方驱动程序,我认为它可能与设备的描述符有关,因为如果描述符中存在差异,控制台必然会抛出异常。
以上来自于百度翻译 以下为原文 I didn't see these exceptions... i was running bulkloop example on my board connected to cyu***.sys and i didn't see these errors... since you are talking about using a third party driver earlier i was thinking it might have something to do with the descriptor of the device because if there is discrepancy in the descriptor the console is bound to throw exceptions.... |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
713个成员聚集在这个小组
加入小组1888 浏览 1 评论
1637 浏览 1 评论
3392 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1556 浏览 6 评论
1371 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
170浏览 2评论
170浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
304浏览 2评论
323浏览 1评论
45浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-3-28 17:50 , Processed in 0.759161 second(s), Total 82, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 深圳华秋电子有限公司
电子发烧友 (电路图) 粤公网安备 44030402000349 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号