[][src]Trait spectrusty::peripherals::bus::mouse::MouseDevice

pub trait MouseDevice: Debug {
    pub fn port_read(&self, port: u16) -> u8;

    pub fn port_write(&mut self, _port: u16, _data: u8) -> bool { ... }
}

A mouse device interface for the mouse bus device implementations.

Required methods

pub fn port_read(&self, port: u16) -> u8[src]

Should return a current mouse state. The port argument can be used to decide which information will be returned - one of the axes or a button state.

Loading content...

Provided methods

pub fn port_write(&mut self, _port: u16, _data: u8) -> bool[src]

Writes data to a mouse device.

If a device does not support writes, this method should return false. The default implementation does exactly just that.

Loading content...

Implementors

impl MouseDevice for KempstonMouseDevice[src]

impl MouseDevice for NullMouseDevice[src]

Loading content...