请问这样初始化有问题么,为啥进不了中断程序,谢谢~
void __irq uart0_irq(void)
{
if(0x04 == (U0IIR & 0x0F))
PutFifo();
VICVectAddr = 0x00;
}
void InitSerialPort(void) //9600bps
{
InitialFifo();
PINSEL0 |= 0x50;
PINSEL0 &= ~0xA0;
U0LCR = 0x80;
U0DLM = 0;
U0DLL = 125;
U0LCR = 03;
U0FDR = 0x41;
U0FCR = 0x01;
U0IER |= 0x01;
VICIntEnClr |= 0x40;
VICIntSelect = 0;
VICVectPri6 = 1;
VICVectAddr6 = (unsigned long)uart0_irq;
VICIntEnable |= 0x40;
IRQEnable();
}
|