pub struct VirtIOInput<H: Hal, T: Transport> { /* private fields */ }
Expand description
Virtual human interface devices such as keyboards, mice and tablets.
An instance of the virtio device represents one such input device. Device behavior mirrors that of the evdev layer in Linux, making pass-through implementations on top of evdev easy.
Implementations§
Source§impl<H: Hal, T: Transport> VirtIOInput<H, T>
impl<H: Hal, T: Transport> VirtIOInput<H, T>
Sourcepub fn ack_interrupt(&mut self) -> bool
pub fn ack_interrupt(&mut self) -> bool
Acknowledge interrupt and process events.
Sourcepub fn pop_pending_event(&mut self) -> Option<InputEvent>
pub fn pop_pending_event(&mut self) -> Option<InputEvent>
Pop the pending event.
Sourcepub fn query_config_select(
&mut self,
select: InputConfigSelect,
subsel: u8,
out: &mut [u8],
) -> u8
pub fn query_config_select( &mut self, select: InputConfigSelect, subsel: u8, out: &mut [u8], ) -> u8
Query a specific piece of information by select
and subsel
, and write
result to out
, return the result size.
Sourcepub fn name(&mut self) -> Result<String, Error>
pub fn name(&mut self) -> Result<String, Error>
Queries and returns the name of the device, or an error if it is not valid UTF-8.
Sourcepub fn serial_number(&mut self) -> Result<String, Error>
pub fn serial_number(&mut self) -> Result<String, Error>
Queries and returns the serial number of the device, or an error if it is not valid UTF-8.
Sourcepub fn ids(&mut self) -> Result<DevIDs, Error>
pub fn ids(&mut self) -> Result<DevIDs, Error>
Queries and returns the ID information of the device.
Sourcepub fn prop_bits(&mut self) -> Result<Box<[u8]>, Error>
pub fn prop_bits(&mut self) -> Result<Box<[u8]>, Error>
Queries and returns the input properties of the device.