Part Number: MSP-EXP430F5529LP
I'm trying to create a USB gamepad interface in windows using the MSP430dev package resources.
At this point I'm able to have a single HID gamepad interface working correctly. Unfortunately I'm stuck trying to use the same implementation to get 2 HID interfaces for dual gamepad.
I've looked up the "HH1_hidDemo2hidDemo" example as well as re-generated the decriptors files using the decriptor tool, defining 2 HID devices.
I've added the Report ID and numerated as "0x85, 0x01" and 0x85, 0x02, // REPORT_ID (Vendor defined) respectively. I am sending the ID over the USBreport accordingly.
typedef struct {
uint8_t id;
uint8_t btn;
int8_t dx;
int8_t dy;
int8_t dz;
int8_t drx;
} GAMEPAD_REPORT;
uint16_t const report_desc_size[HID_NUM_INTERFACES] =
{
48,
48
};
uint8_t const report_len_input[HID_NUM_INTERFACES] =
{
6,
6
};
int8_t const report_desc_HID0[]=
{
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x05, // USAGE (Game Pad)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x00, // COLLECTION (Physical)
0x85, 0x01, // REPORT_ID (Vendor defined)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x08, // USAGE_MAXIMUM (Button 8)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x95, 0x08, // REPORT_COUNT (8)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x09, 0x32, // USAGE (Z)
0x09, 0x33, // USAGE (Rx)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x04, // REPORT_COUNT (4)
0x81, 0x02, // INPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
The result is that the host (win PC) still recognizes only ONE gamepad device. It seems that the host is not enumarating correctly the second device for some reason.
Has anyone got a clue, facing the same problem or maybe succesfully implemented something similar?
Any help is appreciated.
Thanks
Shaun

