diff options
Diffstat (limited to 'examples/peripherals-taken.rs')
| -rw-r--r-- | examples/peripherals-taken.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/peripherals-taken.rs b/examples/peripherals-taken.rs new file mode 100644 index 0000000..09f9242 --- /dev/null +++ b/examples/peripherals-taken.rs @@ -0,0 +1,18 @@ +#![deny(unsafe_code)] +#![deny(warnings)] +#![no_main] +#![no_std] + +use cortex_m_semihosting::debug; +use panic_semihosting as _; + +#[rtic::app(device = lm3s6965)] +mod app { + #[init] + fn init(_: init::Context) -> init::LateResources { + assert!(cortex_m::Peripherals::take().is_none()); + debug::exit(debug::EXIT_SUCCESS); + + init::LateResources {} + } +} |
