谁用过libusb啊。。。啊、、、

hygnyf 2009-12-25 05:05:04
USB 可以打开了,usb_bulk_write也正常,可是usb_bulk_read的时候总是timeout 。

原因未知。谁用过的帮帮忙啊。

i:=usb_bulk_write(USBasp.handle,1,s,8,5000); //正常 返回8

i:=usb_bulk_read(USBasp.handle,$81, r,64, 3000) ;//返回-116 tineout



用USBview得到的USB设备信息:

Device Descriptor:
bcdUSB: 0x0100
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x1419
idProduct: 0x0130
bcdDevice: 0x0100
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x03
bNumConfigurations: 0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x01
Open Pipes: 6

Endpoint Descriptor:
bEndpointAddress: 0x81
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x01
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x82
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x02
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x83
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x03
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

...全文
124 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhenghaoxin 2010-01-03
  • 打赏
  • 举报
回复
没有用过
hygnyf 2009-12-26
  • 打赏
  • 举报
回复
控制USB,对其进行读写操作。。
huhuc 2009-12-25
  • 打赏
  • 举报
回复
这个要怎么玩?
imho888 2009-12-25
  • 打赏
  • 举报
回复
没用过,友情帮你顶

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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