Hi Nick:
For your case, I would suggest you assign an ''report ID". Each report ID involves one data format. In your application, you need to parse the data according to the report ID.
Below descriptor is copied from other community, you can customize for your own. You need to manually set the report ID before you send the data.
static uint8_t arcade_report_desc[] = {
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x05, // Usage (Game Pad)
0xA1, 0x01, // Collection (Application)
0xA1, 0x00, // Collection (Physical)
0x85, 0x01, // Report ID (1)
0x05, 0x09, // Usage Page (Button)
0x19, 0x01, // Usage Minimum (0x01)
0x29, 0x07, // Usage Maximum (0x07)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0x07, // Report Count (7)
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x01, // Report Count (1)
0x75, 0x01, // Report Size (1)
0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x15, 0x81, // Logical Minimum (129)
0x25, 0x7F, // Logical Maximum (127)
0x95, 0x02, // Report Count (2)
0x75, 0x08, // Report Size (8)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x85, 0x02, // Report ID (2)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x01, // Usage (0x01)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x02, // Usage (0x02)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x03, // Usage (0x03)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x04, // Usage (0x04)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x05, // Usage (0x05)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x06, // Usage (0x06)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x05, 0x0A, // Usage Page (Ordinal)
0x09, 0x07, // Usage (0x07)
0xA1, 0x02, // Collection (Logical)
0x05, 0x08, // Usage Page (LEDs)
0x09, 0x4B, // Usage (Generic Indicator)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0x95, 0x01, // Report Count (1)
0x75, 0x09, // Report Size (9)
0x91, 0x03, // Output (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
0xC0, // End Collection
// 181 bytes
};
Sorry I don't have a document, I will update you if I have, your tutorial about USB HID Report Descriptor is a good one:)
Regards
Daniel