"The passed ACL did not contain the minimum required information." says the "Problem Status" on.
I´m a slightly changed version of the "2 player gamepad" descriptor available on this tutorial:
http://eleccelerator.com/tutorial-about ... scriptors/
My controller is a dual arcade one so each player have 14 buttons, so my descriptor goes like this:
Code: Select all
PROGMEM const char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] =
{
//Gamepad 1 (34 bytes)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x05, // USAGE (Game Pad)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x00, // COLLECTION (Physical)
0x85, 0x01, // RERPOT_ID (1)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x0e, // USAGE_MAXIMUM (Button 14)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x95, 0x0e, // REPORT_COUNT (14)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x06, // REPORT_COUNT (2)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
//Gamepad 2 (34 bytes)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x05, // USAGE (Game Pad)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x00, // COLLECTION (Physical)
0x85, 0x02, // REPORT_ID (2)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x0e, // USAGE_MAXIMUM (Button 14)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x0e, // REPORT_COUNT (14)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x06, // REPORT_COUNT (2)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
My reports goes like this:
Code: Select all
bufferToUse[0] = 1;
bufferToUse[1] = buttonsPlayer1[0];
bufferToUse[2] = buttonsPlayer1[1];
bufferToUse[3] = 2;
bufferToUse[4] = buttonsPlayer2[0];
bufferToUse[5] = buttonsPlayer2[1];
The reportBuffer DATABUFSIZE is set to 6
Code: Select all
static uchar reportBuffer[DATABUFSIZE];
and the usbFunctionSetup goes like this:
Code: Select all
uchar usbFunctionSetup(uchar data[8])
{
usbRequest_t* usbReq = (usbRequest_t *) data;
usbMsgPtr = reportBuffer;
if((usbReq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS)
{
// Class request type
if(usbReq->bRequest == USBRQ_HID_GET_REPORT)
{
// wValue: ReportType (highbyte), ReportID (lowbyte)
// We only have one report type, so don't look at wValue
buildReport(FALSE);
return sizeof(reportBuffer);
}
else if(usbReq->bRequest == USBRQ_HID_GET_IDLE)
{
usbMsgPtr = &idleRate;
return 1;
}
else if(usbReq->bRequest == USBRQ_HID_SET_IDLE)
{
idleRate = usbReq->wValue.bytes[1];
}
}
else
{
// No vendor specific requests implemented
}
return 0;
}
I´ve used the Boxter project, by Olof Holmgren, as a safe place to start. Any ideas?