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

📄 descriptors.h

📁 Mitsubishi M30245 SampleCode
💻 H
字号:
/*******************************************************************
 *
 *    DESCRIPTION: M30245 Mit_USB Demonstration Application
 *
 *    AUTHOR: Mitsubishi DEC-E
 *
 *    HISTORY: 0.5 5/30/02 Initial creation for NC30
 *			   1.0 6/18/02 First official release
 *			   1.1 6/27/02 Updated ISO routines
 *			   1.2 8/07/02 Updated for Rev B Starter Kit Board
 *
 *******************************************************************/

const unsigned char DeviceDescriptor[0x12] = {
									 0x12,		// desc length
							  	     0x01,		// desc type
							  	     0x10,		// USB Spec Rev (Low Order)
							  	     0x01,		// USB Spec Rev (High Order)
							  	     0x00,		// Device Class
							  	     0x00,		// Device Subclass
							  	     0x00,		// Device Protocol
							  	     0x08,		// Packet Size
							  	     0x52,		// VID (Low Order)
							  	     0x04,		// VID (High Order)
							  	     0x00,		// PID (Low Order)
							  	     0x01,		// PID (High Order)
							  	     0x01,		// Device Release Numb (Low Order)
							  	     0x00,		// Device Release Numb (High Order)
							  	     0x01,		// Index of String Desc (Manuf)
							  	     0x02,		// Index of String Desc (Product)
							  	     0x07,		// Index of String Desc (Serial #)
							  	     0x01		// Number of Configurations
};
const unsigned char ConfigDescriptor[0x09] = {
									 0x09,		// desc length
							  	     0x02,		// desc type
//								     0x3E,		// Data Length (Low Order)
								     0x35,		// Data Length (Low Order)
								     0x00,		// Data Length (High Order)
								     0x01,		// Number of Interfaces Supported
								     0x01,		// Config Value
								     0x08,		// Config Index
								     0xC0,		// Config Attributes (Self Powered)
								     0x32		// Max Power (100mA)
};
const unsigned char InterfaceDescriptorAltSet1[0x09] = {
								     0x09,		// Desc Length
								     0x04,		// Desc Type
								     0x00,		// Interface Number
//								     0x01,		// Alternate Settings
								     0x00,		// Alternate Settings
								     0x05,		// Number of endpoints
								     0xFF,		// interface Class
								     0xFF,		// Interface Subclass
								     0xFF,		// Interface Protocol
								     0x05		// Interface Descriptor String
};
const unsigned char EP1_IN_DescriptorAltSet2[0x07] = {
									 0x07,		// Desc Length
									 0x05,		// Desc Type
									 0x81,		// Endpoint Address
									 0x02,		// Endpoint Attributes (BULK)
									 0x40,		// Max Packet Size (LOW)
									 0x00,		// Max Packet Size (HIGH)
									 0x00		// Polling Interval
};
const unsigned char EP1_OUT_DescriptorAltSet2[0x07] = {
									 0x07,		// Desc Length
									 0x05,		// Desc Type
									 0x01,		// Endpoint Address
									 0x02,		// Endpoint Attributes (BULK)
									 0x40,		// Max Packet Size (LOW)
									 0x00,		// Max Packet Size (HIGH)
									 0x00		// Polling Interval
};
const unsigned char EP2_IN_DescriptorAltSet2[0x07] = {
									 0x07,		// Desc Length
									 0x05,		// Desc Type
									 0x82,		// Endpoint Address
									 0x03,		// Endpoint Attributes (INTERRUPT)
									 0x20,		// Max Packet Size (LOW)
									 0x00,		// Max Packet Size (HIGH)
									 0x0a		// Polling Interval
};
const unsigned char EP3_IN_DescriptorAltSet2[0x07] = {
									 0x07,		// Desc Length
									 0x05,		// Desc Type
									 0x83,		// Endpoint Address
									 0x01,		// Endpoint Attributes (ISO NO SYNC)
									 0x0A,		// Max Packet Size (LOW)
									 0x00,		// Max Packet Size (HIGH)
									 0x01		// Polling Interval
};
const unsigned char EP3_OUT_DescriptorAltSet2[0x07] = {
									 0x07,		// Desc Length
									 0x05,		// Desc Type
									 0x03,		// Endpoint Address
									 0x01,		// Endpoint Attributes (ISO NO SYNC)
									 0x40,		// Max Packet Size (LOW)
									 0x00,		// Max Packet Size (HIGH)
									 0x01		// Polling Interval
};
const unsigned char LangIDString[0x04] = {
									 0x04,
									 0x03,
									 0x09,
									 0x04
};
const unsigned char ManfString[0x48] = {
	0x48,
	3,
	'M',0,'i',0,'t',0,'s',0,'u',0,'b',0,'i',0,'s',0,'h',0,'i',0, 
	' ',0,'E',0,'l',0,'e',0,'c',0,'t',0,'r',0,'o',0,'n',0,'i',0, 
	'c',0,'s',0,' ',0,'A',0,'m',0,'e',0,'r',0,'i',0,'c',0,'a',0, 
	' ',0,'I',0,'n',0,'c',0,'.',0,
};
const unsigned char ProdString[0x26] = {
	0x26,
	3,
	'M',0,'3',0,'0',0,'2',0,'4',0,'5',0,' ',0,'S',0,
	't',0,'a',0,'r',0,'t',0,'e',0,'r',0,' ',0,'K',0,
	'i',0,'t',0,
};
const unsigned char SerialNumberString[0x12] = {
	0x12,
	3,
	'V',0,'e',0,'r',0,'.',0,' ',0,'0',0,'.',0,'9',0,
};
const unsigned char ConfigString[0x26] = {
	0x26,
	3,
	'M',0,'a',0,'i',0,'n',0,' ',0,'C',0,'o',0,'n',0,
	'f',0,'i',0,'g',0,'u',0,'r',0,'a',0,'t',0,'i',0,
	'o',0,'n',0,
};
const unsigned char AltSet0String[0x28] = {
	0x28,
	3,
	'A',0,'l',0,'t',0,'e',0,'r',0,'n',0,'a',0,'t',0,'e',0,' ',0,
	'S',0,'e',0,'t',0,'t',0,'i',0,'n',0,'g',0,' ',0,'0',0,
};

const unsigned char AltSet1String[0x28] = {
	0x28,
	3,
	'A',0,'l',0,'t',0,'e',0,'r',0,'n',0,'a',0,'t',0,'e',0,' ',0,
	'S',0,'e',0,'t',0,'t',0,'i',0,'n',0,'g',0,' ',0,'1',0,
};

const unsigned char AltSet2String[0x28] = {
	0x28,
	3,
	'A',0,'l',0,'t',0,'e',0,'r',0,'n',0,'a',0,'t',0,'e',0,' ',0,
	'S',0,'e',0,'t',0,'t',0,'i',0,'n',0,'g',0,' ',0,'2',0,
};

⌨️ 快捷键说明

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