MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / liointc_init

Function liointc_init

bsp/loongson/ls2kdev/drivers/interrupt.c:31–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static void liointc_init(void)
32{
33 int i;
34 /* Router for LIOINTC0, to Core 0, INT0 (CPU IP2) */
35 for (i = 0; i < 32; i ++)
36 {
37 HWREG8(LIOINTC0_BASE + i) = LIOINTC_COREx_INTy(0, 0);
38 }
39
40 /* Router for LIOINTC1, to Core 0, INT1 (CPU IP3) */
41 for (i = 0; i < 32; i ++)
42 {
43 HWREG8(LIOINTC1_BASE + i) = LIOINTC_COREx_INTy(0, 1);
44 }
45
46 /* Disable all IRQs */
47 HWREG32(LIOINTC0_BASE + LIOINTC_REG_INTC_DISABLE) = 0xffffffff;
48 HWREG32(LIOINTC1_BASE + LIOINTC_REG_INTC_DISABLE) = 0xffffffff;
49
50 /* Set all IRQs to low level triggered (Default?) */
51 HWREG32(LIOINTC0_BASE + LIOINTC_REG_INTC_POL) = 0x0;
52 HWREG32(LIOINTC0_BASE + LIOINTC_REG_INTC_EDGE) = 0x0;
53
54 HWREG32(LIOINTC1_BASE + LIOINTC_REG_INTC_POL) = 0x0;
55 HWREG32(LIOINTC1_BASE + LIOINTC_REG_INTC_EDGE) = 0x0;
56}
57
58//set irq mode
59void liointc_set_irq_mode(int irq, int mode)

Callers 1

rt_hw_interrupt_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected