I have some code here that works unless I use
Endpoint_Read_Control_Stream_LE
See the comment line, if I uncomment that line me debug never shows up. Its like the line is stalling my code. With the line commented out like I have it I get
debug1 4 (expect as that is the report length)
debug2 garbage data (expected)
case HID_REQ_SetReport:
if ( USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{
Endpoint_ClearStatusStage();
Endpoint_ClearSETUP();
if ( ReportType == FEATURE )
{
if (ReportID == CREATE_NEW_EFFECT_REPORT )
{
uint16_t ValueLength = USB_ControlRequest.wLength;
uint8_t Value[ValueLength];
// Endpoint_Read_Control_Stream_LE(Value, ValueLength);// Read the report data from the control endpoint
degub1 = ValueLength;
debug2 = Value[ 0 ];
//ffb.currentEffect = data[0];
}
}
if ( ReportType == INPUT )
{
if ( (XINPUT() && ReportID == MAIN_REPORT )
{
Endpoint_Read_Control_Stream_LE &reportBufferX , sizeof(reportBufferX) ); //xinput in data, I think this is for rumble and leds.
}
}
//output is handled in hid_task
Endpoint_ClearIN();
}