pub trait Flavor {
// Required methods
fn gpio_pin(inner: &Rc<Inner>, pinname: &str) -> Result<Rc<dyn GpioPin>>;
fn get_default_usb_vid() -> u16;
fn get_default_usb_pid() -> u16;
// Provided methods
fn spi_index(_inner: &Rc<Inner>, instance: &str) -> Result<(u8, u8)> { ... }
fn i2c_index(_inner: &Rc<Inner>, instance: &str) -> Result<(u8, Mode)> { ... }
fn load_bitstream(_fpga_program: &FpgaProgram<'_>) -> Result<()> { ... }
fn clear_bitstream(_clear: &ClearBitstream) -> Result<()> { ... }
fn perform_initial_fw_check() -> bool { ... }
}
Expand description
Trait allowing slightly different treatment of USB devices that work almost like a HyperDebug. E.g. C2D2 and Servo micro.
Required Methods§
fn gpio_pin(inner: &Rc<Inner>, pinname: &str) -> Result<Rc<dyn GpioPin>>
fn get_default_usb_vid() -> u16
fn get_default_usb_pid() -> u16
Provided Methods§
fn spi_index(_inner: &Rc<Inner>, instance: &str) -> Result<(u8, u8)>
fn i2c_index(_inner: &Rc<Inner>, instance: &str) -> Result<(u8, Mode)>
fn load_bitstream(_fpga_program: &FpgaProgram<'_>) -> Result<()>
fn clear_bitstream(_clear: &ClearBitstream) -> Result<()>
fn perform_initial_fw_check() -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.