为什么我的程序无法从 USB 中断端点读取数据

发布于 2024-09-28 04:42:26 字数 295 浏览 2 评论 0原文

我正在编写一个 libusb 程序来与 USB 游戏手柄交互。我找到它,打开它,与内核分离,声明接口,当我尝试 usb_interrupt_read 时,它返回 -110 (资源暂时不可用) 正在做什么?

另外,usb_set_configuration失败,所以我将其注释掉。我需要它吗?

为什么不读书了?

i = usb_interrupt_read(handle, 0x81, bytes, 8, 50);
printf("%d read\n", i);
perror("read");

I am writing a libusb program to interact with a USB gamepad. I found it, opened it, detached from kernel, claimed interface, and when I try to usb_interrupt_read it returns -110 (resource temporarily unavailable)
what is doing on?

Also, usb_set_configuration fails, so I commented it out. Do I need it?

Why isn't it reading?

i = usb_interrupt_read(handle, 0x81, bytes, 8, 50);
printf("%d read\n", i);
perror("read");

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文