mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
depracate use of SIE by storing SIM to RAM-based backing
This commit is contained in:
parent
4ecd7c06ac
commit
77c44ccb76
1 changed files with 5 additions and 2 deletions
|
|
@ -18,14 +18,17 @@ extern "C" {
|
||||||
fn flush_mmu();
|
fn flush_mmu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// use RAM-based backing so this variable is automatically saved on suspend
|
||||||
|
static mut SIM_BACKING: usize = 0;
|
||||||
/// Disable external interrupts
|
/// Disable external interrupts
|
||||||
pub fn disable_all_irqs() {
|
pub fn disable_all_irqs() {
|
||||||
unsafe { sie::clear_sext() };
|
unsafe{SIM_BACKING = sim::read()};
|
||||||
|
sim::write(0x0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable external interrupts
|
/// Enable external interrupts
|
||||||
pub fn enable_all_irqs() {
|
pub fn enable_all_irqs() {
|
||||||
unsafe { sie::set_sext() };
|
sim::write(unsafe{SIM_BACKING});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn enable_irq(irq_no: usize) {
|
pub fn enable_irq(irq_no: usize) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue