各位大蝦好!在做實驗的時候遇到了問題,程序編譯沒有錯誤,可是運行的時候卻沒有結果,不知到問題出在哪里,希望各位大蝦能指點迷津,在下感激不盡!void FIQ_Exception( void )
{
unsigned long int i;
i=IO0SET;
if((i & LED1) == 0)
IO0SET = LED1;
else
IO0CLR = LED1;
while((EXTINT & 0x08) != 0)
{
EXTINT = 0x08;
}
} void FIQEnable(void)
{
int temp;
__asm
{
MRS temp,CPSR
BIC temp,temp,#0x40
MSR CPSR_c, temp
}
}int main( void )
{
//unsigned long int i;
//PINSEL2 = ( 0xf << 24 ) | ( 0x81 << 16 ) | ( 0x69 << 8 ) | ( 0x1c );
PINSEL0 = 0x00000000;
PINSEL1 = (PINSEL1 & (~(3 << 28))) | (1 << 29);
IO0DIR = LED1;
EXTMODE = 0x00;
FIQEnable();
VICIntSelect = (1 << 17);
EXTINT = 0x08;
VICIntEnable = (1 << 17);
while(1);
return 0 ;
} |