pub trait IrqIf {
// Required methods
fn set_enable(irq: usize, enabled: bool);
fn register(irq: usize, handler: IrqHandler) -> bool;
fn unregister(irq: usize) -> Option<IrqHandler>;
fn handle(irq: usize);
}
Expand description
IRQ management interface.
Required Methods§
Sourcefn set_enable(irq: usize, enabled: bool)
fn set_enable(irq: usize, enabled: bool)
Enables or disables the given IRQ.
Sourcefn register(irq: usize, handler: IrqHandler) -> bool
fn register(irq: usize, handler: IrqHandler) -> bool
Registers an IRQ handler for the given IRQ.
It also enables the IRQ if the registration succeeds. It returns false
if the registration failed.
Sourcefn unregister(irq: usize) -> Option<IrqHandler>
fn unregister(irq: usize) -> Option<IrqHandler>
Unregisters the IRQ handler for the given IRQ.
It also disables the IRQ if the unregistration succeeds. It returns the
existing handler if it is registered, None
otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.