这个程序我编译后就出现了这两个问题 请问是什么原因? 谢谢版主了!我是新手 #include <stdio.h> #include <unistd.h> #include "altera_avalon_timer_regs.h" #include "altera_avalon_pio_regs.h" #include "system.h" int main(void) { int DATAH[]={0x81FF,0xCFFF,0x92FF,0x86FF,0xCCFF,0xA4FF,0xA0FF,0x8FFF,0x80FF,0x84FF}; int DATAL[]={0xFF81,0xFFCF,0xFF92,0xFF86,0xFFCC,0xFFA4,0xFFA0,0xFF8F,0xFF80,0xFF84}; int i=0,j=0,k=0,l=0,m=0,n=0; // Use to write to led IOWR_ALTERA_AVALON_TIMER_PERIODH(TIMER1_BASE, 50000000&0x0000FFFF); IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER1_BASE, 50000000>>16); IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER1_BASE, ALTERA_AVALON_TIMER_CONTROL_START_MSK+ALTERA_AVALON_TIMER_CONTROL_CONT_MSK); while (1) { if(IORD_ALTERA_AVALON_TIMER_STATUS(TIMER1_BASE))// timer stop { if(m==5&&n==9) if(k=5&&l==9) if(i=2&&j==3) { i=0;j=0;k=0; l=0;m=0;n=0; } else if(i==2) j++; else {j=0;i++;} else if(k==5) l++; else {l=0;k++;} else if(m==9) n++; else {n=0;m++;} IOWR_ALTERA_AVALON_PIO_DATA(PIOH_BASE,DATAH&DATAL[j]); IOWR_ALTERA_AVALON_PIO_DATA(PIOM_BASE,DATAH[k]&DATAL[l]); IOWR_ALTERA_AVALON_PIO_DATA(PIOS_BASE,DATAH[m]&DATAL[n]); IOWR_ALTERA_AVALON_TIMER_CONTROL(TIMER1_BASE, ALTERA_AVALON_TIMER_CONTROL_START_MSK+ALTERA_AVALON_TIMER_CONTROL_CONT_MSK); } } }
|