Add Unborrow
trait bound for Interrupt
Allows the compiler to figure out bounds for wrapper code of owned peripherals and interrupts. Example: https://gist.github.com/timokroeger/f025ef590557f1cd6c2e9c7ab30442d2
This commit is contained in:
parent
cd44b221ed
commit
628e58020f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user