请 登录 后使用快捷导航
没有帐号?注册
发表于2008-9-29 21:47
使用libusb操作usb的问题
[复制链接]
本人有一个usb,有驱动,但是不能加载到系统.我用libusb操作它,但是写的时候和读的时候总是出现Resource temporarily unavailable.
write ret =4,Resource temporarily unavailable//写入1234
usb_interrupt_read=-110,Resource temporarily unavailable,
write ret =0,Success
usb_interrupt_read=4,Resource temporarily unavailable,1234//读出1234
write ret =4,Resource temporarily unavailable
usb_interrupt_read=-110,Resource temporarily unavailable,1234
write ret =0,Success
usb_interrupt_read=4,Resource temporarily unavailable,1234
//----------------------------------------------------//
设备描述文件如下:
Bus 001 Device 002: ID 04b5:0320 ROHM LSI Systems USA, LLC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x04b5 ROHM LSI Systems USA, LLC
idProduct 0x0320
bcdDevice 3.00
iManufacturer 1 CPU.DOG
iProduct 2 USB HID Security Key
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 38
Report Descriptor: (length is 38)
Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
(null)
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x46 ] 70
Vector
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Count, data= [ 0x04 ] 4
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Usage Page, data= [ 0x08 ] 8
LEDs
Item(Local ): Usage, data= [ 0x2d ] 45
Ready
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Count, data= [ 0x07 ] 7
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Main ): Output, data= [ 0x00 ] 0
Data Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0004 bytes 4 once
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0008 bytes 8 once
bInterval 10
Language IDs: (length=4)
0409 English(US)
发表于2008-10-3 19:02
真的给钱. 不是骗人.现在很需要帮助
最后登录2018-8-14
在线时间1 小时
威望0分
芯积分E金币好友
发表于2008-10-4 09:33
一个问题问了这么久没有人回答,真的郁闷!eeworld也就这样嘛
您需要登录后才可以回帖 登录 | 注册
发表回复
回帖后跳转到最后一页
【活动时间】即日起—5月25日
【礼品设置】
幸运礼:50元京东卡20份、30元京东卡20份
分享礼:30元京东卡5份、20元京东卡5份
【直播时间】5月19日上午10:00-11:30
【礼品设置】
预约礼:100元京东卡5份、50元京东卡19份;
提问礼:50元京东卡5份、30元京东卡10份
【活动好礼】商务背包、保温杯、小米65W氮化镓适配器、米家转换器、温湿度计
【主题展区】两轮智慧出行、智能驾驶、人工智能、智能驾驶、中大功率电源转换、电感
【活动时间】即日起——6月19日
【活动好礼】华为 Mate40 Pro、Apple iPad Air、Apple iWatch SE、500元京东卡、100元京东卡、安富利100周年限量版转换器、数据线、50元京东卡
浏览活动页面,储备工业大机器健康知识!
将从答对3道题及以上的网友中抽取幸运者,随机派送下方奖品!
3份小米小爱触屏音箱、10份米家声波电动牙刷、20张30元京东卡、50本《新概念模拟电路3》
在本次直播中,PI将为您带来集成额定电压900V的初级MOSFET的三个开关IC系列,可满足工业和公用事业计量的电源需求:LinkSwitch-TN2 IC可以为简单的降压拓扑设计提供电源解决方案;LinkSwitch-XT2 IC面向的是物料清单(BOM)比较简单的小功耗反激式电源;InnoSwitch3-EP IC则支持更大功率的应用。
介绍民用超声波水表计量原理及开发超声波水表过程中需要进行的测试。主要包括初始配置,零漂测试,温漂测试,瞬时流量测试和校准测试等。
更有好礼等着你!
从前期调研,制定课题,整理需求,拓扑选型,原理图和PCB绘制,电源仿真,焊接制作,测试调试...像完成一个项目一样,电源达人带你一步一步完成“高效率双向DCDC变换器”制作
关闭
站长推荐 1/8
电子工程世界版权所有
京ICP证060456号
Copyright © 2005-2021 EEWORLD.com.cn, Inc. All rights reserved