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

📄 usb.h

📁 ISP1583 Mass Storgae Firmware
💻 H
字号:
//***********************************************************************
//									     								                  *
//                P H I L I P S   P R O P R I E T A R Y          		   *
//                                                                      *
//          COPYRIGHT (c)   1999 BY PHILIPS SINGAPORE (APIC).    		   *
//                    --  ALL RIGHTS RESERVED  --                 		*	
//                                                                      *
// 	File Name	:       USB.h                                         *
// 	Author		:       Albert Goh					 					      *
// 	Created		:      	3 March 2000                               	*
//                  	                                                   *
//***********************************************************************
//***********************************************************************
//                                                                      *
//  Module History														            *
//  **************														            *
//																		                  *
//  Date   	Version			Author				Changes					      *
//  ====	   =======			======				=======					      *
//  030300	  0.1 			Albert				Created    				      *
//                                                                      *
//                                                                      *
//***********************************************************************



#define	ENDPT_NUMBER      2
#define	INTERFACE_NO		1


#define SWAP(x)            ((((x) & 0xFF) << 8) | (((x) >> 8) & 0xFF))

#define	CONFIG_LENGTH     sizeof(CONFIGURATION_DESCRIPTOR) + \
								         (INTERFACE_NO * sizeof(INTERFACE_DESCRIPTOR)) + \
								         (ENDPT_NUMBER * sizeof(ENDPOINT_DESCRIPTOR))
								
typedef struct DEVICE_DESCRIPTOR 
{

    UC bLength;
    UC bDescriptorType;
    UI bcdUSB;
    UC bDeviceClass;
    UC bDeviceSubClass;
    UC bDeviceProtocol;
    UC bMaxPacketSize0;
    UI idVendor;
    UI idProduct;
    UI bcdDevice;
    UC iManufacturer;
    UC iProduct;
    UC iSerialNumber;
    UC bNumConfigurations;

} DEVICE_DESCRIPTOR;


typedef struct HS_DEVICE_QUALIFIER
{

	UC	bLength;			   
   UC	bQualifier;
   UI	wVersion;
   UC	bDeviceClass;
   UC	bDeviceSubClasss;
   UC	bProtocol;
   UC	MaxPktSize;
   UC	bOther_Config;
   UC	Reserved;
   
}HS_DEVICE_QUALIFIER;


typedef struct CONFIGURATION_DESCRIPTOR 
{
    UC bLength;
    UC bDescriptorType;
    UI wTotalLength;
    UC bNumInterfaces;
    UC bConfigurationValue;
    UC iConfiguration;
    UC bmAttributes;
    UC MaxPower;

} CONFIGURATION_DESCRIPTOR;

typedef struct	OTHER_SPEED_CONFIG_DESCRIPTOR
{

	UC	bLength;
   UC	bDescriptorType;
   UI	bTotalLength;
   UC	No_Interface;
   UC	Configuration_Value;
   UC	String_Index_Descriptor;
   UC	Config_Characteristic;
   UC	Max_Power;	
   
}OTHER_SPEED_CONFIG_DESCRIPTOR;


typedef struct INTERFACE_DESCRIPTOR 
{
    UC bLength;
    UC bDescriptorType;
    UC bInterfaceNumber;
    UC bAlternateSetting;
    UC bNumEndpoints;
    UC bInterfaceClass;
    UC bInterfaceSubClass;
    UC bInterfaceProtocol;
    UC iInterface;

} INTERFACE_DESCRIPTOR;


typedef struct ENDPOINT_DESCRIPTOR 
{
    UC bLength;
    UC bDescriptorType;
    UC bEndpointAddress;
    UC bmAttributes;
    UI wMaxPacketSize;
    UC bInterval;

} ENDPOINT_DESCRIPTOR;



typedef struct STRING_ID 
{
    UC bLength;
    UC bDescriptorType;
    UC bString[2];

} STRING_ID;


typedef struct STRING_DESCRIPTOR 
{
    UC bLength;
    UC bDescriptorType;
    UC bString[30];

} STRING_DESCRIPTOR;

⌨️ 快捷键说明

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