title: Custom HID device HID report descriptor
body: <p>I have a bit of a problem with generating a HID descriptor.
  I want to use simple reports with ID1 for input and ID2 for output with 64 bytes of data.</p>
  
  <p>I realized that despite RTFMing and googling I still do not have a clue about some fields in HID descriptor.</p>
  
  <p>What is a hint or a manual where I can find the meaning of all descriptor fields? All I could find was examples for HID-mouse, joystick, and keyboard.</p>
  
  <p>For example - REPORT_SIZE - is it size in bytes or in bits? And why is there also REPORT_COUNT?
  If I have 64 bytes in the report, must LOGICAL_MAXIMUM be 255 or 255*64?</p>
  
  <p>Should I write LOGICAL_MAX and MIN for every report or not?</p>
  
  <p>Or maybe will this one (generated rather by guessing) suffice?</p>
  
  <pre><code>char ReportDescriptor[39] = {
      0x05, 0x01,         // USAGE_PAGE (Generic Desktop)
      0x09, 0x00,         // USAGE (Undefined)
      0xa1, 0x01,         // COLLECTION (Application)
      0x85, 0x01,         //   REPORT_ID (1)
      0x09, 0x00,         //   USAGE (Undefined)
      0x15, 0x00,         //   LOGICAL_MINIMUM (0)
      0x26, 0xff, 0x00,   //   LOGICAL_MAXIMUM (255)
      0x75, 0x40,         //   REPORT_SIZE (64)
      0x96, 0x00, 0x02,   //   REPORT_COUNT (512)
      0x81, 0x82,         //   INPUT (Data,Var,Abs,Vol)
      0x85, 0x02,         //   REPORT_ID (2)
      0x09, 0x00,         //   USAGE (Undefined)
      0x15, 0x00,         //   LOGICAL_MINIMUM (0)
      0x26, 0xff, 0x00,   //   LOGICAL_MAXIMUM (255)
      0x75, 0x40,         //   REPORT_SIZE (64)
      0x96, 0x00, 0x02,   //   REPORT_COUNT (512)
      0x91, 0x82,         //   OUTPUT (Data,Var,Abs,Vol)
      0xc0                // END_COLLECTION
  };
  </code></pre>