pub unsafe fn bind_interrupt(interrupt: Interrupt, handler: unsafe extern "C" fn()) {
        unsafe {
            let ptr = &pac::__EXTERNAL_INTERRUPTS[interrupt as usize]._handler as *const _
                as *mut unsafe extern "C" fn();
            ptr.write_volatile(handler);
        }
    }
Binds the given interrupt to the given handler.

# Safety

This will replace any previously bound interrupt handler
esp-hal/src/interrupt/riscv.rs