pub struct UsagePage(/* private fields */);Expand description
Unsigned integer specifying the current Usage Page.
Since a usage are 32 bit values, Usage Page items can be used to conserve space in a report descriptor by setting the high order 16 bits of a subsequent usages. Any usage that follows which is defines 16 bits or less is interpreted as a Usage ID and concatenated with the Usage Page to form a 32 bit Usage.
§Data (Little Endian)
- 0x00: Undefined
- 0x01: Generic Desktop
- 0x02: Simulation Controls
- 0x03: VR Controls
- 0x04: Sport Controls
- 0x05: Game Controls
- 0x06: Generic Device Controls
- 0x07: Keyboard/Keypad
- 0x08: LED
- 0x09: Button
- 0x0A: Ordinal
- 0x0B: Telephony Device
- 0x0C: Consumer
- 0x0D: Digitizer
- 0x0E: Haptics
- 0x0F: PID
- 0x10: Unicode
- 0x12: Eye and Head Trackers
- 0x14: Auxiliary Display
- 0x20: Sensors
- 0x40: Medical Instrument
- 0x41: Braille Display
- 0x59: Lighting And Illumination
- 0x80-0x83: Monitor
- 0x84-0x87: Power
- 0x8C: Bar Code Scanner
- 0x8D: Scale
- 0x8E: Magnetic Stripe Reading
- 0x8F: Reserved Point of Sale
- 0x90: Camera Control
- 0x91: Arcade
- 0x92: Gaming Device
- 0xF1D0: FIDO Alliance
- 0xFF00-x0FFFF: Vendor Defined
- Other: Reserved
Implementations§
Source§impl UsagePage
impl UsagePage
Sourcepub const PREFIX: u8 = 4u8
pub const PREFIX: u8 = 4u8
Prefix consists of tag(bit 7-4), type(bit 3-2) and size(bit 1-0).
The “size” part is set to 00 in this constant value.
Sourcepub unsafe fn new_unchecked(raw: &[u8]) -> Self
pub unsafe fn new_unchecked(raw: &[u8]) -> Self
Sourcepub fn new_with(data: &[u8]) -> Result<Self, HidError>
pub fn new_with(data: &[u8]) -> Result<Self, HidError>
Create an item with specific data.
NOTE: data size must be: 0, 1, 2 or 4.
Trait Implementations§
impl Eq for UsagePage
impl StructuralPartialEq for UsagePage
Auto Trait Implementations§
impl Freeze for UsagePage
impl RefUnwindSafe for UsagePage
impl Send for UsagePage
impl Sync for UsagePage
impl Unpin for UsagePage
impl UnwindSafe for UsagePage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more