示例#1
0
void Main(void)
{
	//硬件初始化
	var_Init();//初始化定时器相关的参数
	Port_Init();//IO端口初始化
	Isr_Init();//中断初始化
	Uart_Init(0,115200);//串口初始化
	Uart_Select(0);
	_init_alloc(0x32500000,0x333fffff);//初始化堆地址:15M,使能malloc等存储分配函数
	setlocale(LC_ALL,"C");//使能本地函数,如sprintf等
	Timer4_Init();
	lcdTest();
}	
示例#2
0
int main(){
	initScreen();
	lcdTest();
	while(1){
		fillBoard();
		printBoard();
		for (int i = 0; i < 1000; i++){
			playerStep();
			printBoard();
		}
	}
	closeScreen();

}
示例#3
0
int main(){
	initScreen();
	initSound();
	initLedButtons();
	lcdTest();
	while(1){
		fillBoard();
		printBoard();
		
		for (int i = 0; i < 100; i++){
			setLeds((char)i);
			setFrequency(120*(i%20));
			playerStep();
			printBoard();
			playSounds();
			if (readButtons() & 0x01 > 0) break;
		}
	}
	closeLedButtons();
	closeScreen();
	closeSound();

}
示例#4
0
文件: gpio_lcd.cpp 项目: CJxD/IOoo
int main()
{
	TestLCD lcdTest(8);
	lcdTest.loop();
	return 0;
}