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

📄 stddesc.b16

📁 dz3000_51.0.0.4.rar
💻 B16
📖 第 1 页 / 共 5 页
字号:
        0x01,                   //bNrChannels: 1 channel
        0x02,                   //bSubFrameSize: 2 byte per audio subframe
        0x10,                   //bBitResolution: 16 bits per sample
        0x01,                   //bSamFreqType: 1 frequency supported
        0x00, 0x00, 0x00,       //tSamFreq: 0 Hz

        //Standard AS Endpoint Descriptor (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x86,                   //bEndpointAddress: IN endpoint 6
        0x01,                   //bmAttributes: Isochronous        
        0xd0, 0x00,             //wMaxPacketSize: 208 byte
        0x01,                   //bInterval:  polling interval is 1 ms
        0x00,                   //bRefresh: 0 
        0x00,                   //bSyncAddress: 0

        //Class-specific AS Endpoint Descriptor (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x25,                   //bDescriptorType: CS_ENDPOINT
        0x01,                   //bDescriptorSubType: GENERAL subtype
        0x00,                   //bmAttributes: no control is supported
        0x00,                   //bLockDelayUnits: 0
        0x00, 0x00,             //wLockDelay: 0

        //Standard AS Interface Descriptor, AlternateSetting e (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x03,                   //bInterfaceNumber: interface 3
        0x0e,                   //bAlternateSetting: alternate setting e
        0x01,                   //bNumEndpoints: 1 endpoint
        0x01,                   //bInterfaceClass: AUDIO
        0x02,                   //bInterfaceSubClass: AUDIO_STREAMING
        0x00,                   //bInterfaceProtocol: 0
        0x00,                   //iInterface: index of string

        //Class-specific AS General Interface Descriptor (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x24,                   //bDescriptorType: CS_INTERFACE
        0x01,                   //bDescriptorSubType: GENERAL subtype
        0x04,                   //bTerminalLink: ID of output terminal is 4 (USB streaming)
        0x01,                   //bDelay: interface delay is 1 frame
        0x01, 0x00,             //wFormatTag: PCM format

        //Type I format Type Descriptor (0x0b byte)
        0x0b,                   //bLength: 0x0b byte
        0x24,                   //bDescriptorType: CS_INTERFACE
        0x02,                   //bDescriptorSubType: FORMAT_TYPE subtype
        0x01,                   //bFormatType: FORMAT_TYPE_I
        0x01,                   //bNrChannels: 1 channel
        0x02,                   //bSubFrameSize: 2 byte per audio subframe
        0x10,                   //bBitResolution: 16 bits per sample
        0x01,                   //bSamFreqType: 1 frequency supported
        0x00, 0x00, 0x00,       //tSamFreq: 0 Hz

        //Standard AS Endpoint Descriptor (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x86,                   //bEndpointAddress: IN endpoint 6
        0x01,                   //bmAttributes: Isochronous        
        0x00, 0x01,             //wMaxPacketSize: 256 byte
        0x01,                   //bInterval:  polling interval is 1 ms
        0x00,                   //bRefresh: 0 
        0x00,                   //bSyncAddress: 0

        //Class-specific AS Endpoint Descriptor (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x25,                   //bDescriptorType: CS_ENDPOINT
        0x01,                   //bDescriptorSubType: GENERAL subtype
        0x00,                   //bmAttributes: no control is supported
        0x00,                   //bLockDelayUnits: 0
        0x00, 0x00,             //wLockDelay: 0

        //Standard AS Interface Descriptor, AlternateSetting f (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x03,                   //bInterfaceNumber: interface 3
        0x0f,                   //bAlternateSetting: alternate setting f
        0x01,                   //bNumEndpoints: 1 endpoint
        0x01,                   //bInterfaceClass: AUDIO
        0x02,                   //bInterfaceSubClass: AUDIO_STREAMING
        0x00,                   //bInterfaceProtocol: 0
        0x00,                   //iInterface: index of string

        //Class-specific AS General Interface Descriptor (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x24,                   //bDescriptorType: CS_INTERFACE
        0x01,                   //bDescriptorSubType: GENERAL subtype
        0x04,                   //bTerminalLink: ID of output terminal is 4 (USB streaming)
        0x01,                   //bDelay: interface delay is 1 frame
        0x01, 0x00,             //wFormatTag: PCM format

        //Type I format Type Descriptor (0x0b byte)
        0x0b,                   //bLength: 0x0b byte
        0x24,                   //bDescriptorType: CS_INTERFACE
        0x02,                   //bDescriptorSubType: FORMAT_TYPE subtype
        0x01,                   //bFormatType: FORMAT_TYPE_I
        0x01,                   //bNrChannels: 1 channel
        0x02,                   //bSubFrameSize: 2 byte per audio subframe
        0x10,                   //bBitResolution: 16 bits per sample
        0x01,                   //bSamFreqType: 1 frequency supported
        0x00, 0x00, 0x00,       //tSamFreq: 0 Hz

        //Standard AS Endpoint Descriptor (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x05,                   //bDescriptorType: ENDPOINT
        0x86,                   //bEndpointAddress: IN endpoint 6
        0x01,                   //bmAttributes: Isochronous        
        0x00, 0x02,             //wMaxPacketSize: 512 byte
        0x01,                   //bInterval:  polling interval is 1 ms
        0x00,                   //bRefresh: 0 
        0x00,                   //bSyncAddress: 0

        //Class-specific AS Endpoint Descriptor (0x07 byte)
        0x07,                   //bLength: 0x07 byte
        0x25,                   //bDescriptorType: CS_ENDPOINT
        0x01,                   //bDescriptorSubType: GENERAL subtype
        0x00,                   //bmAttributes: no control is supported
        0x00,                   //bLockDelayUnits: 0
        0x00, 0x00,             //wLockDelay: 0
#endif

	//richie@0124 add bulk 2
        //-------------------------------------------------------------------
        //SubLength = 0x001e byte
        //-------------------------------------------------------------------

        //Interface 1 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x04,                   //bInterfaceNumber: interface 4
        0x00,                   //bAlternateSetting: alternate setting 0
        0x03,                   //bNumEndpoints: 3 endpoints
        0xFF,                   //bInterfaceClass: Mass Storage devices
        0x00,                   //bInterfaceSubClass: UFI
	0x00,			// Bulk Only Rechie
        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

};

/////////////////////////////////////////////////////////////////////////////
//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
        0x33, 0x15,             //idProduct: product ID (for SIDC)
        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 1
        0x00,                   //bAlternateSetting: alternate setting 0
        0x03,                   //bNumEndpoints: 3 endpoints
        0x08,                   //bInterfaceClass: Mass Storage devices
        0x06,                   //bInterfaceSubClass:
	0x50,			        // 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
       

⌨️ 快捷键说明

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