mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
api level changes to allow wdt to move earlier in boot
right now the inability to move the WDT object through the hardware manager is causing it to be initialized fairly late in boot which makes it less useful for recovering from boot failures
This commit is contained in:
parent
47821910dd
commit
8c8ad3ab94
1 changed files with 10 additions and 0 deletions
|
|
@ -207,6 +207,16 @@ impl Wdt {
|
|||
}
|
||||
}
|
||||
|
||||
/// reveals the internal CSR address for the WDT. The recipient of this address must promise
|
||||
/// not to do any concurrent access with the donor; the primary purpose of this method is to
|
||||
/// provide a method for moving the CSR between threads
|
||||
pub unsafe fn to_raw(&self) -> usize { self.csr.base() as usize }
|
||||
|
||||
/// create a WDT from an internal CSR address. The caller must guarantee that the donor
|
||||
/// of the address has released the address, and also that the address is in fact a valid
|
||||
/// mapping for the WDT.
|
||||
pub unsafe fn from_raw(mem: usize) -> Self { Wdt { csr: CSR::new(mem as *mut u32) } }
|
||||
|
||||
// -- Lock helpers ---------------------------------------------------------
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Reference in a new issue