Trait lc3_ensemble::sim::io::IODevice
source · pub trait IODevice {
// Required methods
fn io_read(&self, addr: u16) -> Option<u16>;
fn io_write(&self, addr: u16, data: u16) -> bool;
fn close(self);
}Expand description
An IO device that can be read/written to.
Required Methods§
sourcefn io_read(&self, addr: u16) -> Option<u16>
fn io_read(&self, addr: u16) -> Option<u16>
Reads the data at the given memory-mapped address.
If successful, this returns the value returned from that address.
If unsuccessful, this returns None.