pub struct UHIDDevice<T: Read + Write> { /* private fields */ }
Implementations§
Source§impl<T: Read + Write> UHIDDevice<T>
Character misc-device handle for a specific HID device
impl<T: Read + Write> UHIDDevice<T>
Character misc-device handle for a specific HID device
Sourcepub fn send_input(&mut self, data: ArrayVec<[u8; 4096]>) -> Result<usize>
pub fn send_input(&mut self, data: ArrayVec<[u8; 4096]>) -> Result<usize>
The data parameter should contain a data-payload. This is the raw data that you read from your device. The kernel will parse the HID reports.
Sourcepub fn recv_output(&mut self) -> Result<OutputEvent, StreamError>
pub fn recv_output(&mut self) -> Result<OutputEvent, StreamError>
Reads a queued output event. No reaction is required to an output event, but you should handle them according to your needs.
Source§impl UHIDDevice<File>
impl UHIDDevice<File>
Sourcepub fn try_new(params: CreateParams) -> Result<UHIDDevice<File>>
pub fn try_new(params: CreateParams) -> Result<UHIDDevice<File>>
Opens the character misc-device at /dev/uhid
pub fn try_new_with_path( params: CreateParams, path: &Path, ) -> Result<UHIDDevice<File>>
Auto Trait Implementations§
impl<T> Freeze for UHIDDevice<T>where
T: Freeze,
impl<T> RefUnwindSafe for UHIDDevice<T>where
T: RefUnwindSafe,
impl<T> Send for UHIDDevice<T>where
T: Send,
impl<T> Sync for UHIDDevice<T>where
T: Sync,
impl<T> Unpin for UHIDDevice<T>where
T: Unpin,
impl<T> UnwindSafe for UHIDDevice<T>where
T: UnwindSafe,
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