pub enum UninitChip {
Partially {
status: InitStatus,
underlying: Chip,
},
Initialized(Chip),
}
Expand description
Represents a chip object which may or may not be initialized.
Variants§
Partially
A partially initialized chip, it may be unsafe (0xffffffff errors) to interact with this chip.
Fields
§
status: InitStatus
Contains the init status
Initialized(Chip)
The chip is fine and can be safely upgraded.
Implementations§
Source§impl UninitChip
impl UninitChip
pub fn new(status: InitStatus, chip: &Chip) -> Self
pub fn status(&self) -> Option<&InitStatus>
Sourcepub fn init<E>(
self,
init_callback: &mut impl FnMut(ChipDetectState<'_>) -> Result<(), E>,
) -> Result<Chip, InitError<E>>
pub fn init<E>( self, init_callback: &mut impl FnMut(ChipDetectState<'_>) -> Result<(), E>, ) -> Result<Chip, InitError<E>>
Initialize the chip, if init fails at this point then we return a result instead of an UninitChip.
pub fn upgrade(self) -> Chip
pub fn try_upgrade(&self) -> Option<&Chip>
pub fn is_initialized(&self) -> bool
pub fn is_healthy(&self) -> Option<bool>
pub fn arc_alive(&self) -> bool
pub fn dram_safe(&self) -> bool
pub fn eth_safe(&self) -> bool
pub fn cpu_safe(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UninitChip
impl !RefUnwindSafe for UninitChip
impl Send for UninitChip
impl Sync for UninitChip
impl Unpin for UninitChip
impl !UnwindSafe for UninitChip
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