pub unsafe fn map(core: Cpu, interrupt: Interrupt, which: CpuInterrupt) {
    let interrupt_number = interrupt as isize;
    let cpu_interrupt_number = which as isize;
    unsafe {
        let intr_map_base = match core {
            Cpu::ProCpu => (*core0_interrupt_peripheral()).pro_mac_intr_map().as_ptr(),
            #[cfg(multi_core)]
            Cpu::AppCpu => (*core1_interrupt_peripheral()).app_mac_intr_map().as_ptr(),
        };
        intr_map_base
            .offset(interrupt_number)
            .write_volatile(cpu_interrupt_number as u32);
    }
}
Assign a peripheral interrupt to an CPU interrupt

Note: this only maps the interrupt to the CPU interrupt. The CPU interrupt
still needs to be enabled afterwards

# Safety

Do not use CPU interrupts in the [`RESERVED_INTERRUPTS`].
esp-hal/src/interrupt/xtensa.rs