Merge pull request #66 from jacobrosenthal/patch-1

update interrupt usage
This commit is contained in:
Emil Fresk
2019-01-30 19:54:09 +01:00
committed by GitHub

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();
} }