华清远见cortex-a8中led跑马灯效果

#include "s5pc100.h"
#include "uart.h"

int main()
{
     int i;
    GPG3.GPG3CON = 0X1111;
    int mod=4;
    while(1){

        GPG3.GPG3DAT = (0x1<<mod);//移位操作
        mod=(mod+1)%4;
        for(i = 0; i <= 100000; i++);
        GPG3.GPG3DAT = 0x0;
        for(i = 0; i <= 100000; i++);
    }
    return 0;
}

 

你可能感兴趣的:(跑马灯)