2つの異なるレポートは、同じ割り込みパイプを使用して通過するため、常に順番にレポートされます。
Bootプロトコルのキーボードとマウスレポートを使用する必要がない場合は、マウスとキーボードの両方のデータを含む単一のレポートを記述するカスタムレポート記述子を設計できます。これにより、両方のデータセットを同期して送信することができます。
ポーリング間隔を短くすることは簡単ですが、
例レポートディスクリプタ:
0x05, 0x01, // UsagePage (desktop)
0x09, 0x06, // Usage (Keyboard)
0xa1, 0x01, // Collection (Application)
0x85, 0x01, // ReportID (1)
0x25, 0x01, // LogicalMaximum (1)
0x75, 0x01, // ReportSize (1)
0x95, 0x08, // ReportCount (8)
0x05, 0x07, // UsagePage (keyboard)
0x19, 0xe0, // UsageMinimum (LeftControl)
0x29, 0xe7, // UsageMaximum (RightGui)
0x81, 0x02, // Input (Variable)
0x26, 0xdd, 0x00, // LogicalMaximum (221)
0x75, 0x08, // ReportSize (8)
0x95, 0x06, // ReportCount (6)
0x19, 0x00, // UsageMinimum (NoEvent)
0x29, 0xdd, // UsageMaximum (KeypadHexadecimal)
0x81, 0x00, // Input
0x25, 0x01, // LogicalMaximum (1)
0x75, 0x01, // ReportSize (1)
0x95, 0x03, // ReportCount (3)
0x05, 0x08, // UsagePage (led)
0x19, 0x01, // UsageMinimum (NumLock)
0x29, 0x03, // UsageMaximum (ScrollLock)
0x91, 0x02, // Output (Variable)
0x15, 0x81, // LogicalMinimum (-127)
0x25, 0x7f, // LogicalMaximum (127)
0x75, 0x08, // ReportSize (8)
0x95, 0x02, // ReportCount (2)
0x05, 0x01, // UsagePage (desktop)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x81, 0x04, // Input (Relative)
0x15, 0x00, // LogicalMinimum (0)
0x25, 0x01, // LogicalMaximum (1)
0x75, 0x01, // ReportSize (1)
0x95, 0x03, // ReportCount (3)
0x05, 0x09, // UsagePage (button)
0x19, 0x01, // UsageMinimum (Button(1))
0x29, 0x03, // UsageMaximum (Button(3))
0x81, 0x02, // Input (Variable)
0xc0, // EndCollection
これは説明:
Data Byte : [0 ][1 .. 6][7 ][8 ][9 ]
Data : [Modifiers][Keys ][Mouse dx][Mouse dy][Mouse Btns]
を含む出力レポート#1:
を含む
「マウス」と定義されたフィールド「使用法」でトップレベルのコレクションを作成していない限り、ホストがHIDマウスデバイスをロードしないと思っていました。私はあなたの解決策を試し、それが動作するかどうかを知らせます。ありがとう! – ismarlowe