LPC2366开发板,用的中断方式是:
VICInit(void)
{
SetVICIRQ(4,0,(uint32)Timer0_Exception);
LPC2131方式:
void VICInit(void)
{
extern void IRQ_Handler(void);
extern void Timer0_Handler(void);
extern void UART0_Handler(void);
VICIntEnClr = 0xffffffff;
VICDefVectAddr = (uint32)IRQ_Handler;
VICVectAddr0 = (uint32)Timer0_Handler;
VICVectCntl0 = (0x20 | 0x04);
VICIntEnable = 1 << 4;
VICVectAddr14 = (uint32)UART0_Handler;
VICVectCntl14 = (0x20 | 0x06);
VICIntEnable = 1 << 6;
}
这2种方式有什么区别?能互换使用吗?
|