update interrupt usage

This commit is contained in:
Jacob Rosenthal
2019-01-29 15:12:07 -07:00
committed by GitHub
parent 3aa5ea9fd3
commit c6599f3686

View File

@@ -5,9 +5,6 @@
//! //!
//! [`svd2rust`]: https://crates.io/crates/svd2rust //! [`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. //! This example depends on the [`stm32f103xx`] crate so you'll have to add it to your Cargo.toml.
//! //!
//! [`stm32f103xx`]: https://crates.io/crates/stm32f103xx //! [`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]
interrupt!(EXTI0, exti0); fn EXTI0() {
fn exti0() {
hprint!(".").unwrap(); hprint!(".").unwrap();
} }