////////////////////////////////
//usb_descriptor.h


/*
** HID MOUSE DESCRIPTOR DECLARATIONS
*/

code unsigned char report_descriptor[ 52 ] = 
{
0x05, 0x01,
0x09, 0x02,

0xA1, 0x01,
0x09, 0x01,

0xA1, 0x00,
0x05, 0x09,

0x19, 0x01,
0x29, 0x03,

0x15, 0x00,
0x25, 0x01,

0x95, 0x03,
0x75, 0x01,

0x81, 0x02,
0x95, 0x01,

0x75, 0x05,
0x81, 0x01,//0x03,//0x01, INPUT (Cnst,Var,Abs)

0x05, 0x01,
0x09, 0x30,

0x09, 0x31,
0x09, 0x38,	// Wheel

0x15, 0x81,

0x25, 0x7F,
0x75, 0x08,

0x95, 0x03,//0x02,
0x81, 0x06,

0xC0,
0xC0
};

code unsigned char endpoint_descriptor[] = 
{

0x07,
0x05,
0x81, //ENDP1 IN
0x03, //ÖÐ¶Ï¶Ëµã
0x08,
0x00,
0x0A,

0x07,
0x05,
0x01, //ENDP1 OUT
0x03,
0x08,
0x00,
0x00
};


code unsigned char hid_descriptor[] = 
{
 0x09,  /* descriptor size (9 bytes) */
 0x21,  /* descriptor type (HID) */
 0x10, 0x01,/* class specification (1.10) */
 0x00,  /* hardware target country */
 0x01,  /* number of hid class desriptors to follow (1) */
 0x22,  /* report descriptor type (2) */
 0x34,	//0x32//sizeof(hid_descriptor),
 0x00
};



code unsigned char interface_descriptor[] = 
{
 0x09,  /* length of descriptor (9 bytes) */
 0x04,  /* descriptor type (INTERFACE) */
 0x00,  /* interface number (0) */
 0x00,  /* alternate setting (0) */
 0x01,  /* number of endpoints (1) */
 0x03,  /* interface class (3..defined by USB spec) */
 0x01,  /* interface sub-class (1..defined by USB spec) */
 0x02,  /* interface protocol (2..defined by USB spec) */
 0x00   /* interface string index (not supported) */
};



code unsigned char config_descriptor[] = 
{
 0x09,  /* length of descriptor (9 bytes) */
 0x02,  /* descriptor type (CONFIGURATION) */
 0x22, 0x00,/* total length of descriptor (33 bytes) */
 0x01,  /* number of interfaces to configure (1) */
 0x01,  /* configuration value (1) */
 0x00,  /* configuration string index (4) */
 0xA0,  /* configuration attributes (bus powered, remote wakeup) */
 0x64 , /* maximum power (set at 100, change this value for your specific optics)*/
////////////////////interface
0x09,  /* length of descriptor (9 bytes) */
 0x04,  /* descriptor type (INTERFACE) */
 0x00,  /* interface number (0) */
 0x00,  /* alternate setting (0) */
 0x01,  /* number of endpoints (1) */
 0x03,  /* interface class (3..defined by USB spec) */
 0x01,  /* interface sub-class (1..defined by USB spec) */
 0x02,  /* interface protocol (2..defined by USB spec) */
 0x00 ,  /* interface string index (not supported) */
///////////////////////calass
0x09,  /* descriptor size (9 bytes) */
 0x21,  /* descriptor type (HID) */
 0x10, 0x01,/* class specification (1.10) */
 0x00,  /* hardware target country */
 0x01,  /* number of hid class desriptors to follow (1) */
 0x22,  /* report descriptor type (2) */
 0x34,	//0x32//0x48//sizeof(hid_descriptor),
 0x00,
/////////////////////////////endpoint

0x07,
0x05,
0x81, //ENDP1 IN
0x03, //ÖÐ¶Ï¶Ëµã
0x08,
0x00,
0x0A,

};

code unsigned char device_descriptor[] = 
{
 0x12,  /* size of descriptor (18 bytes) */
 0x01,  /* descriptor type (device descriptor) */
 0x10, 0x01,/* USB spec release (ver 1.1) */
 0x00,  /* class code (each interface specifies class information) */
 0x00,  /* device sub-class (must be set to 0 because class code is 0) */
 0x00,  /* device protocol (no class specific protocol) */
 0x08,  /* maximum packet size (8 bytes) */
 0x59, 0x47,/* vendor ID (note reference design vendor ID) */
 0x49, 0x4D,/* product ID (reference design USB mouse product ID) */
 0x01, 0x00,/* device release number */
 0x00,  /* index of manufacturer string (1) */
 0x00,  /* index of product string (2) */
 0x00,  /* index of serial number string (not supported = 0x00) */
 0x01  /* number of configurations (1) */
};

code unsigned char get_interface_status_table[] = 
{
 0x00, 0x00 /* always return both bytes zero */
};


