我正在尝试通过 LPC1769 微 Controller 中的批量传输实现 USB 供应商特定类。 我有一个 USB 生物识别模块,提取了它的设备信息。因此,我配置了以下描述符。
const uint8_t USB_DeviceDescriptor[]={};
const uint8_t USB_ConfigDescriptor[]={};
const uint8_t USB_StringDescriptor[]={};
现在我的 USB 生物识别设备和我的 LPC1769 设备具有相似类型的设备信息 (我在我的 Ubuntu PC 上使用这个命令“lsusb -v”看到了它) 但是,当我将它插入 Windows 时,它应该进入设备管理器中的 USB 类(Trident 符号列表)。 USB 生物识别设备列在“通用串行总线 Controller ”下。
我找不到任何文件、流程图 谁能指导我如何在供应商特定类别中建立沟通。
USB生物识别设备信息
Bus 003 Device 023: ID 16d1:0407
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x16d1
idProduct 0x0407
bcdDevice 0.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 300mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
我的 LPC1769 USB 设备信息
Bus 003 Device 018: ID 1fc9:2002 NXP Semiconductors
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1fc9 NXP Semiconductors
idProduct 0x2002
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
在此先感谢您。
最佳答案
bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes
LPC1769 仅支持 USB 全速,因此 Bulk EP 的 wMaxPacketSize
最大为 64 字节。只有高速设备支持 512 字节的批量 EP。
要操作“供应商特定”类 USB 设备,您可以使用特定的内核驱动程序或 LibUSB/WinUSB 作为驱动程序与用户模式应用程序一起使用。
关于c - LPC1769 微 Controller 中批量传输的 USB 供应商特定类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31858239/