阅读:1323回复:4
大家快来帮帮忙!
不知到pdiusbd12的初始化过程是怎样的,应该向主机发送什么描述符???能否给举个例子,十分感谢!必当以大分回报!!!
|
|
沙发#
发布于:2002-05-30 11:43
有很多例子,自己看一下啦!
|
|
|
板凳#
发布于:2002-05-30 14:36
很多东西要靠自己找。
|
|
地板#
发布于:2002-05-30 18:39
我把我用于实现Mass storage设备类的描述符写在下面,你看看,能否对你有些帮助:
/* The data in this structure must be modified by the user for his/her particular application. */ //六万 modefied at 2002-5-9,将原标准设备描述符改为UMASS的特定类描述符类型 const USB_DEVICE_DESCRIPTOR DeviceDescriptor = { 0x12, // bLength Field 0x01, // bDescriptorType Field 0x0110, // bcdUSB Field 0x0100 0x00, // bDeviceClass Field 0x00, // bDeviceSubClass Field 0x00, // bDeviceProtocol Field 0x10, // bMaxPacketSize0 0xa00e,//0x5e04, // VID ,Microsoft VID=0ea0 0x0368,//0x0a93, // PID, Mass PID=0x6803 0x0100, // bcdDevice Field 0x0100 0, // iManufactor 0, // iProduct 0, // iSerialNumber 1 // bNumConfigurationsField }; const unsigned char ConfigurationDescriptor[] = //const CONFIGURATION_BLOCK ConfigurationDescriptor = //const USB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor = { 0x09, // bLength Field 0x02, // bDescriptorType Field 0x20,0x00, // wTotalLength Field 0x20 1, // 此配置所支持的接口个数 1, // 在SetConfiguration()请求中用作参数来选定此配置 0, // iConfiguration Field 0xc0, // bmAttributes Field 0x25, // 最大工作电流 //}; //const USB_INTERFACE_DESCRIPTOR InterfaceDescriptor = //{ 0x09, // bLength Field USB_INTERFACE_DESCRIPTOR_TYPE, // bDescriptorType Field 0, // bInterfaceNumber Field 0, // bAlternateSetting Field 0x02, // bNumEndpoints Field 0x08, // bInterfaceClass Field 0x06, // bInterfaceSubClass Field 0x50, // bInterfaceProtocol Field 0x00, // iInterface Field //}; //const USB_ENDPOINT_DESCRIPTOR BulkInDescriptor = //{ 0x07, USB_ENDPOINT_DESCRIPTOR_TYPE, 0x82, //0x082 #if (USB_MODE == ISO_MODE) USB_ENDPOINT_TYPE_ISOCHRONOUS, #else USB_ENDPOINT_TYPE_BULK, #endif 0x40,0x00, 0, //}; //const USB_ENDPOINT_DESCRIPTOR BulkOutDescriptor = //{ 0x07, USB_ENDPOINT_DESCRIPTOR_TYPE, 0x02, #if (USB_MODE == ISO_MODE) USB_ENDPOINT_TYPE_ISOCHRONOUS, #else USB_ENDPOINT_TYPE_BULK, #endif 0x40,0x00, 0 }; |
|
|
地下室#
发布于:2002-05-31 10:26
liuwan兄:
你的firmware程序我一直没收到. 能帮忙罚我信箱里吗? lqalading@sina.com.cn |
|