From c6599f3686741cf46d6460a2400c4f89362f587e Mon Sep 17 00:00:00 2001 From: Jacob Rosenthal Date: Tue, 29 Jan 2019 15:12:07 -0700 Subject: [PATCH] update interrupt usage --- examples/device.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/examples/device.rs b/examples/device.rs index 8205237..9f333ed 100644 --- a/examples/device.rs +++ b/examples/device.rs @@ -5,9 +5,6 @@ //! //! [`svd2rust`]: https://crates.io/crates/svd2rust //! -//! Device crates also provide an `interrupt!` macro (behind the "rt" feature) to register interrupt -//! handlers. -//! //! This example depends on the [`stm32f103xx`] crate so you'll have to add it to your Cargo.toml. //! //! [`stm32f103xx`]: https://crates.io/crates/stm32f103xx @@ -55,9 +52,7 @@ fn main() -> ! { } } -// try commenting out this line: you'll end in `default_handler` instead of in `exti0` -interrupt!(EXTI0, exti0); - -fn exti0() { +#[interrupt] +fn EXTI0() { hprint!(".").unwrap(); }