Currently we list out all possible peripherals in a struct. This is not very ergonomic especially when peripherals might not be implemented or parts need to be reused. We should just have a trait to abstract the device under test.
For example:
pub enum Pin {
D0,
D1,
D14,
}
pub trait DeviceUnderTest {
fn get_output(&mut self, pin: Pin) -> Result<impl OutputPin, ()>;
fn get_i2c(&mut self) -> Result<impl I2c, ()>;
}
Currently we list out all possible peripherals in a struct. This is not very ergonomic especially when peripherals might not be implemented or parts need to be reused. We should just have a
traitto abstract the device under test.For example: