From 0eaa0de3c602761d78f4110f7d882c8b9b72bcd0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 27 Aug 2018 22:52:02 +0200 Subject: [PATCH] update the minimal example --- examples/minimal.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/examples/minimal.rs b/examples/minimal.rs index db91840..e174f0d 100644 --- a/examples/minimal.rs +++ b/examples/minimal.rs @@ -15,14 +15,6 @@ //! define a panicking behavior is to link to a [panic handler crate][0] //! //! [0]: https://crates.io/keywords/panic-impl -//! -//! - Define the `HardFault` handler using the [`exception!`] macro. This handler (function) is -//! called when a hard fault exception is raised by the hardware. -//! -//! [`exception!`]: https://docs.rs/cortex-m-rt/~0.5/cortex_m_rt/macro..html -//! -//! - Define a default handler using the [`exception!`] macro. This function will be used to handle -//! all interrupts and exceptions which have not been assigned a specific handler. #![no_main] // <- IMPORTANT! #![no_std] @@ -47,17 +39,3 @@ fn main() -> ! { asm::bkpt(); } } - -// define the hard fault handler -exception!(HardFault, hard_fault); - -fn hard_fault(ef: &ExceptionFrame) -> ! { - panic!("HardFault at {:#?}", ef); -} - -// define the default exception handler -exception!(*, default_handler); - -fn default_handler(irqn: i16) { - panic!("Unhandled exception (IRQn = {})", irqn); -}