aboutsummaryrefslogtreecommitdiff
path: root/src/interrupt.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <japaricious@gmail.com> 2017-02-28 09:59:03 -0500
committerGravatar Jorge Aparicio <japaricious@gmail.com> 2017-02-28 10:04:01 -0500
commit4979a7d3831cdfd50133edff04711f8190b16021 (patch)
tree7fdef03c10080df2ae0787f8390325702ebb3387 /src/interrupt.rs
parent3f4c581a9cd52c4ad14da2d7008d004a2d888f36 (diff)
downloadcortex-m-4979a7d3831cdfd50133edff04711f8190b16021.tar.gz
cortex-m-4979a7d3831cdfd50133edff04711f8190b16021.tar.zst
cortex-m-4979a7d3831cdfd50133edff04711f8190b16021.zip
changes to better integrate with svd2rust
Diffstat (limited to 'src/interrupt.rs')
-rw-r--r--src/interrupt.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/interrupt.rs b/src/interrupt.rs
index 4305071..035dcd4 100644
--- a/src/interrupt.rs
+++ b/src/interrupt.rs
@@ -26,6 +26,12 @@ impl<T> Mutex<T> {
}
}
+/// Interrupt number
+pub unsafe trait Nr {
+ /// Returns the number associated with this interrupt
+ fn nr(&self) -> u8;
+}
+
// FIXME `T` should have some bound: `Send` or `Sync`?
unsafe impl<T> Sync for Mutex<T> {}