Struct ps2_mouse::Mouse [−][src]
pub struct Mouse { /* fields omitted */ }
Expand description
A basic interface to interact with a PS2 mouse.
Implementations
impl Mouse
[src]
impl Mouse
[src]pub fn get_state(&self) -> MouseState
[src]
pub fn get_state(&self) -> MouseState
[src]Returns the last completed state of the mouse.
pub fn init(&mut self) -> Result<(), &'static str>
[src]
pub fn init(&mut self) -> Result<(), &'static str>
[src]Attempts to initialize a Mouse
. If successful, interrupts will be generated
as PIC offset + 12
.
pub fn process_packet(&mut self, packet: u8)
[src]
pub fn process_packet(&mut self, packet: u8)
[src]Attempts to process a packet.
pub fn set_on_complete(&mut self, handler: fn(_: MouseState))
[src]
pub fn set_on_complete(&mut self, handler: fn(_: MouseState))
[src]Sets the on_complete
function to be called when a packet is completed.