Hi. I'm working with LPC 2368 controller and need to write USB HID application. I'm using Keil's example as base and I need to change it to send more bytes from device to PC at once. I've changed the example next way:
usbdesc.c
HID_UsagePage(HID_USAGE_PAGE_DEV_CONTROLS), HID_UsageMin(0), HID_UsageMax(255), HID_Usage(0), HID_LogicalMin(0), HID_LogicalMax(255), HID_ReportCount(USB_SIZE), HID_ReportSize(8), HID_Input(HID_Data | HID_Variable | HID_Absolute),
usbuser.c
BYTE InReport[USB_SIZE]; void USB_EndPoint1 (DWORD event) { switch (event) { case USB_EVT_IN: GetInReport(InReport3) USB_WriteEP(0x81, InReport3, USB_SIZE); break; } }
So the USB_SIZE is showing amout of bytes send to PC at once. And here is my problem: when USB_SIZE<=4 all works fine. When USB_SIZE>4 - PC receives nothing. Am I doing something wrong? Or somebody know how to do it correctly? P.S. USB_MAX_PACKET0 is 64
This forum is currently a bit broken (acknowledged by Keil).
It drops posts. It refuses to show a 'Post' button. It drops the text, resulting in empty posts with only a subject line.