rust-raspberrypi-OS-tutorials/02_runtime_init/src/panic_wait.rs

14 lines
286 B
Rust
Raw Normal View History

2019-11-25 18:54:05 +00:00
// SPDX-License-Identifier: MIT OR Apache-2.0
2019-09-21 22:32:54 +00:00
//
2020-01-01 23:41:03 +00:00
// Copyright (c) 2018-2020 Andre Richter <andre.o.richter@gmail.com>
2019-09-21 22:32:54 +00:00
//! A panic handler that infinitely waits.
2020-03-28 12:27:23 +00:00
use crate::cpu;
2019-09-21 22:32:54 +00:00
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
2020-03-28 12:27:23 +00:00
cpu::wait_forever()
2019-09-21 22:32:54 +00:00
}