Trait spectrusty::peripherals::bus::joystick::JoystickDevice
source · pub trait JoystickDevice: Debug {
fn port_read(&self, port: u16) -> u8;
fn port_write(&mut self, _port: u16, _data: u8) -> bool { ... }
}
Expand description
A joystick device interface for the joystick bus device implementations.
Required Methods§
Provided Methods§
sourcefn port_write(&mut self, _port: u16, _data: u8) -> bool
fn port_write(&mut self, _port: u16, _data: u8) -> bool
Writes data to a joystick device.
If a device does not support writes, this method should return false
.
The default implementation does exactly just that.