Function esp32_hal::interrupt::map

source ·
pub unsafe fn map(core: Cpu, interrupt: Interrupt, which: CpuInterrupt)
Expand description

Assign a peripheral interrupt to an CPU interrupt

Great care must be taken when using this function with interrupt vectoring (enabled by default). Avoid the following CPU interrupts:

  • Interrupt1LevelPriority1
  • Interrupt19LevelPriority2
  • Interrupt23LevelPriority3
  • Interrupt10EdgePriority1
  • Interrupt22EdgePriority3 As they are preallocated for interrupt vectoring.

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