⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stddesc.h

📁 dz3000_51.0.0.4.rar
💻 H
📖 第 1 页 / 共 2 页
字号:
        0xFF,                   //bInterfaceClass: vendor specific interface
        0x00,                   //bInterfaceSubClass: 0
        0x00,                   //bInterfaceProtocol: class specific protocol NOT used on this interface
        0x00,                   //iInterface: index of string

        //Endpoint 1 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x81,                   //bEndpointAddress: IN endpoint 1
        0x01,                   //bmAttributes: Isochronous
        0xff, 0x03,             //wMaxPacketSize: 1023 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //-------------------------------------------------------------------
        //SubLength = 0x001e byte
        //-------------------------------------------------------------------

        //Interface 1 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x01,                   //bInterfaceNumber: interface 1
        0x00,                   //bAlternateSetting: alternate setting 0
        0x03,                   //bNumEndpoints: 3 endpoints
        0xFF,                   //bInterfaceClass: Vender Bulk
        0x00,                   //bInterfaceSubClass: UFI
		 0x00,		 		 		 // Bulk Only Rechie
        0x00,                   //iInterface: index of string

        //Endpoint 2 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x82,                   //bEndpointAddress: IN endpoint 2
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 3 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x03,                   //bEndpointAddress: OUT endpoint 3
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 4 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x84,                   //bEndpointAddress: IN endpoint 4
        0x03,                   //bmAttributes: Interrupt
        0x01, 0x00,             //wMaxPacketSize: 1 byte
        0x01,                   //bInterval: polling interval is 1 ms



};

/////////////////////////////////////////////////////////////////////////////
//Descriptor Content of MSDC
//---- Device Descriptor ----
#define K_MSDC_DEVICE_DESCRIPTOR_SIZE        0x0012
code    UCHAR   K_MSDC_DeviceDescriptor[] =
{
        //-------------------------------------------------------------------
        //TotalLength = 0x0012 byte
        //-------------------------------------------------------------------

        //Device (0x12 byte)
        0x12,                   //bLength: 0x12 byte
        0x01,                   //bDescriptorType: DEVICE
        0x00, 0x01,             //bcdUSB: version 1.00
        0x00,                   //bDeviceClass: independent interfaces
        0x00,                   //bDeviceSubClass: 0
        0x00,                   //bDeviceProtocol: class specific protocols NOT used on device basis
        0x08,                   //bMaxPacketSize0: maximum packet size for endpoint zero
        0xfc, 0x04,             //idVendor: vendor ID
        0x31, 0x53,            //idProduct: product ID (for MSDC)wendy@2004/8/5//0x00, 0x03,
        0x00, 0x01,             //bcdDevice: device release number in BCD
        0x01,                   //iManufacturer: index of string
        0x02,                   //iProduct: index of string 
        0x03,                   //iSerialNumber: index of string
        0x01,                   //bNumConfigurations: 1 configuration
};

//---- Configuration Descriptor of MSDC ----
#define K_MSDC_CONFIGURATION_DESCRIPTOR_SIZE 0x0027
code    UCHAR   K_MSDC_ConfigurationDescriptor[] =
{
        //-------------------------------------------------------------------
        //SubLength = 0x0009 byte 
        //-------------------------------------------------------------------

        //Configuration (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x02,                   //bDescriptorType: CONFIGURATION        
        0x27, 0x00,             //wTotalLength:
        0x01,                   //bNumInterfaces: 1 interfaces
        0x01,                   //bConfigurationValue: configuration 1
        0x00,                   //iConfiguration: index of string
        0x80,                   //bmAttributes: bus powered
        0xFA,                   //MaxPower: 500 mA     

        //-------------------------------------------------------------------
        //SubLength = 0x001e byte
        //-------------------------------------------------------------------

        //Interface 1 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x00,                   //bAlternateSetting: alternate setting 0
        0x03,                   //bNumEndpoints: 3 endpoints
        0x08,                   //bInterfaceClass: Mass Storage Devices Class
        0x06,                   //bInterfaceSubClass:
		 0x50,		 		         //Bulk Only
        0x00,                   //iInterface: index of string

        //Endpoint 2 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x87,                   //bEndpointAddress: IN endpoint 7
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 3 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x08,                   //bEndpointAddress: OUT endpoint 8
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 4 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x89,                   //bEndpointAddress: IN endpoint 9
        0x03,                   //bmAttributes: Interrupt
        0x01, 0x00,             //wMaxPacketSize: 1 byte
        0x01,                   //bInterval: polling interval is 1 ms
};

//richie@si0401
/////////////////////////////////////////////////////////////////////////////
//Descriptor Content of SIDC
//---- Device Descriptor ----
#define K_SIDC_DEVICE_DESCRIPTOR_SIZE        0x0012
code    UCHAR   K_SIDC_DeviceDescriptor[] =
{
        //-------------------------------------------------------------------
        //TotalLength = 0x0012 byte
        //-------------------------------------------------------------------

        //Device (0x12 byte)
        0x12,                   //bLength: 0x12 byte
        0x01,                   //bDescriptorType: DEVICE
        0x00, 0x01,             //bcdUSB: version 1.00
        0x00,                   //bDeviceClass: independent interfaces
        0x00,                   //bDeviceSubClass: 0
        0x00,                   //bDeviceProtocol: class specific protocols NOT used on device basis
        0x08,                   //bMaxPacketSize0: maximum packet size for endpoint zero
        0xfc, 0x04,             //idVendor: vendor ID
       0x32, 0x53,             //idProduct: product ID (for SIDC)//wendy@2004/8/5//0x32, 0x53,0x00, 0x03,
        0x00, 0x01,             //bcdDevice: device release number in BCD
        0x01,                   //iManufacturer: index of string
        0x02,                   //iProduct: index of string 
        0x03,                   //iSerialNumber: index of string
        0x01,                   //bNumConfigurations: 1 configuration
};

//---- Configuration Descriptor of SIDC ----
#define K_SIDC_CONFIGURATION_DESCRIPTOR_SIZE 0x0027
code    UCHAR   K_SIDC_ConfigurationDescriptor[] =
{
        //-------------------------------------------------------------------
        //SubLength = 0x0009 byte 
        //-------------------------------------------------------------------

        //Configuration (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x02,                   //bDescriptorType: CONFIGURATION        
        0x27, 0x00,             //wTotalLength:
        0x01,                   //bNumInterfaces: 1 interfaces
        0x01,                   //bConfigurationValue: configuration 1
        0x00,                   //iConfiguration: index of string
        0x80,                   //bmAttributes: bus powered
        0xFA,                   //MaxPower: 500 mA     

        //-------------------------------------------------------------------
        //SubLength = 0x001e byte
        //-------------------------------------------------------------------

        //Interface 1 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 1
        0x00,                   //bAlternateSetting: alternate setting 0
        0x03,                   //bNumEndpoints: 3 endpoints
        0x06,                   //bInterfaceClass: Still Image Devices Class
        0x01,                   //bInterfaceSubClass:
		 0x01,		 		 		 //Bulk Only
        0x00,                   //iInterface: index of string

        //Endpoint 2 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x87,                   //bEndpointAddress: IN endpoint 7
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 3 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x08,                   //bEndpointAddress: OUT endpoint 8
        0x02,                   //bmAttributes: Bulk
        0x40, 0x00,             //wMaxPacketSize: 64 byte
        0x00,                   //bInterval: ignored

        //Endpoint 4 (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x89,                   //bEndpointAddress: IN endpoint 9
        0x03,                   //bmAttributes: Interrupt
        0x01, 0x00,             //wMaxPacketSize: 1 byte
        0x01,                   //bInterval: polling interval is 1 ms
};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -