pub struct AlertRegs { /* private fields */ }
Expand description
Register values for alert_handler used in CRC32 calculation.
Implementations§
Source§impl AlertRegs
impl AlertRegs
Sourcepub fn crc32(self) -> u32
pub fn crc32(self) -> u32
Compute the CRC32 of the internal register values to match the value produced by
sw/device/silicon_creator/lib/drivers/alert.h:alert_config_crc32
.
Sourcepub fn try_new<T: OtpRead>(lc_state: LcStateVal, otp: &T) -> Result<Self>
pub fn try_new<T: OtpRead>(lc_state: LcStateVal, otp: &T) -> Result<Self>
Create the set of alert_handler register values from a given lifecycle state and OTP.
The internal fields of AlertRegs
should match those produced on the device after
alert_handler is configured in sw/device/silicon_creator/lib/shutdown.h:shutdown_init
.
Trait Implementations§
impl StructuralPartialEq for AlertRegs
Auto Trait Implementations§
impl Freeze for AlertRegs
impl RefUnwindSafe for AlertRegs
impl Send for AlertRegs
impl Sync for AlertRegs
impl Unpin for AlertRegs
impl UnwindSafe for AlertRegs
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