?? main.c
字號(hào):
#include "lib.h"
#define GPBCON (*(volatile unsigned long *)0x56000010)
#define GPBDAT (*(volatile unsigned long *)0x56000014)
#define GPB7_out (1<<(7*2))
#define GPB8_out (1<<(8*2))
#define GPB9_out (1<<(9*2))
#define GPB10_out (1<<(10*2))
void wait(unsigned long dly)
{
for(; dly > 0; dly--);
}
int main(int argc, char **argv)
{
unsigned long i = 0;
GPBCON =GPB7_out|GPB8_out|GPB9_out|GPB10_out;
while(1){
GPBDAT = (~(i++))<<7;
write("user program leds will sleep 0.5s\n\r");
sleep(50); //系統(tǒng)時(shí)鐘周期為10ms,休眠0.5s
}
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -