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

📄 stddesc.b16

📁 dz3000_51.0.0.4.rar
💻 B16
📖 第 1 页 / 共 5 页
字号:
/*++

Copyright (c) 2001 Sunplus Technology Co., Ltd.

Module Name:

        stddesc.h

Abstract:

        Header file related to standard descriptor

Environment:

        Keil C51 Compiler

Revision History:

        08/28/2001      Chi-Yeh Tsai    created                 

--*/

//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//Descriptor Content
//---- Device Descriptor ----
#define K_DEVICE_DESCRIPTOR_SIZE        0x0012
code    UCHAR   K_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, 0x05,             //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 ---- //cytsai@0312
#define K_CONFIGURATION_DESCRIPTOR_SIZE 0x0222
code    UCHAR   K_ConfigurationDescriptor[] =
{
        //-------------------------------------------------------------------
        //TotalLength = 0x0222 byte
        //-------------------------------------------------------------------

        //-------------------------------------------------------------------
        //SubLength = 0x0009 byte 
        //-------------------------------------------------------------------

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

        //-------------------------------------------------------------------
        //SubLength = 0x0080 byte 
        //-------------------------------------------------------------------

        //Interface 0, AlternateSetting 0 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x00,                   //bAlternateSetting: alternate setting 0
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x00, 0x00,             //wMaxPacketSize: 0 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 1 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x01,                   //bAlternateSetting: alternate setting 1
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x80, 0x00,             //wMaxPacketSize: 128 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 2 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x02,                   //bAlternateSetting: alternate setting 2
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x80, 0x01,             //wMaxPacketSize: 384 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 3 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x03,                   //bAlternateSetting: alternate setting 3
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x00, 0x02,             //wMaxPacketSize: 512 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 4 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x04,                   //bAlternateSetting: alternate setting 4
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x80, 0x02,             //wMaxPacketSize: 640 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 5 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x05,                   //bAlternateSetting: alternate setting 5
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x00, 0x03,             //wMaxPacketSize: 768 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 6 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x06,                   //bAlternateSetting: alternate setting 6
        0x01,                   //bNumEndpoints: 1 endpoint
        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
        0x80, 0x03,             //wMaxPacketSize: 896 byte
        0x01,                   //bInterval: polling interval is 1 ms

        //Interface 0, AlternateSetting 7 (0x09 byte)
        0x09,                   //bLength: 0x09 byte
        0x04,                   //bDescriptorType: INTERFACE
        0x00,                   //bInterfaceNumber: interface 0
        0x07,                   //bAlternateSetting: alternate setting 7
        0x01,                   //bNumEndpoints: 1 endpoint
        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

⌨️ 快捷键说明

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