Struct kernel::irq::Registration
source · [−]pub struct Registration<H: Handler>(_);
Expand description
The registration of an interrupt handler.
Examples
The following is an example of a regular handler with a boxed u32
as data.
use kernel::irq;
struct Example;
impl irq::Handler for Example {
type Data = Box<u32>;
fn handle_irq(_data: &u32) -> irq::Return {
irq::Return::None
}
}
fn request_irq(irq: u32, data: Box<u32>) -> Result<irq::Registration<Example>> {
irq::Registration::try_new(irq, data, irq::flags::SHARED, fmt!("example_{irq}"))
}
Implementations
Auto Trait Implementations
impl<H> RefUnwindSafe for Registration<H>where
<H as Handler>::Data: RefUnwindSafe,
impl<H> !Send for Registration<H>
impl<H> !Sync for Registration<H>
impl<H> Unpin for Registration<H>where
<H as Handler>::Data: Unpin,
impl<H> UnwindSafe for Registration<H>where
<H as Handler>::Data: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more