程序很简单,就想进个中断,让灯灭了,外部中断0接了个开关,低电平触发的接法的,中断就是进不去,我刚学ARM,高手帮帮我
#include <LPC2103.H>
#include "config.h"
#define LED (1<<13)
#define KEY (1<<14)
#define NKEY (0<<14)
void __irq Eint0IRQ ()
{
IODIR=LED;
IOSET=LED;
EXTINT=0X01;
VICVectAddr=0x00;
}
int main()
{
IODIR=LED;
IOCLR=LED;
EXTPOLAR=0X00;
EXTMODE=0X00;
VICIntSelect=0;
VICIntSelect=NKEY;
VICVectCntl0=0x20|14;
VICVectAddr0=(unsigned long)Eint0IRQ;
VICIntEnable=KEY;
EXTINT=0X01;
while (1);
} |