検索条件
全1件
(1/1ページ)
階層だてて理解していく必要があるが,とりあえずはメモレベルで残す.
Usage Page | データの使い方または機能の定義 |
論理的最小値 | アイテムがレポートする値の最小値 |
論理的最大値 | アイテムがレポートする値の最大値 |
物理的最小値 | 論理的最小値を物理的最小値で示したもの |
物理的最大値 | 論理的最大値を物理的最大値で示したもの |
3.1 HID Usage Table Conventions 32'hxxxx ::= { Usage Page(16bit) , Usage ID(16bit) } 3.3 Usages and Units When declaring Units for a main item, the Logical Minimum, Logical Maximum, Physical Minimum, Physical Maximum, and Unit Exponent items must also be declared. 3.4 Usage Types control type( LC(Linear Control),OOC(On/Off Control),MC(Momentary Control)など)により, Logical Min - Maxの範囲設定例と動作概要の説明 3.4.1 Usage Types (Controls) Linear Control(LC) On/Off Control(OOC) Momentary Control(MC) One Shot Control(OSC) Re-trigger Control(RTC) 3.4.2 Usage Types (Data)
Type | Flags | Description |
---|---|---|
Selector (Sel) | Array | Contained in a Named Array (NAry). |
Static Value (SV) | Constant, Variable, Absolute | A read-only multiple-bit value. |
Static Flag (SF) | Constant, Variable, Absolute | A read-only single-bit value. |
Dynamic Value (DV) | Data, Variable, Absolute | A read/write multiple-bit value. |
Dynamic Flag (DF) | Data, Variable, Absolute | A read/write single-bit value. |
4 Generic Desktop Page (0x01) |* Usage ID |* Usage Name |* Usage Type |* Section8 Hut1_12.pdf 4.3.1 Resolution Multiplier
Effective Resolutiuon Multiplierは,以下の式で求められる.
where RMV = Resolution Multiplier Value, LMin = Logical Minimum, LMax = Logical Maximum, ssPMin = Physical Minimum, and PMax = Physical Maximum
Collection (Logical) Usage Page Generic Desktop (0x01) Usage Resolution Multiplier (0x48) Logical Minimum 0 Logical Maximum 15 Physical Minimum 1 Physical Maximum 16 Report Size 4 Report Count 1 Feature (Data, Var, Abs) <- featureコマンドで, 1-16を受け付ける. Usage Page Generic Desktop (0x01) Usage (Wheel) (0x38) Logical Minimum -127 Logical Maximum 127 Report Count 1 Report Size 8 Input (Data, Var, Rel) End Collection ||< *参考-usb.orgの仕様から HID Report Descriptorを消化してみる. どう読めばよいか,という視点で確認. [http://www.computer-engineering.org/index.php?title=USB_HID_Notes:ここ]も参考にした. キーボードの例 >|| Usage Page (Generic Desktop), Usage (Keyboard), Collection (Application), Report Size (1), Report Count (8), Usage Page (Key Codes), // KeyCodeを示すことを宣言 Usage Minimum (224), //ID224-231を size=1(bit) x 8個 に割り当てる. Usage Maximum (231), // Logical Minimum (0), //押下状態0/1を定義 Logical Maximum (1), // Input (Data, Variable, Absolute), ;Modifier byte Report Count (1), Report Size (8), Input (Constant), ;Reserved byte Report Count (5), // 5個 Report Size (1), // 1bit Usage Page (LEDs), // Usage Minimum (1), // 1~5 Usage Maximum (5), // Output (Data, Variable, Absolute), ;LED report Report Count (1), Report Size (3), Output (Constant), ;LED report padding Report Count (6), // 6個 Report Size (8), // 8bitサイズ Logical Minimum (0), // 0~ Logical Maximum(255), // 255 Usage Page (Key Codes), // KeyCodeを示すことを宣言 Usage Minimum (0), // 0~ Usage Maximum (255), // 255 このUsage min/maxと冒頭のmin/maxでかなり意味が違う気がする. Array型だからいいように把握してくれるのかな.. Input (Data, Array), // 反映. End Collection
1バイト目でUsage Min/Maxを指定しているのは,下記押下状態を通知するためと考えられる(未確認)
Usage ID(Dec) | Usage ID(Hex) | Usage Name |
---|---|---|
224 | E0 | Keyboard LeftControl |
225 | E1 | Keyboard LeftShift |
226 | E2 | Keyboard LeftAlt |
227 | E3 | Keyboard Left GUI |
228 | E4 | Keyboard RightControl |
229 | E5 | Keyboard RightShift |
230 | E6 | Keyboard RightAlt |
231 | E7 | Keyboard Right GUI |
Usage(LED)'s valueは以下のとおり.これをデバイス側で受けて,LEDのon/off制御をおこなう..のだろう.
01 | Num Lock |
02 | Caps Lock |
03 | Scroll Lock |
04 | Compose |
05 | Kana |