Skip to main content

register_irq

Function register_irq 

Source
pub unsafe fn register_irq(
    vector: usize,
    handler: IrqHandler,
    userdata: Option<usize>,
) -> Result<(), Error>
Expand description

Register an IRQ handler for the given vector.

vector - The IRQ vector to register the handler for. handler - The IRQ handler to register. userdata - Optional userdata to pass to the handler when the IRQ is triggered.

ยงSafety

  • The caller must ensure that the handler is safe to call in an IRQ context and that the userdata is valid for the lifetime of the handler.
  • This functions must not be called from an IRQ context.