pub enum LiveBackend {
Mmio(MappedMmio),
State(StateBank),
Gpio(FuchsiaGpio),
I2c(FuchsiaI2c),
Spi(FuchsiaSpi),
Clock(FuchsiaClock),
Reset(FuchsiaReset),
Serial(FuchsiaSerial),
Interrupt,
}Expand description
Heterogeneous live hardware backend covering MMIO, software state banks, GPIO, I2C, SPI, Clock, Reset, Serial, and Interrupts.
Variants§
Mmio(MappedMmio)
State(StateBank)
Gpio(FuchsiaGpio)
I2c(FuchsiaI2c)
Spi(FuchsiaSpi)
Clock(FuchsiaClock)
Reset(FuchsiaReset)
Serial(FuchsiaSerial)
Interrupt
Trait Implementations§
Source§impl Debug for LiveBackend
impl Debug for LiveBackend
Source§impl ResourceBackend for LiveBackend
impl ResourceBackend for LiveBackend
fn read32(&mut self, offset: u64) -> Result<u32, BackendError>
fn write32(&mut self, offset: u64, value: u32) -> Result<(), BackendError>
fn barrier(&mut self)
fn gpio_read(&mut self) -> Result<bool, BackendError>
fn gpio_write(&mut self, value: bool) -> Result<(), BackendError>
fn i2c_transfer( &mut self, write_data: &[u8], read_length: usize, ) -> Result<Vec<u8>, BackendError>
fn spi_transmit(&mut self, tx_data: &[u8]) -> Result<Vec<u8>, BackendError>
fn clock_enable(&mut self) -> Result<(), BackendError>
fn clock_disable(&mut self) -> Result<(), BackendError>
fn clock_is_enabled(&mut self) -> Result<bool, BackendError>
fn clock_set_rate(&mut self, hz: u64) -> Result<(), BackendError>
fn clock_query_rate(&mut self, hz_in: u64) -> Result<u64, BackendError>
fn clock_get_rate(&mut self) -> Result<u64, BackendError>
fn reset_assert(&mut self) -> Result<(), BackendError>
fn reset_deassert(&mut self) -> Result<(), BackendError>
fn reset_toggle(&mut self) -> Result<(), BackendError>
fn reset_status(&mut self) -> Result<bool, BackendError>
fn serial_read(&mut self) -> Result<Vec<u8>, BackendError>
fn serial_write(&mut self, data: &[u8]) -> Result<(), BackendError>
Auto Trait Implementations§
impl !RefUnwindSafe for LiveBackend
impl !UnwindSafe for LiveBackend
impl Freeze for LiveBackend
impl Send for LiveBackend
impl Sync for LiveBackend
impl Unpin for LiveBackend
impl UnsafeUnpin for LiveBackend
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more