I have ported the lpcusblib_GenericHidDevice project to my own board, LPC11u37 based. I have encountered a few issues:
1. As an LPCXpresso project it seems to run fine, both with USE_USB_ROM_STACK enabled and disabled, but as an IAR project, when I enable the USE_USB_ROM_STACK flag I get a HardFault exception due to an unaligned access somewhere in the internal rom driver (it does work correctly with this flag disabled, i.e. with the alternative USB drivers in C files)?
2. I wanted to use the EVENT_USB_Device_Connect() and EVENT_USB_Device_Disconnect() routines, but realized nobody ever called them, so they would get optimized away and never fire?
3. I needed to modify the HID descriptors and operation to communicate with the host using EP1 IN and OUT, rather then using reports over EP0. After I modified the original interface descriptor, which only used HID_ReportINEndpoint but no HID_ReportOUTEndpoint, by adding an additional EP in the HID interface descriptors, the HIDClient.exe utility failed to communicate with the application. After digging through the code, I encountered the following remark in file HIDClassDevice.h:
" * @note Due to technical limitations, the HID device class driver does not utilize a separate OUT
* endpoint for host->device communications. Instead, the host->device data (if any) is sent to
* the device via the control endpoint."
Is that a silicon problem, or a software issue that might get fixed in a future update?