Merge pull request #223 from timokroeger/interrupt-unborrow

Add `Unborrow` trait bound for `Interrupt`
This commit is contained in:
Dario Nieuwenhuis 2021-06-04 23:48:32 +02:00 committed by GitHub
commit 6f5c85c50f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ unsafe impl cortex_m::interrupt::InterruptNumber for NrWrap {
}
}
pub unsafe trait Interrupt {
pub unsafe trait Interrupt: crate::util::Unborrow<Target = Self> {
type Priority: From<u8> + Into<u8> + Copy;
fn number(&self) -> u16;
unsafe fn steal() -> Self;