Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit ac344b9

Browse files
authored
Merge pull request #66 from jacobrosenthal/patch-1
update interrupt usage
2 parents 3aa5ea9 + c6599f3 commit ac344b9

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

examples/device.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
//!
66
//! [`svd2rust`]: https://crates.io/crates/svd2rust
77
//!
8-
//! Device crates also provide an `interrupt!` macro (behind the "rt" feature) to register interrupt
9-
//! handlers.
10-
//!
118
//! This example depends on the [`stm32f103xx`] crate so you'll have to add it to your Cargo.toml.
129
//!
1310
//! [`stm32f103xx`]: https://crates.io/crates/stm32f103xx
@@ -55,9 +52,7 @@ fn main() -> ! {
5552
}
5653
}
5754

58-
// try commenting out this line: you'll end in `default_handler` instead of in `exti0`
59-
interrupt!(EXTI0, exti0);
60-
61-
fn exti0() {
55+
#[interrupt]
56+
fn EXTI0() {
6257
hprint!(".").unwrap();
6358
}

0 commit comments

Comments
 (0)