diff options
Diffstat (limited to 'src/device_bus.rs')
-rw-r--r-- | src/device_bus.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/device_bus.rs b/src/device_bus.rs deleted file mode 100644 index 6a04f66..0000000 --- a/src/device_bus.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::*; - -pub trait Device { - fn read(&mut self, port: u8) -> u8; - fn write(&mut self, port: u8, value: u8) -> Option<Signal>; - fn wake(&mut self) -> bool; -} - -impl Device for () { - fn read(&mut self, _: u8) -> u8 { 0 } - fn write(&mut self, _: u8, _: u8) -> Option<Signal> { None } - fn wake(&mut self) -> bool { false } -} - -pub trait DeviceBus { - fn read(&mut self, port: u8) -> u8; - fn write(&mut self, port: u8, value: u8) -> Option<Signal>; - fn wake(&mut self) -> bool; -} |