各位高手:
我现在在做一个USB的读卡器,因读卡器上有三个插糟,想三个插糟对应在主机上显示出三个设备,请问该如何配置,现在只能显示一个设备,
{
0x12, /* bLength */
0x01, /* bDescriptorType */
0x01, /* bcdUSB, version 2.00 */
0x10,
0x00, /* bDeviceClass : each interface define the device class */
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
0x40, /* bMaxPacketSize0 0x40 = 64 */
0x3C, /* idVendor */
0x16,
0x03, /* idProduct */
0x0A, //W5181 Reader
0x00, /* bcdDevice 1.00*/
0x01,
1, /* index of string Manufacturer */
/**/
2, /* index of string descriptor of product*/
/* */
3, /* */
/* */
/* */
0x01 /*bNumConfigurations */
}
{
0x09, /* bLength: Configuation Descriptor size */
0x02, /* bDescriptorType: Configuration */
0x5D,
0x00,
0x01, /* bNumInterfaces: 1 interface */
0x01, /* bConfigurationValue: */
/* Configuration value */
0x00, /* iConfiguration: */
/* Index of string descriptor */
/* describing the configuration */
0x80,
0x46, // 140=70*2 mA power consumption.
/******************** Descriptor of Mass Storage interface ********************/
/* 09 */
0x09, /* bLength: Interface Descriptor size */
0x04, /* bDescriptorType: */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
// 0x02, /* bNumEndpoints*/
0x03, //by lmp BUIK_OUT Endpoint,BUIK_IN Endpoint, Interrupt_IN Endpoint
0x0B, //by LMP bInterfaceClass: Smart Card Device Class
0x00, /* bInterfaceSubClass : without SubClass*/
0x00, // bInterfaceProtocol: CCID
0x00, // iInterface: Index of string descriptor
/* 18 */
//CCID class descriptor
0x36, // bLength: CCID Descriptor size 54Bytes
0x21, // bDescriptorType
0x10,0x01, // bcdCCID: CCID Class Spec release number (1.1)
0x02, // bMaxSlotIndex Sim_card,Contactless_Card ,Non-contact card
0x06, // bVoltageSupport: 5v,3v,1.8v only support Contactless_Card
0x03,0x00,0x00,0x00, // dwProtocols: supports T=0
0xFC,0x0D,0x00,0x00, // dwDefaultClock: 3.58Mhz
0xF0,0x37,0x00,0x00, // dwMaximumClock: 14.32Mhz
0x00, // bNumClockSupported => no manual setting
0x80,0x25,0x00,0x00, // dwDataRate: 9600 bps (0x00002580)
0x29,0x40,0x29,0x00, // dwMaxDataRate: 344105 bps (0x00054029)
0x00, // bNumDataRatesSupported => no manual setting
0xFc,0x00,0x00,0x00, // dwMaxIFSD: 255 (T=1 ) Information Field Size For The Terminal
0x00,0x00,0x00,0x00, // dwSynchProtocols
0x00,0x00,0x00,0x00, // dwMechanical: no special characteristics
0xBA,0x00,0x01,0x00, // dwFeatures:TPDU Level
0x0F,0x01,0x00,0x00, // dwMaxCCIDMessageLength 10+261 : header+Maximun block size
0xFF, // bClassGetResponse
0xFF, // bClassEnvelope
0x00,0x00, // wLcdLayout
0x00, // bPINSupport : no PIN verif and modif
0x03, // bMaxCCIDBusySlots
/* 0x49 73 */
0x07, /*Endpoint descriptor length = 7*/
0x05, /*Endpoint descriptor type */
0x81, /*Endpoint address (IN, address 1) */
0x02, /*Bulk endpoint type */
0x40, /*Maximum packet size (64 bytes) */
0x00,
0x00, /*Polling interval in milliseconds */
// /* 25 */
/* 0x50 80*/
0x07, /*Endpoint descriptor length = 7 */
0x05, /*Endpoint descriptor type */
0x02, /*Endpoint address (OUT, address 2) */
0x02, /*Bulk endpoint type */
0x40, /*Maximum packet size (64 bytes) */
0x00,
0x00, /*Polling interval in milliseconds*/
0x07, /*Endpoint descriptor length = 7 */
0x05, /*Endpoint descriptor type */
0x83, /*Endpoint address (IN, address 3) */
0x03, /*Bulk endpoint type Interrupt */
0x04, /*Maximum packet size (4 bytes) */
0x00,
0x20, /*Polling interval in milliseconds*/
/*32*/
};
郁闷了好几天了.一直没解决,请高手指点迷津!谢谢啦 |
|