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

Function rt_hw_interrupt_install

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

Source from the content-addressed store, hash-verified

166}
167
168rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
169 void *param, const char *name)
170{
171 rt_isr_handler_t old_handler = RT_NULL;
172
173 if (vector >= 0 && vector < MAX_INTR)
174 {
175 old_handler = irq_handle_table[vector].handler;
176
177#ifdef RT_USING_INTERRUPT_INFO
178 rt_strncpy(irq_handle_table[vector].name, name, RT_NAME_MAX);
179#endif /* RT_USING_INTERRUPT_INFO */
180 irq_handle_table[vector].handler = handler;
181 irq_handle_table[vector].param = param;
182 }
183
184 if (vector <= 32)
185 {
186 mips_unmask_cpu_irq(2);
187 }
188 else
189 {
190 mips_unmask_cpu_irq(3);
191 }
192
193 return old_handler;
194}
195
196void rt_do_mips_cpu_irq(rt_uint32_t ip)
197{

Callers 9

loongson_pin_initFunction · 0.70
rt_hw_uart_initFunction · 0.70
eth_initFunction · 0.50
ls1c_bxcan_initFunction · 0.50
ls1c_pin_attach_irqFunction · 0.50
touch_initFunction · 0.50
rt_hw_uart_initFunction · 0.50
eth_initFunction · 0.50
rt_hw_uart_initFunction · 0.50

Calls 2

rt_strncpyFunction · 0.85
mips_unmask_cpu_irqFunction · 0.85

Tested by

no test coverage detected