Struct avr_simulator::AvrSimulator
source · pub struct AvrSimulator { /* private fields */ }
Expand description
Bare-bones wrapper for simavr.
Implementations§
source§impl AvrSimulator
impl AvrSimulator
pub fn new(mcu: &str, frequency: u32, firmware: impl AsRef<Path>) -> Self
sourcepub fn step(&mut self) -> StepOutcome
pub fn step(&mut self) -> StepOutcome
Executes a single instruction.
pub fn read_spi(&mut self, id: u8) -> Option<u8>
pub fn write_spi(&mut self, id: u8, byte: u8)
pub fn read_uart(&mut self, id: char) -> Option<u8>
pub fn write_uart(&mut self, id: char, byte: u8)
pub fn get_digital_pin(&mut self, port: char, pin: u8) -> bool
pub fn set_digital_pin(&mut self, port: char, pin: u8, high: bool)
pub fn set_analog_pin(&mut self, pin: u8, voltage: u32)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AvrSimulator
impl RefUnwindSafe for AvrSimulator
impl !Send for AvrSimulator
impl !Sync for AvrSimulator
impl Unpin for AvrSimulator
impl UnwindSafe for AvrSimulator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more