本人小白,使用libusb时,libusb_bulk_transfer返回一直是-5,即/** Entity not found */

sinat_26315741 2018-08-31 09:59:40
endpoint_num = bEndpointAddress & 0x07;
state = libusb_set_configuration(handle, bConfigurationValue);
std::cout << state << std::endl;
state = libusb_claim_interface(handle, 0);
std::cout << state << std::endl;
unsigned char data[1024] = {0};
int length = 0;
while (length == 0)
int s = libusb_bulk_transfer(handle, endpoint_num, data, wMaxPacketSize, &length, 50000);
std::cout << data << std::endl;

除了这个函数外,其他函数都是返回成功的。
...全文
1520 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

4,165

社区成员

发帖
与我相关
我的任务
社区描述
Windows专区 一般软件使用
社区管理员
  • 一般软件使用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧