pub struct Output(/* private fields */);Expand description
Refers to the data to one or more similar controls on a device such as setting the position of a single axis or a group of levers (variable data). Or, it can represent data to one or more LEDs (array data).
§Data (Little-Endian)
- Bit 0: Data(0) | Constant(1)
- Bit 1: Array(0) | Variable(1)
- Bit 2: Absolute(0) | Relative(1)
- Bit 3: No Wrap(0) | Wrap(1)
- Bit 4: Linear(0) | Non Linear(1)
- Bit 5: Preferred State(0) | No Preferred(1)
- Bit 6: No Null Position(0) | Null State(1)
- Bit 7: Non Volatile(0) | Volatile(1)
- Bit 8: Bit Field(0) | Buffered Bytes(1)
- Bit 31-9: Reserved
Implementations§
Source§impl Output
impl Output
Sourcepub const PREFIX: u8 = 144u8
pub const PREFIX: u8 = 144u8
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 Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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