diff options
Diffstat (limited to 'cortex-m-rt/examples/unsafe-exception.rs')
-rw-r--r-- | cortex-m-rt/examples/unsafe-exception.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cortex-m-rt/examples/unsafe-exception.rs b/cortex-m-rt/examples/unsafe-exception.rs new file mode 100644 index 0000000..4212610 --- /dev/null +++ b/cortex-m-rt/examples/unsafe-exception.rs @@ -0,0 +1,16 @@ +#![deny(warnings)] +#![no_main] +#![no_std] + +extern crate cortex_m_rt; +extern crate panic_halt; + +use cortex_m_rt::{entry, exception}; + +#[entry] +fn foo() -> ! { + loop {} +} + +#[exception] +unsafe fn SysTick() {} |