最終更新:2014-08-28 (木) 07:20:15 (1818d)  

レポートディスクリプタ/Usage はてなブックマークを見る

メモ

定義

  • Usage index for an item usage; represents a suggested usage for the item or collection.
  • In the case where an item represents multiple controls, a Usage tag may suggest a usage for every variable or element in an array.

メモ

  • a Usage tag indicates the vendor’s suggested use for a specific control or group of controls.
  • There is a one-to-one correspondence between usages and controls, one usage control defined in the descriptor.

配列

  • XYとボタンが配列になってる?

3ボタンマウスの例

  • 05 01  G Usage Page (Generic Desktop), ;Use the Generic Desktop Usage Page
    09 02  L Usage (Mouse),  
    A1 01  M Collection (Application), ;Start Mouse collection
    09 01  L  Usage (Pointer),  
    A1 00  M  Collection (Physical), ;Start Pointer collection
    05 09  G   Usage Page (Buttons), 
    19 01  L   Usage Minimum (01), 
    29 03  L   Usage Maximum (03), ;3 Button
    15 00  G   Logical Minimum (0),  
    25 01  G   Logical Maximum (1), ;Fields return values from 0 to 1
    95 03  G   Report Count (3),  ;Create three 1 bit fields (button 1, 2, & 3)
    75 01  G   Report Size (1), 
    81 02  M   Input (Data, Variable, Absolute), ;3 button bits 
    95 01  G   Report Count (1), 
    75 05  G   Report Size (5), ;Create 5 bit constant field
    81 01  M   Input (Constant),   ;5 bit padding 
    05 01  G   Usage Page (Generic Desktop), 
    09 30  L   Usage (X),  
    09 31  L   Usage (Y), 
    15 81  G   Logical Minimum (-127),  
    25 7F  G   Logical Maximum (127),  ;Fields return values from -127 to 127
    75 08  G   Report Size (8),  
    95 02  G   Report Count (2),   ;Create two 8 bit fields (X & Y position)
    81 06  M   Input (Data, Variable, Relative), ;2 position bytes (X & Y) 
    C0     M  End Collection,  ;Close Pointer collection
    C0     M End Collection ;Close Mouse collection
    バイト012
    ビット765432107654321076543210
    UsagePaddingボタン3ボタン2ボタン1XY

定義

その他

  • Usage X
    Usage Y
  • みたいに連続で定義できる。