hi
i am using arm 9 board(samsung s3c2440), and i am doing the simple program to recognize user button from user led . actually there is no error in this program but this program is not working properly....." #include "def.h" #include "2440addr.h"
void delay(int x) { int i,j; for(i=0;i<=x;i++) { for(j=0;j<=x;j++) {}}
}
int main (void) { rGPGCON=0x000000; rGPGUP=0x000000; rGPBCON=0X0015400; rGPBUP=0x000000;
while(1) { while((rGPGDAT)&(0x0800)==0x0800) {rGPBDAT=~0x020;} while((rGPGDAT)&(0x080)==0x080) {rGPBDAT=~0x040;} while((rGPGDAT)&(0x040)==0x040) {rGPBDAT=~0x080;} while((rGPGDAT)&(0x020)==0x020) {rGPBDAT=~0x100;}
}" the problem is that all leds are recognizing with only one user button randomly. and no other buttons are working except 1st. help me what is the problem?