Author Topic: How to include a 2nd input report page  (Read 4766 times)

locodog

  • Member
  • ***
  • Posts: 8
How to include a 2nd input report page
« on: March 03, 2014, 05:29:51 pm »
I've managed to get a diy device transmitting a 64 byte input report, if possible I would like to increase this to 2 input reports. I am not too sure as to how to go about this,
(All though it says gamepad its actual usage is a DJ software controller and works on rawInput)

Something has to happen to the report descriptor, and I'd have to include my extra inputs in the firmware code but is there more to it then that?
Code: [Select]
static const uint8_t PROGMEM gamepad_hid_report_desc[] = {
0×05, 0×01, // USAGE_PAGE (Generic Desktop)
0×09, 0×05, // USAGE (Gamepad)
0xa1, 0×01, // COLLECTION (Application)
0×15, 0×00, // LOGICAL_MINIMUM (0)
0×25, 0×01, // LOGICAL_MAXIMUM (1)
0×35, 0×00, // PHYSICAL_MINIMUM (0)
0×45, 0×01, // PHYSICAL_MAXIMUM (1)
0×75, 0×01, // REPORT_SIZE (1)
0×95, 0×80, // REPORT_COUNT (128)
0×05, 0×09, // USAGE_PAGE (Button)
0×19, 0×01, // USAGE_MINIMUM (Button 1)
0×29, 0×80, // USAGE_MAXIMUM (Button 128)
0×81, 0×02, // INPUT (Data,Var,Abs)
0×05, 0×01, // USAGE_PAGE (Generic Desktop)
0×26, 0xff, 0×00, // LOGICAL_MAXIMUM (255)
0×46, 0xff, 0×00, // PHYSICAL_MAXIMUM (255)
0×09, 0×30, // USAGE (X)
0×09, 0×31, // USAGE (Y)
0×09, 0×32, // USAGE (Z)
0×09, 0×35, // USAGE (Rz)
0×09, 0×36, // Usage (Slider)
…….43 more sliders.
0×09, 0×36, // Usage (Slider)
0×75, 0×08, // REPORT_SIZE (8)
0×95, 0×30, // REPORT_COUNT (48)
0×81, 0×02, // INPUT (Data,Var,Abs)
0xc0 // END_COLLECTION
};

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: How to include a 2nd input report page
« Reply #1 on: March 11, 2014, 09:37:12 pm »
To support two Input reports, each must have a Report ID > zero. Or add a Feature report.