hi
i am unable to figure out the exact problem on the host side but may be host is slow i am attaching the descriptors for controller device plz go through that if possible in the meanwhile i will increase the data buffer size on my host appln and will check whether that will solves the problem
#define HID_INPUT_REPORT_BYTES 64 //64 /* size of report in Bytes */
#define HID_OUTPUT_REPORT_BYTES 20 //64 /* size of report in Bytes */
#define HID_FEATURE_REPORT_BYTES 64 //64 //64 /* size of report in Bytes */
#define EP1 1
#define EP4 4
#define EP EP1
#if EP == EP1
#define HID_EP_DATA_IN 0x81 //0x84// 0x81
#define HID_EP_DATA_OUT 0x01 //0x04//0X01
#endif
const uint8_t HID_ReportDescriptor[] = {
HID_UsagePageVendor( 0x00 ),
HID_Usage ( 0x01 ),
HID_Collection ( HID_Application ),
HID_LogicalMin ( 0 ), // value range: 0 - 0xFF
HID_LogicalMaxS ( 0xFF ),
HID_ReportSize ( 8 ), // 8 bits
//HID_ReportSize ( 16 ), // 16 bits
HID_ReportCount ( HID_INPUT_REPORT_BYTES ),
HID_Usage ( 0x01 ),
HID_Input ( HID_Data | HID_Variable | HID_Absolute ),
HID_ReportCount ( HID_OUTPUT_REPORT_BYTES ),
HID_Usage ( 0x01 ),
HID_Output ( HID_Data | HID_Variable | HID_Absolute ),
HID_ReportCount ( HID_FEATURE_REPORT_BYTES ),
HID_Usage ( 0x01 ),
HID_Feature ( HID_Data | HID_Variable | HID_Absolute ),
HID_EndCollection,
};
const uint16_t HID_ReportDescSize = sizeof(HID_ReportDescriptor);
/* USB Standard Device Descriptor */
const uint8_t USB_DeviceDescriptor[] =
{
USB_DEVICE_DESC_SIZE, /* bLength */
USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
//USB_STRING_DESCRIPTOR_TYPE,
WBVAL(0x0200), /* 2.00 */ /* bcdUSB */
0x00, /* bDeviceClass */
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
USB_MAX_PACKET0, /* bMaxPacketSize0 */
WBVAL(0x1FC9), /* idVendor */
WBVAL(0x8002), /* idProduct */
//WBVAL(0x0001), /* 0.01 */ /* bcdDevice */
WBVAL(0x0100), /* 0.01 */ /* bcdDevice */
0x01, /* iManufacturer */
0x02, /* iProduct */
0x03, /* iSerialNumber */
//0x00, /* iSerialNumber */
0x01 /* bNumConfigurations: one possible configuration*/
};
/* USB Configuration Descriptor */
/* All Descriptors (Configuration, Interface, Endpoint, Class, Vendor) */
const uint8_t USB_ConfigDescriptor[] =
{
/* Configuration 1 */
USB_CONFIGUARTION_DESC_SIZE, /* bLength */
USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */ /* wTotalLength */
WBVAL((USB_CONFIGUARTION_DESC_SIZE)+(USB_INTERFACE_DESC_SIZE)+(HID_DESC_SIZE)+(2*(USB_ENDPOINT_DESC_SIZE))),
0x01, /* bNumInterfaces */
0x01, /* bConfigurationValue */
0x00, /* iConfiguration */
// USB_CONFIG_BUS_POWERED, /*|*/ /* bmAttributes */
/*USB_CONFIG_REMOTE_WAKEUP*/
USB_CONFIG_SELF_POWERED,
USB_CONFIG_POWER_MA(500), /* bMaxPower */
/* Interface 0, Alternate Setting 0, HID Class */
USB_INTERFACE_DESC_SIZE, /* bLength */
USB_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */
0x00, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x02, /* bNumEndpoints */
USB_DEVICE_CLASS_HUMAN_INTERFACE, /* bInterfaceClass */ //ORIGINL
//USB_DEVICE_CLASS_TMC, /* bInterfaceClass */ //SUDEEP
HID_SUBCLASS_NONE, /* bInterfaceSubClass */ //ORIGINL
//0X03, /* bInterfaceSubClass */ //SUDEEP
HID_PROTOCOL_NONE, /* bInterfaceProtocol */
//0X00, /* iInterface */
0x04, /* iInterface */
/* HID Class Descriptor */
/* HID_DESC_OFFSET = 0x0012 */
HID_DESC_SIZE, /* bLength */
HID_HID_DESCRIPTOR_TYPE, /* bDescriptorType */
//WBVAL(0x0110), /* 1.10 */ /* bcdHID */
WBVAL(0x0100), /* 1.10 */ /* bcdHID */
0x00, /* bCountryCode */
0x01, /* bNumDescriptors */
HID_REPORT_DESCRIPTOR_TYPE, /* bDescriptorType */
WBVAL(HID_REPORT_DESC_SIZE), /* wDescriptorLength */
/* Endpoint, HID Interrupt In */
USB_ENDPOINT_DESC_SIZE, /* bLength */
USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
//USB_ENDPOINT_IN(1), /* bEndpointAddress */
USB_ENDPOINT_IN(EP), /* bEndpointAddress */
USB_ENDPOINT_TYPE_INTERRUPT, /* bmAttributes */
// USB_ENDPOINT_TYPE_BULK,
//WBVAL(0x40), /* wMaxPacketSize */
WBVAL(HID_INPUT_REPORT_BYTES),
0x1, /* 32ms */ /* bInterval */
/* Endpoint, HID Interrupt Out */
USB_ENDPOINT_DESC_SIZE, /* bLength */
USB_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */
// USB_ENDPOINT_OUT(1), /* bEndpointAddress */
USB_ENDPOINT_OUT(EP), /* bEndpointAddress */
USB_ENDPOINT_TYPE_INTERRUPT, /* bmAttributes */
// USB_ENDPOINT_TYPE_BULK,
// WBVAL(0x0040), /* wMaxPacketSize */
WBVAL(HID_OUTPUT_REPORT_BYTES),
0x1, /* 32ms */ /* bInterval */
/* Terminator */
0 /* bLength */
};
/*
// USB String Descriptor (optional)
const uint8_t USB_StringDescriptor[] = {
// Index 0x00: LANGID Codes
0x04, // bLength
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
WBVAL(0x0409), // US English // wLANGID
// Index 0x01: Manufacturer
(13*2 + 2), // bLength (13 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'N',0,
'X',0,
'P',0,
' ',0,
'S',0,
'E',0,
'M',0,
'I',0,
'C',0,
'O',0,
'N',0,
'D',0,
' ',0,
// Index 0x02: Product
(18*2 + 2), // bLength ( 16 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'S',0,
'M',0,
' ',0,
'U',0,
'S',0,
'B',0,
' ',0,
'D',0,
'a',0,
'q',0,
'\n',0,
'v',0,
'1',0,
'.',0,
'0',0,
'1',0,
'3',0,
' ',0,
// Index 0x03: Serial Number
(12*2 + 2), // bLength (12 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'D',0,
'E',0,
'M',0,
'O',0,
'0',0,
'0',0,
'0',0,
'0',0,
'0',0,
'0',0,
'0',0,
'0',0,
// Index 0x04: Interface 0, Alternate Setting 0
( 3*2 + 2), // bLength (6 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'H',0,
'I',0,
'D',0,
};
*/
// USB String Descriptor (optional)
const uint8_t USB_StringDescriptor[] = {
// Index 0x00: LANGID Codes
0x04, // bLength
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
WBVAL(0x0409), // US English // wLANGID
// Index 0x01: Manufacturer
(13*2 + 2), // bLength (13 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'S',0,
'M',0,
' ',0,
'P',0,
'V',0,
'T',0,
' ',0,
'L',0,
'T',0,
'D',0,
' ',0,
' ',0,
' ',0,
// Index 0x02: Product
(6*2 + 2), // bLength ( 16 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'S',0,
'M',0,
'D',0,
'a',0,
'q',0,
'8',0,
// Index 0x03: Serial Number
(4*2 + 2), // bLength (12 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'1',0,
'N',0,
'1',0,
'6',0,
// Index 0x04: Interface 0, Alternate Setting 0
( 3*2 + 2), // bLength (6 Char + Type + lenght)
USB_STRING_DESCRIPTOR_TYPE, // bDescriptorType
'H',0,
'I',0,
'D',0,
};