zynq-rs/libsupport_zynq/src/abort.rs
2020-01-30 22:54:48 +01:00

22 lines
413 B
Rust

use libboard_zynq::{println, slcr, stdio};
#[no_mangle]
pub unsafe extern "C" fn PrefetchAbort() {
stdio::drop_uart();
println!("PrefetchAbort");
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
loop {}
}
#[no_mangle]
pub unsafe extern "C" fn DataAbort() {
stdio::drop_uart();
println!("DataAbort");
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
loop {}
}