pub struct AvrSimulator { /* private fields */ }
Implementations§
Source§impl AvrSimulator
impl AvrSimulator
pub fn new(mcu: &str, frequency: u32, firmware: impl AsRef<Path>) -> Self
pub fn step(&mut self) -> StepOutcome
pub fn read_spi(&mut self, id: u8) -> Option<u8>
pub fn write_spi(&mut self, id: u8, byte: u8)
pub fn set_twi_slave(&mut self, id: u8, slave: impl TwiSlave + 'static)
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