华清远见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;
}

 

posted @ 2013-05-09 12:42  九月光  阅读(291)  评论(0编辑  收藏  举报