[−][src]Trait interrupture::InterruptController
A low level API for interrupts. Implement this API
for your hardware in order to get access to the more
convenient crossbeam
-like API.
Associated Types
type Request: Nr
An interrupt identifier. Should never contain values that can't be represented as a u8
.
type Priority
A priority identifier. Opaquely used by interrupture
and just forwarded back to you.
Required methods
fn trigger(&mut self, irq: &Self::Request)
Causes an interrupt routine to be invoked by making the hardware believe the interrupt was triggered.
Essentially this is a software interrupt trigger.
fn is_pending(irq: &Self::Request) -> bool
Returns the pending state of the interrupt
fn pend(irq: &Self::Request)
Sets the pending state of the interrupt to true
fn unpend(irq: &Self::Request)
Sets the pending state of the interrupt to false
fn get_priority(irq: &Self::Request) -> Self::Priority
Fetches the priority of the given interrupt
fn set_priority(&mut self, irq: &Self::Request, priority: Self::Priority)
Sets a the new priority of the given interrupt
fn disable(&mut self, irq: &Self::Request)
Disables the given interrupt
fn enable(&mut self, irq: &Self::Request)
Enables the given interrupt