Hi All, I followed http://www.keil.com/forum/docs/thread11649.asp to try add 4 in endpoints with 64 byte data length on my MCB2300(LPC2368)board, But it can not be recognized. I can not fig it out what mistaks I made. My modified codes here based on the example USB_HID.
1.usbdesc.c
#include "type.h" #include "usb.h" #include "hid.h" #include "usbcfg.h" #include "usbdesc.h" #define INREPORT_SIZE 64 #define OUTREPORT_SIZE 64 /* HID Report Descriptor */ const BYTE HID_ReportDescriptor0[] = { HID_UsagePageVendor(0x00), HID_Usage(0x01), HID_Collection(HID_Application), HID_UsagePage(HID_USAGE_PAGE_BUTTON), HID_UsageMin(1), HID_UsageMax(3), HID_LogicalMin(0), HID_LogicalMax(1), //HID_ReportCount(3), //HID_ReportSize(1), HID_ReportCount( INREPORT_SIZE ), // bytes HID_ReportSize(8), // bits HID_Input(HID_Data | HID_Variable | HID_Absolute), //HID_ReportCount(1), //HID_ReportSize(5), //HID_Input(HID_Constant), HID_UsagePage(HID_USAGE_PAGE_LED), HID_Usage(HID_USAGE_LED_GENERIC_INDICATOR), HID_LogicalMin(0), HID_LogicalMax(1), HID_ReportCount(OUTREPORT_SIZE), HID_ReportSize(8), HID_Output(HID_Data | HID_Variable | HID_Absolute), HID_EndCollection, }; const BYTE HID_ReportDescriptor1[] = { HID_UsagePageVendor(0x00), HID_Usage(0x01), HID_Collection(HID_Application), HID_UsagePage(HID_USAGE_PAGE_BUTTON), HID_UsageMin(1), HID_UsageMax(3), HID_LogicalMin(0), HID_LogicalMax(1), //HID_ReportCount(3), //HID_ReportSize(1), HID_ReportCount( INREPORT_SIZE ), // bytes HID_ReportSize(8), // bits HID_Input(HID_Data | HID_Variable | HID_Absolute), //HID_ReportCount(1), //HID_ReportSize(5), //HID_Input(HID_Constant), HID_UsagePage(HID_USAGE_PAGE_LED), HID_Usage(HID_USAGE_LED_GENERIC_INDICATOR), HID_LogicalMin(0), HID_LogicalMax(1), HID_ReportCount(OUTREPORT_SIZE), HID_ReportSize(8), HID_Output(HID_Data | HID_Variable | HID_Absolute), HID_EndCollection, };