mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-06-03 05:59:23 +00:00
18 lines
421 B
Rust
18 lines
421 B
Rust
|
#![no_std]
|
||
|
|
||
|
use panic_probe as _;
|
||
|
|
||
|
// same panicking *behavior* as `panic-probe` but doesn't print a panic message
|
||
|
// this prevents the panic message being printed *twice* when `defmt::panic` is invoked
|
||
|
#[defmt::panic_handler]
|
||
|
fn panic() -> ! {
|
||
|
cortex_m::asm::udf()
|
||
|
}
|
||
|
|
||
|
/// Terminates the application and makes `probe-run` exit with exit-code = 0
|
||
|
pub fn exit() -> ! {
|
||
|
loop {
|
||
|
cortex_m::asm::bkpt();
|
||
|
}
|
||
|
}
|