Not finding much on this but I have something working with strange results.
some examples are
actual data sniffed a,1,1,1 but data seen a,1,3,0
actual data sniffed 5,1,ff,0 but data seen
actual data sniffed 2,1,ff,
actual data sniffed 1,1,15,0
I think maybe I need a wait loop, but unsure how that works.
void HID_Task(void)//Function to manage HID report generation and transmission to the host.
//Device must be connected and configured for the task to run
if (USB_DeviceState != DEVICE_STATE_Configured)
if (Endpoint_IsOUTReceived())//we received something on the OUT endpoint.
if (Endpoint_IsReadWriteAllowed())// packet has data, react to it.
uint8_t GenericData; // temporary buffer
uint8_t out_wait_report_bytes = 0;
Endpoint_Read_Stream_LE(&GenericData, sizeof(GenericData), NULL);// Read in to buffer
FfbProcessor(OutReportSize[ GenericData -1 ], &GenericData);
Endpoint_ClearOUT();//acknowledge an OUT packet on this endpoint.