Function esp_idf_svc::hal::sys::esp_rom_route_intr_matrix
source · pub unsafe extern "C" fn esp_rom_route_intr_matrix(
cpu_core: i32,
periph_intr_id: u32,
cpu_intr_num: u32,
)
Expand description
@brief Route peripheral interrupt sources to CPU’s interrupt port by matrix
Usually there’re 4 steps to use an interrupt:
- Route peripheral interrupt source to CPU. e.g. esp_rom_route_intr_matrix(0, ETS_WIFI_MAC_INTR_SOURCE, ETS_WMAC_INUM)
- Set interrupt handler for CPU
- Enable CPU interrupt
- Enable peripheral interrupt
@param cpu_core The CPU number, which the peripheral interrupt will inform to
@param periph_intr_id The peripheral interrupt source number
@param cpu_intr_num The CPU (external) interrupt number. On targets that use CLIC as their interrupt controller,
this number represents the external interrupt number. For example, passing cpu_intr_num = i
to this function would in fact bind peripheral source to CPU interrupt CLIC_EXT_INTR_NUM_OFFSET + i
.