打印

HID 设备 Readfile 失败 问题

[复制链接]
2540|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
lxb_gd|  楼主 | 2010-8-2 13:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
自制 HID设备,report ID 17 为 Output , Report ID 18 为 Input. endpoint 1 为中断输入和输出。
Writefile 没问题, 能收到 report ID 17的数据包,然后发回Report ID 18给计算机,
但Readfile就返回0. Bushound能看到数据,单片机确实有发数据包。

Result = ReadFile
  (ReadHandle,
  InputReport,
  65,
  &NumberOfBytesRead,
  (LPOVERLAPPED) &HIDOverlapped);

Result = WriteFile
  (DeviceHandle,
  OutputReport,
  65,
  &BytesWritten,
  NULL);

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:Dino

15

主题

36

帖子

1

粉丝