精品国产人成在线_亚洲高清无码在线观看_国产在线视频国产永久2021_国产AV综合第一页一个的一区免费影院黑人_最近中文字幕MV高清在线视频

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

基于STM32設(shè)計(jì)的拼圖小游戲詳解

DS小龍哥-嵌入式技術(shù) ? 來源:DS小龍哥-嵌入式技術(shù) ? 作者:DS小龍哥-嵌入式技 ? 2022-02-28 13:45 ? 次閱讀

?

一、環(huán)境介紹

MCU:STM32F103ZET6

編程軟件環(huán)境:keil5

LCD顯示屏:正點(diǎn)原子的TFT 3.5寸顯示屏

二、運(yùn)行效果

poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

?

poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

?

poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

?

三、功能介紹

因?yàn)榇a原來是在2.8寸屏上設(shè)計(jì)的,但是2.8寸屏摔碎了,現(xiàn)在手上只有塊3.5寸的LCD屏。就把代碼移植到3.5寸屏上顯示了,目前運(yùn)行的效果可以看上面的效果圖。

拼圖游戲在小時(shí)候還是經(jīng)常玩,玩法也比較簡單,這里就使用STM32設(shè)計(jì)一個(gè)拼圖小游戲分享出來一起學(xué)習(xí)。

目前游戲是通過開發(fā)板上4按鍵進(jìn)行控制圖片的移動,完成最終的拼圖效果,如果想要在上面擴(kuò)充其他游戲功能都還是比較容易。

當(dāng)然,設(shè)計(jì)編寫這個(gè)款小游戲不僅僅是為了玩游戲這么簡單,主要是為了通過設(shè)計(jì)游戲的過程學(xué)習(xí)STM32編程、LCD的編程、按鍵、圖片等等很多編程知識。

做拼圖這款游戲主要的硬件就是LCD顯示屏和幾個(gè)按鍵,沒有其他外設(shè),如果自己有其他STM32最小系統(tǒng)板有LCD顯示屏的話,完全可以把代碼移植過去運(yùn)行。當(dāng)前的代碼兼容正點(diǎn)原子戰(zhàn)艦開發(fā)板,可以直接在正點(diǎn)原子戰(zhàn)艦直接編譯下載運(yùn)行。其他的開發(fā)板上運(yùn)行也是一樣的道理,底層替換自己LCD畫點(diǎn)函數(shù)即可。

目前的拼圖的游戲工程里圖片是提前通過取模軟件取好模之后把數(shù)據(jù)放在工程里的,如果想要動態(tài)更加靈活的切換拼圖的圖片,可以加上SD卡和FATFS文件系統(tǒng),把圖片放在SD卡,通過按鍵選擇指定圖片切割進(jìn)行拼圖。

代碼分為3個(gè)部分:

1. LCD屏驅(qū)動代碼部分

2. 按鍵驅(qū)動代碼部分

3. 拼圖的邏輯代碼部分

四、LCD屏驅(qū)動代碼

4.1 LCD介紹

這款LCD顯示屏的驅(qū)動芯片型號是NT35310,時(shí)序支持8080時(shí)序,普通的MCU可以采用IO模擬8080時(shí)序驅(qū)動,有硬件接口的可以采用硬件接口驅(qū)動。STM32F103ZET6的FSMC是可以輸出8080時(shí)序,為了提高刷屏速度,這里代碼就采用FSMC接口來驅(qū)動LCD屏。照著LCD的手冊指令集,自己編寫一遍LCD的初始化代碼,可以深入學(xué)習(xí)一遍LCD編程原理。

poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

?

4.2 LCD顯示屏的初始化代碼示例

/*
函數(shù)功能:寫寄存器函數(shù)
參    數(shù):regval:寄存器值
*/	 
void LcdWriteReg(u16 regval)
{
	LCD_REG=regval;//寫入要寫的寄存器序號	 
}


/*
函數(shù)功能:寫LCD數(shù)據(jù)
函數(shù)參數(shù):data:要寫入的值	
*/
void LcdWriteData(u16 data)
{	 
	LCD_RAM=data;		 
}


/*
函數(shù)功能:讀LCD數(shù)據(jù)
返 回 值:讀到的值
*/
u16 LcdReadData(void)
{
	vu16 ram;			//防止被優(yōu)化
	ram=LCD_RAM;	
	return ram;	 
}		

/*
函數(shù)功能:讀寄存器
函數(shù)參數(shù):LCD_Reg:寄存器地址
返 回 值:讀到的數(shù)據(jù)
*/
u16 LcdReadReg(u16 LCD_Reg)
{										   
	LcdWriteReg(LCD_Reg);		//寫入要讀的寄存器序號
	DelayUs(5);		  
	return LcdReadData();		//返回讀到的值
}


/*
函數(shù)功能:開始寫GRAM
*/
void LcdWriteRAM_Prepare(void)
{
 	LCD_REG=0X2C;	  
}	


/*
函數(shù)功能:LCD寫GRAM
函數(shù)參數(shù):RGB_Code:顏色值
*/
void LcdWriteRAM(u16 RGB_Code)
{							    
	LCD_RAM = RGB_Code;//寫十六位GRAM
}


/*
函數(shù)功能:設(shè)置光標(biāo)位置
函數(shù)參數(shù):
         Xpos:橫坐標(biāo)
         Ypos:縱坐標(biāo)
*/
void LcdSetCursor(u16 Xpos, u16 Ypos)
{	 
	  LcdWriteReg(0X2A); 
		LcdWriteData(Xpos>>8);
	  LcdWriteData(Xpos&0XFF); 			 
		LcdWriteReg(0X2B); 
		LcdWriteData(Ypos>>8);
	  LcdWriteData(Ypos&0XFF); 
}


/*
功能:讀取個(gè)某點(diǎn)的顏色值	
參數(shù):x,y:坐標(biāo)
返回值:此點(diǎn)的顏色
*/
u16 LcdReadPoint(u16 x,u16 y)
{
 	u16 r=0,g=0,b=0;   
	LcdSetCursor(x,y);	    
	LcdWriteReg(0X2E);
	
 	r=LcdReadData();								//dummy Read	   
	DelayUs(1);	  
 	r=LcdReadData();  		  						//實(shí)際坐標(biāo)顏色

	DelayUs(1);	  
	b=LcdReadData(); 
	g=r&0XFF;		//5310第一次讀取的是RG的值,R在前,G在后,各占8位
	g<<=8;
	
	return (((r>>11)<<11)|((g>>10)<<5)|(b>>11));
}	




/*
功  能: 初始化LCD屏幕
說  明: 用于3.5寸屏幕的初始化。 
         LCD ID:5310
*/
void LcdInit(void)
{ 										  
	RCC->AHBENR|=1<<8;     	 	//使能FSMC時(shí)鐘	  
  RCC->APB2ENR|=1<<3;     	//使能PORTB時(shí)鐘
	RCC->APB2ENR|=1<<5;     	//使能PORTD時(shí)鐘
	RCC->APB2ENR|=1<<6;     	//使能PORTE時(shí)鐘
 	RCC->APB2ENR|=1<<8;      	//使能PORTG時(shí)鐘	 
	GPIOB->CRL&=0XFFFFFFF0;		//PB0 推挽輸出 背光
	GPIOB->CRL|=0X00000003;	   
	
	//PORTD復(fù)用推挽輸出 	
	GPIOD->CRH&=0X00FFF000;
	GPIOD->CRH|=0XBB000BBB; 
	GPIOD->CRL&=0XFF00FF00;
	GPIOD->CRL|=0X00BB00BB;   	 
	
	//PORTE復(fù)用推挽輸出 	
	GPIOE->CRH&=0X00000000;
	GPIOE->CRH|=0XBBBBBBBB; 
	GPIOE->CRL&=0X0FFFFFFF;
	GPIOE->CRL|=0XB0000000;    	    	 											 
	
	//PORTG12復(fù)用推挽輸出 	    	 											 
	GPIOG->CRH&=0XFFF0FFFF;
	GPIOG->CRH|=0X000B0000; 
	GPIOG->CRL&=0XFFFFFFF0;//PG0->RS
	GPIOG->CRL|=0X0000000B;  

	//寄存器清零
	//bank1有NE1~4,每一個(gè)有一個(gè)BCR+TCR,所以總共八個(gè)寄存器。
	//這里我們使用NE4 ,也就對應(yīng)BTCR[6],[7]。				    
	FSMC_Bank1->BTCR[6]=0X00000000;
	FSMC_Bank1->BTCR[7]=0X00000000;
	FSMC_Bank1E->BWTR[6]=0X00000000;
	
	//操作BCR寄存器	使用異步模式
	FSMC_Bank1->BTCR[6]|=1<<12;		//存儲器寫使能
	FSMC_Bank1->BTCR[6]|=1<<14;		//讀寫使用不同的時(shí)序
	FSMC_Bank1->BTCR[6]|=1<<4; 		//存儲器數(shù)據(jù)寬度為16bit 	   
	
	//操作BTR寄存器	
	//讀時(shí)序控制寄存器 							    
	FSMC_Bank1->BTCR[7]|=0<<28;		//模式A 	 							  	 
	FSMC_Bank1->BTCR[7]|=1<<0; 		//地址建立時(shí)間(ADDSET)為2個(gè)HCLK 1/36M=27ns(實(shí)際>200ns)	 	 
	
	//因?yàn)橐壕?qū)動IC的讀數(shù)據(jù)的時(shí)候,速度不能太快,尤其對1289這個(gè)IC。
	FSMC_Bank1->BTCR[7]|=0XF<<8;  	//數(shù)據(jù)保存時(shí)間為16個(gè)HCLK	 	 
	
	//寫時(shí)序控制寄存器  
	FSMC_Bank1E->BWTR[6]|=0<<28; 	//模式A 	 							    
	FSMC_Bank1E->BWTR[6]|=0<<0;		//地址建立時(shí)間(ADDSET)為1個(gè)HCLK 
 	
	//4個(gè)HCLK(HCLK=72M)因?yàn)橐壕?qū)動IC的寫信號脈寬,最少也得50ns。72M/4=24M=55ns  	 
	FSMC_Bank1E->BWTR[6]|=3<<8; 	//數(shù)據(jù)保存時(shí)間為4個(gè)HCLK	
	
	//使能BANK1,區(qū)域4
	FSMC_Bank1->BTCR[6]|=1<<0;		//使能BANK1,區(qū)域4	
	DelayMs(50); 					// delay 50 ms 
  
	lcddev.id=LcdReadReg(0x0000);	//讀ID(9320/9325/9328/4531/4535等IC)   

	LcdWriteReg(0XD4);				   
	lcddev.id=LcdReadData();//dummy read  
	lcddev.id=LcdReadData();//讀回0X01	 
	lcddev.id=LcdReadData();//讀回0X53	
	lcddev.id<<=8;	 
	lcddev.id|=LcdReadData();	//這里讀回0X10	 

	printf(" LCD ID:%x\r\n",lcddev.id); //打印LCD ID
	
		//if(lcddev.id==0x5310)
		LcdWriteReg(0xED);
		LcdWriteData(0x01);
		LcdWriteData(0xFE);

		LcdWriteReg(0xEE);
		LcdWriteData(0xDE);
		LcdWriteData(0x21);

		LcdWriteReg(0xF1);
		LcdWriteData(0x01);
		LcdWriteReg(0xDF);
		LcdWriteData(0x10);

		//VCOMvoltage//
		LcdWriteReg(0xC4);
		LcdWriteData(0x8F);	  //5f

		LcdWriteReg(0xC6);
		LcdWriteData(0x00);
		LcdWriteData(0xE2);
		LcdWriteData(0xE2);
		LcdWriteData(0xE2);
		LcdWriteReg(0xBF);
		LcdWriteData(0xAA);

		LcdWriteReg(0xB0);
		LcdWriteData(0x0D);
		LcdWriteData(0x00);
		LcdWriteData(0x0D);
		LcdWriteData(0x00);
		LcdWriteData(0x11);
		LcdWriteData(0x00);
		LcdWriteData(0x19);
		LcdWriteData(0x00);
		LcdWriteData(0x21);
		LcdWriteData(0x00);
		LcdWriteData(0x2D);
		LcdWriteData(0x00);
		LcdWriteData(0x3D);
		LcdWriteData(0x00);
		LcdWriteData(0x5D);
		LcdWriteData(0x00);
		LcdWriteData(0x5D);
		LcdWriteData(0x00);

		LcdWriteReg(0xB1);
		LcdWriteData(0x80);
		LcdWriteData(0x00);
		LcdWriteData(0x8B);
		LcdWriteData(0x00);
		LcdWriteData(0x96);
		LcdWriteData(0x00);

		LcdWriteReg(0xB2);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x02);
		LcdWriteData(0x00);
		LcdWriteData(0x03);
		LcdWriteData(0x00);

		LcdWriteReg(0xB3);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xB4);
		LcdWriteData(0x8B);
		LcdWriteData(0x00);
		LcdWriteData(0x96);
		LcdWriteData(0x00);
		LcdWriteData(0xA1);
		LcdWriteData(0x00);

		LcdWriteReg(0xB5);
		LcdWriteData(0x02);
		LcdWriteData(0x00);
		LcdWriteData(0x03);
		LcdWriteData(0x00);
		LcdWriteData(0x04);
		LcdWriteData(0x00);

		LcdWriteReg(0xB6);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xB7);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x3F);
		LcdWriteData(0x00);
		LcdWriteData(0x5E);
		LcdWriteData(0x00);
		LcdWriteData(0x64);
		LcdWriteData(0x00);
		LcdWriteData(0x8C);
		LcdWriteData(0x00);
		LcdWriteData(0xAC);
		LcdWriteData(0x00);
		LcdWriteData(0xDC);
		LcdWriteData(0x00);
		LcdWriteData(0x70);
		LcdWriteData(0x00);
		LcdWriteData(0x90);
		LcdWriteData(0x00);
		LcdWriteData(0xEB);
		LcdWriteData(0x00);
		LcdWriteData(0xDC);
		LcdWriteData(0x00);

		LcdWriteReg(0xB8);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xBA);
		LcdWriteData(0x24);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xC1);
		LcdWriteData(0x20);
		LcdWriteData(0x00);
		LcdWriteData(0x54);
		LcdWriteData(0x00);
		LcdWriteData(0xFF);
		LcdWriteData(0x00);

		LcdWriteReg(0xC2);
		LcdWriteData(0x0A);
		LcdWriteData(0x00);
		LcdWriteData(0x04);
		LcdWriteData(0x00);

		LcdWriteReg(0xC3);
		LcdWriteData(0x3C);
		LcdWriteData(0x00);
		LcdWriteData(0x3A);
		LcdWriteData(0x00);
		LcdWriteData(0x39);
		LcdWriteData(0x00);
		LcdWriteData(0x37);
		LcdWriteData(0x00);
		LcdWriteData(0x3C);
		LcdWriteData(0x00);
		LcdWriteData(0x36);
		LcdWriteData(0x00);
		LcdWriteData(0x32);
		LcdWriteData(0x00);
		LcdWriteData(0x2F);
		LcdWriteData(0x00);
		LcdWriteData(0x2C);
		LcdWriteData(0x00);
		LcdWriteData(0x29);
		LcdWriteData(0x00);
		LcdWriteData(0x26);
		LcdWriteData(0x00);
		LcdWriteData(0x24);
		LcdWriteData(0x00);
		LcdWriteData(0x24);
		LcdWriteData(0x00);
		LcdWriteData(0x23);
		LcdWriteData(0x00);
		LcdWriteData(0x3C);
		LcdWriteData(0x00);
		LcdWriteData(0x36);
		LcdWriteData(0x00);
		LcdWriteData(0x32);
		LcdWriteData(0x00);
		LcdWriteData(0x2F);
		LcdWriteData(0x00);
		LcdWriteData(0x2C);
		LcdWriteData(0x00);
		LcdWriteData(0x29);
		LcdWriteData(0x00);
		LcdWriteData(0x26);
		LcdWriteData(0x00);
		LcdWriteData(0x24);
		LcdWriteData(0x00);
		LcdWriteData(0x24);
		LcdWriteData(0x00);
		LcdWriteData(0x23);
		LcdWriteData(0x00);

		LcdWriteReg(0xC4);
		LcdWriteData(0x62);
		LcdWriteData(0x00);
		LcdWriteData(0x05);
		LcdWriteData(0x00);
		LcdWriteData(0x84);
		LcdWriteData(0x00);
		LcdWriteData(0xF0);
		LcdWriteData(0x00);
		LcdWriteData(0x18);
		LcdWriteData(0x00);
		LcdWriteData(0xA4);
		LcdWriteData(0x00);
		LcdWriteData(0x18);
		LcdWriteData(0x00);
		LcdWriteData(0x50);
		LcdWriteData(0x00);
		LcdWriteData(0x0C);
		LcdWriteData(0x00);
		LcdWriteData(0x17);
		LcdWriteData(0x00);
		LcdWriteData(0x95);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);
		LcdWriteData(0xE6);
		LcdWriteData(0x00);

		LcdWriteReg(0xC5);
		LcdWriteData(0x32);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x65);
		LcdWriteData(0x00);
		LcdWriteData(0x76);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);

		LcdWriteReg(0xC6);
		LcdWriteData(0x20);
		LcdWriteData(0x00);
		LcdWriteData(0x17);
		LcdWriteData(0x00);
		LcdWriteData(0x01);
		LcdWriteData(0x00);

		LcdWriteReg(0xC7);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xC8);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xC9);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xE0);
		LcdWriteData(0x16);
		LcdWriteData(0x00);
		LcdWriteData(0x1C);
		LcdWriteData(0x00);
		LcdWriteData(0x21);
		LcdWriteData(0x00);
		LcdWriteData(0x36);
		LcdWriteData(0x00);
		LcdWriteData(0x46);
		LcdWriteData(0x00);
		LcdWriteData(0x52);
		LcdWriteData(0x00);
		LcdWriteData(0x64);
		LcdWriteData(0x00);
		LcdWriteData(0x7A);
		LcdWriteData(0x00);
		LcdWriteData(0x8B);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0xA8);
		LcdWriteData(0x00);
		LcdWriteData(0xB9);
		LcdWriteData(0x00);
		LcdWriteData(0xC4);
		LcdWriteData(0x00);
		LcdWriteData(0xCA);
		LcdWriteData(0x00);
		LcdWriteData(0xD2);
		LcdWriteData(0x00);
		LcdWriteData(0xD9);
		LcdWriteData(0x00);
		LcdWriteData(0xE0);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);

		LcdWriteReg(0xE1);
		LcdWriteData(0x16);
		LcdWriteData(0x00);
		LcdWriteData(0x1C);
		LcdWriteData(0x00);
		LcdWriteData(0x22);
		LcdWriteData(0x00);
		LcdWriteData(0x36);
		LcdWriteData(0x00);
		LcdWriteData(0x45);
		LcdWriteData(0x00);
		LcdWriteData(0x52);
		LcdWriteData(0x00);
		LcdWriteData(0x64);
		LcdWriteData(0x00);
		LcdWriteData(0x7A);
		LcdWriteData(0x00);
		LcdWriteData(0x8B);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0xA8);
		LcdWriteData(0x00);
		LcdWriteData(0xB9);
		LcdWriteData(0x00);
		LcdWriteData(0xC4);
		LcdWriteData(0x00);
		LcdWriteData(0xCA);
		LcdWriteData(0x00);
		LcdWriteData(0xD2);
		LcdWriteData(0x00);
		LcdWriteData(0xD8);
		LcdWriteData(0x00);
		LcdWriteData(0xE0);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);

		LcdWriteReg(0xE2);
		LcdWriteData(0x05);
		LcdWriteData(0x00);
		LcdWriteData(0x0B);
		LcdWriteData(0x00);
		LcdWriteData(0x1B);
		LcdWriteData(0x00);
		LcdWriteData(0x34);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x4F);
		LcdWriteData(0x00);
		LcdWriteData(0x61);
		LcdWriteData(0x00);
		LcdWriteData(0x79);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);
		LcdWriteData(0x97);
		LcdWriteData(0x00);
		LcdWriteData(0xA6);
		LcdWriteData(0x00);
		LcdWriteData(0xB7);
		LcdWriteData(0x00);
		LcdWriteData(0xC2);
		LcdWriteData(0x00);
		LcdWriteData(0xC7);
		LcdWriteData(0x00);
		LcdWriteData(0xD1);
		LcdWriteData(0x00);
		LcdWriteData(0xD6);
		LcdWriteData(0x00);
		LcdWriteData(0xDD);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);
		LcdWriteReg(0xE3);
		LcdWriteData(0x05);
		LcdWriteData(0x00);
		LcdWriteData(0xA);
		LcdWriteData(0x00);
		LcdWriteData(0x1C);
		LcdWriteData(0x00);
		LcdWriteData(0x33);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x50);
		LcdWriteData(0x00);
		LcdWriteData(0x62);
		LcdWriteData(0x00);
		LcdWriteData(0x78);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);
		LcdWriteData(0x97);
		LcdWriteData(0x00);
		LcdWriteData(0xA6);
		LcdWriteData(0x00);
		LcdWriteData(0xB7);
		LcdWriteData(0x00);
		LcdWriteData(0xC2);
		LcdWriteData(0x00);
		LcdWriteData(0xC7);
		LcdWriteData(0x00);
		LcdWriteData(0xD1);
		LcdWriteData(0x00);
		LcdWriteData(0xD5);
		LcdWriteData(0x00);
		LcdWriteData(0xDD);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);

		LcdWriteReg(0xE4);
		LcdWriteData(0x01);
		LcdWriteData(0x00);
		LcdWriteData(0x01);
		LcdWriteData(0x00);
		LcdWriteData(0x02);
		LcdWriteData(0x00);
		LcdWriteData(0x2A);
		LcdWriteData(0x00);
		LcdWriteData(0x3C);
		LcdWriteData(0x00);
		LcdWriteData(0x4B);
		LcdWriteData(0x00);
		LcdWriteData(0x5D);
		LcdWriteData(0x00);
		LcdWriteData(0x74);
		LcdWriteData(0x00);
		LcdWriteData(0x84);
		LcdWriteData(0x00);
		LcdWriteData(0x93);
		LcdWriteData(0x00);
		LcdWriteData(0xA2);
		LcdWriteData(0x00);
		LcdWriteData(0xB3);
		LcdWriteData(0x00);
		LcdWriteData(0xBE);
		LcdWriteData(0x00);
		LcdWriteData(0xC4);
		LcdWriteData(0x00);
		LcdWriteData(0xCD);
		LcdWriteData(0x00);
		LcdWriteData(0xD3);
		LcdWriteData(0x00);
		LcdWriteData(0xDD);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);
		LcdWriteReg(0xE5);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x02);
		LcdWriteData(0x00);
		LcdWriteData(0x29);
		LcdWriteData(0x00);
		LcdWriteData(0x3C);
		LcdWriteData(0x00);
		LcdWriteData(0x4B);
		LcdWriteData(0x00);
		LcdWriteData(0x5D);
		LcdWriteData(0x00);
		LcdWriteData(0x74);
		LcdWriteData(0x00);
		LcdWriteData(0x84);
		LcdWriteData(0x00);
		LcdWriteData(0x93);
		LcdWriteData(0x00);
		LcdWriteData(0xA2);
		LcdWriteData(0x00);
		LcdWriteData(0xB3);
		LcdWriteData(0x00);
		LcdWriteData(0xBE);
		LcdWriteData(0x00);
		LcdWriteData(0xC4);
		LcdWriteData(0x00);
		LcdWriteData(0xCD);
		LcdWriteData(0x00);
		LcdWriteData(0xD3);
		LcdWriteData(0x00);
		LcdWriteData(0xDC);
		LcdWriteData(0x00);
		LcdWriteData(0xF3);
		LcdWriteData(0x00);

		LcdWriteReg(0xE6);
		LcdWriteData(0x11);
		LcdWriteData(0x00);
		LcdWriteData(0x34);
		LcdWriteData(0x00);
		LcdWriteData(0x56);
		LcdWriteData(0x00);
		LcdWriteData(0x76);
		LcdWriteData(0x00);
		LcdWriteData(0x77);
		LcdWriteData(0x00);
		LcdWriteData(0x66);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0xBB);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0x66);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);
		LcdWriteData(0x45);
		LcdWriteData(0x00);
		LcdWriteData(0x43);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);

		LcdWriteReg(0xE7);
		LcdWriteData(0x32);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);
		LcdWriteData(0x76);
		LcdWriteData(0x00);
		LcdWriteData(0x66);
		LcdWriteData(0x00);
		LcdWriteData(0x67);
		LcdWriteData(0x00);
		LcdWriteData(0x67);
		LcdWriteData(0x00);
		LcdWriteData(0x87);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0xBB);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0x77);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x56);
		LcdWriteData(0x00);
		LcdWriteData(0x23); 
		LcdWriteData(0x00);
		LcdWriteData(0x33);
		LcdWriteData(0x00);
		LcdWriteData(0x45);
		LcdWriteData(0x00);

		LcdWriteReg(0xE8);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0x87);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);
		LcdWriteData(0x77);
		LcdWriteData(0x00);
		LcdWriteData(0x66);
		LcdWriteData(0x00);
		LcdWriteData(0x88);
		LcdWriteData(0x00);
		LcdWriteData(0xAA);
		LcdWriteData(0x00);
		LcdWriteData(0xBB);
		LcdWriteData(0x00);
		LcdWriteData(0x99);
		LcdWriteData(0x00);
		LcdWriteData(0x66);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x44);
		LcdWriteData(0x00);
		LcdWriteData(0x55);
		LcdWriteData(0x00);

		LcdWriteReg(0xE9);
		LcdWriteData(0xAA);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0x00);
		LcdWriteData(0xAA);

		LcdWriteReg(0xCF);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xF0);
		LcdWriteData(0x00);
		LcdWriteData(0x50);
		LcdWriteData(0x00);
		LcdWriteData(0x00);
		LcdWriteData(0x00);

		LcdWriteReg(0xF3);
		LcdWriteData(0x00);

		LcdWriteReg(0xF9);
		LcdWriteData(0x06);
		LcdWriteData(0x10);
		LcdWriteData(0x29);
		LcdWriteData(0x00);

		LcdWriteReg(0x3A);
		LcdWriteData(0x55);	//66

		LcdWriteReg(0x11);
		DelayMs(100);
		LcdWriteReg(0x29);
		LcdWriteReg(0x35);
		LcdWriteData(0x00);

		LcdWriteReg(0x51);
		LcdWriteData(0xFF);
		LcdWriteReg(0x53);
		LcdWriteData(0x2C);
		LcdWriteReg(0x55);
		LcdWriteData(0x82);
		LcdWriteReg(0x2c);
			
		lcddev.width=320;
		lcddev.height=480;
		
		LCD_LED=1;				//點(diǎn)亮背光
} 
poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

4.3 LCD相關(guān)的繪圖函數(shù)代碼示例

/*
函數(shù)功能:畫點(diǎn)函數(shù)
參    數(shù):x,y坐標(biāo)
          color顏色值
*/
void LcdDrawPoint(u16 x,u16 y,u16 color)
{
	LcdSetCursor(x,y);		  //設(shè)置光標(biāo)位置 
	LcdWriteRAM_Prepare();	//開始寫入GRAM
	LCD_RAM=color; 
}


/*
函數(shù)功能:清屏函數(shù)
參    數(shù):color顏色值
*/
void LcdClear(u16 color)
{
	u32 i;
	LcdSetCursor(0,0);		  //設(shè)置光標(biāo)位置 
	LcdWriteRAM_Prepare();	//開始寫入GRAM
	for(i=0;i<320*480;i++)LCD_RAM=color; 
}


/*
函數(shù)功能:顯示一個(gè)指定大小的漢字
參    數(shù):
					x,y :漢字的坐標(biāo)
					font:取模數(shù)據(jù)
					size:字體大小尺寸
*/
void LcdShowFont(u16 x,u16 y,u8 *dzk,u8 size)
{
	u8 temp,t,t1;
	u16 x0=x;	
  u8 csize=(size/8+((size%8)?1:0))*(size);//得到字體一個(gè)字符對應(yīng)點(diǎn)陣集所占的字節(jié)數(shù)  
	    for(t=0;t0)incx=1; //設(shè)置單步方向 
	else if(delta_x==0)incx=0;//垂直線 
	else {incx=-1;delta_x=-delta_x;} 
	if(delta_y>0)incy=1; 
	else if(delta_y==0)incy=0;//水平線 
	else{incy=-1;delta_y=-delta_y;} 
	if( delta_x>delta_y)distance=delta_x; //選取基本增量坐標(biāo)軸 
	else distance=delta_y; 
	for(t=0;t<=distance+1;t++ )//畫線輸出 
	{  
		LcdDrawPoint(uRow,uCol,color);//畫點(diǎn) 
		xerr+=delta_x ; 
		yerr+=delta_y ; 
		if(xerr>distance) 
		{ 
			xerr-=distance; 
			uRow+=incx; 
		} 
		if(yerr>distance) 
		{ 
			yerr-=distance; 
			uCol+=incy; 
		} 
	}  
}  


/*
函數(shù)功能:任意角度畫直線 
參    數(shù):
					w  :線段的長度
					len:半徑
					c  :顏色
					x,y:坐標(biāo)
*/
#include 
void LcdDrawAngleLine(u32 x,u32 y,float du,u32 len,u32 w,u16 c)
{
  int i;
	int x0,y0;
	float k=du*(3.1415926535/180);	
	for(i=len-w;i高位在前
				//畫點(diǎn)LCD的像素是16位的,所以需要將2個(gè)8位像素合成16位像素。
				 p+=2;
			}
	 }
}

;i++)>;t++)>
poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

五、按鍵驅(qū)動代碼示例

拼圖的時(shí)候,通過4個(gè)按鍵控制上下左右方向的,按鍵的代碼如下:

功能    :按鍵的初始化
硬件連接:
KEY1:PA0  --按下是高電平
KEY2:PE2  --按下是低電平
KEY3:PE3  --按下是低電平
KEY4:PE4  --按下是低電平
返回值:無
*/
void KeyInit(void)
{
	 /*1. 開時(shí)鐘*/
	 RCC->APB2ENR|=1<<2; //PA
	 RCC->APB2ENR|=1<<6; //PE 
	
	 /*2. 配置GPIO口模式*/
	 GPIOA->CRL&=0xFFFFFFF0;
	 GPIOA->CRL|=0x00000008; //上下拉輸入模式
	 
	 GPIOE->CRL&=0xFFF000FF;
	 GPIOE->CRL|=0x00088800; //上下拉輸入模式
	
	 /*3. 上下拉控制*/
	 //GPIOA->ODR&=~(1<<0); //PA0下拉
	 GPIOE->ODR|=1<<2;
	 GPIOE->ODR|=1<<3;
	 GPIOE->ODR|=1<<4;
}

/*
功  能:獲取按鍵值
返回值:
    1表示按鍵1按下
		2表示按鍵2按下
		3表示按鍵3按下
		4表示按鍵4按下
    0表示沒有按鍵按下
實(shí)現(xiàn)單次按下模式(上一次按下的按鍵沒有松開,就不做檢測)和連續(xù)按下的模式。

模式:
   mode=1; //表示單擊
   mode=0; //表示連續(xù)
*/
u8 GetKeyValue(u32 mode)
{
	 static int stat=0; //保存上一次按鍵的狀態(tài)
	 if(mode==0)stat=0;
	
	 if((KEY1||KEY2==0||KEY3==0||KEY4==0) && stat==0)
	 {
		  DelayMs(20); //延時(shí)消抖
		  stat=1;      //表示上次有按鍵按下
		  if(KEY1)return 1;
		  if(KEY2==0)return 2;
		  if(KEY3==0)return 3;
		  if(KEY4==0)return 4;
	 }
	 else
	 {
		  if(KEY1==0&&KEY2&&KEY3&&KEY4)stat=0; //判斷所有的按鍵是否已經(jīng)松開
	 }
	 return 0;
}
poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

六、拼圖的邏輯代碼

分隔圖片: 這里是按照320*240---2.8寸計(jì)算的

//           0,0         60,0         120,0         180,0
//           0,80        60,80        120, 80        180,80
//           0,160       60,160,      120, 160,      180,160
//           0,240,      60,240       120, 240       180,240
//顯示位置起始坐標(biāo)。
u32 record[16][2];

int pic[16][2]=      
{//第i張圖片的屏幕所在位置。
  {60,160},{180,80},{0,80},
 {180,0},{180,160},{180,240},
 {0,160},{120,160},{60,80},{120,0},
 {120,240},{120,80},{0,0},{60,240},{60,0},{0,240}}; 
poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

循環(huán)里處理圖片移動邏輯:

while(1)
	{
			//【1】產(chǎn)生隨機(jī)圖片ID號:0--15,   4號圖片用作空白圖片。
 //ID號和圖片首地址固定。圖片所在的位置不固定。  
		picture_production(tu32,pic);
		while(1)
		{
			  key=GetKeyValue(1);
       if(key==1)      //右移動
        {if(record[4][0]>0)              //180,160
          {
            number=lookingfor_blankblock(record[4][0]-60,record[4][1],tu32);
            show_picture_(record[4][0],record[4][1],tu32,number);//空白左邊圖覆蓋空白
            show_picture_(record[4][0]-60,record[4][1],tu32,4);  //出現(xiàn)新空白
            k=record[number][0];
            record[number][0]=record[4][0];
            record[4][0]=k;
           
                                
          }
        }
        if(key==3)    //左移動
        {if(record[4][0]<180)              //180,160
          {
            number=lookingfor_blankblock(record[4][0]+60,record[4][1],tu32);
            show_picture_(record[4][0],record[4][1],tu32,number);//空白左邊圖覆蓋空白
            show_picture_(record[4][0]+60,record[4][1],tu32,4);  //出現(xiàn)新空白
            k=record[number][0];
            record[number][0]=record[4][0];
            record[4][0]=k;
            
            
                                //新空白橫坐標(biāo)
          }
        }
        if(key==2)    //下移動
        {if(record[4][1]>0)  
           { 
            number=lookingfor_blankblock(record[4][0],record[4][1]-80,tu32);
            show_picture_(record[4][0],record[4][1],tu32,number);//空白左邊圖覆蓋空白
            show_picture_(record[4][0],record[4][1]-80,tu32,4);  //出現(xiàn)新空白
            k=record[number][1];
            record[number][1]=record[4][1];
            record[4][1]=k;
           }
        }
        
        if(key==4)    //上移動
        {
          if(record[4][1]<240)
            {
            number=lookingfor_blankblock(record[4][0],record[4][1]+80,tu32);
            show_picture_(record[4][0],record[4][1],tu32,number);//空白左邊圖覆蓋空白
            show_picture_(record[4][0],record[4][1]+80,tu32,4);  //出現(xiàn)新空白
            k=record[number][1];
            record[number][1]=record[4][1];
            record[4][1]=k;
            }
        }
      }
	}
poYBAGDYdXCAWkKMAAAAK8RNs4s030.png

完整工程代碼下載地址:https://download.csdn.net/download/xiaolong1126626497/20706318

審核編輯:符乾江

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報(bào)投訴
  • STM32
    +關(guān)注

    關(guān)注

    2266

    文章

    10871

    瀏覽量

    354791
  • 代碼
    +關(guān)注

    關(guān)注

    30

    文章

    4747

    瀏覽量

    68348
收藏 人收藏

    評論

    相關(guān)推薦

    詳解MySQL多實(shí)例部署

    詳解MySQL多實(shí)例部署
    的頭像 發(fā)表于 11-11 11:10 ?167次閱讀

    補(bǔ)齊拼圖后,高通終于猛推“三端歸一”

    高通自研CPU架構(gòu)Oryon的“開枝散葉”。在去年首次應(yīng)用于高通AI PC芯片驍龍X Elite之后,Oryon CPU走進(jìn)了此次發(fā)布的一款手機(jī)芯片平臺和兩款汽車芯片平臺。加上高通自研的Adreno GPU和Hexagon NPU,高通補(bǔ)齊了自研SoC的最后一塊拼圖,也統(tǒng)一了PC、手機(jī)、汽車三條產(chǎn)
    的頭像 發(fā)表于 10-25 10:00 ?170次閱讀
    補(bǔ)齊<b class='flag-5'>拼圖</b>后,高通終于猛推“三端歸一”

    STM32項(xiàng)目分享:智能門禁鎖系統(tǒng)

    01—項(xiàng)目簡介1.功能詳解基于STM32智能門禁鎖系統(tǒng)。功能如下:按鍵解鎖:系統(tǒng)通過4×4矩陣鍵盤模塊輸入密碼進(jìn)入主菜單門禁刷卡:通
    的頭像 發(fā)表于 09-12 08:04 ?1240次閱讀
    <b class='flag-5'>STM32</b>項(xiàng)目分享:智能門禁鎖系統(tǒng)

    STM32項(xiàng)目分享:智能大棚/智慧農(nóng)業(yè)系統(tǒng)

    01—項(xiàng)目簡介1.功能詳解基于STM32的智慧農(nóng)業(yè)系統(tǒng)。功能如下:溫濕度采集:使用DHT11溫濕度傳感器采集環(huán)境溫濕度土壤濕度采集:
    的頭像 發(fā)表于 08-30 12:15 ?815次閱讀
    <b class='flag-5'>STM32</b>項(xiàng)目分享:智能大棚/智慧農(nóng)業(yè)系統(tǒng)

    基于 FPGA 的飛機(jī)大戰(zhàn)游戲系統(tǒng)設(shè)計(jì)

    第一部分 設(shè)計(jì)概述1.1 設(shè)計(jì)目的我們設(shè)計(jì)了一款基于 FPGA 的SEA開發(fā)板 的飛機(jī)大戰(zhàn)游戲。飛機(jī)大戰(zhàn)游戲是一款休閑益智類游戲,既簡單又耐玩。在初始界面,我們有開始游戲、重新開始、
    發(fā)表于 07-24 20:03

    芯片應(yīng)用:國產(chǎn)HMI芯片應(yīng)用于4.3寸拼圖機(jī)

    產(chǎn)品,而非傳統(tǒng)的玩具。這不僅反映了新生代父母對于啟蒙教育、家庭教育的重視,也顯示了他們對于親子關(guān)系培養(yǎng)的關(guān)注。 為適應(yīng)市場需求,啟明智顯將國產(chǎn)工業(yè)級HMI芯片Model3C應(yīng)用于4.3寸拼圖機(jī)中,寓教于樂,幫助孩子啟蒙。 ? 這款拼圖機(jī)
    的頭像 發(fā)表于 06-04 14:40 ?357次閱讀

    STM32—啟動腳本詳解

    我從Keil和STM32CubeIDE開始我的嵌入式開發(fā),然后慢慢過渡到只使用文本編輯器而沒有任何集成開發(fā)環(huán)境(IDE)。我一直使用這些IDE提供的啟動文件。在這篇文章中,我將解釋如何用C++編寫
    發(fā)表于 05-31 14:17 ?1次下載

    HarmonyOS開發(fā)實(shí)戰(zhàn):【親子拼圖游戲

    編程語言編寫的一個(gè)分布式益智拼圖游戲,可以兩臺設(shè)備同時(shí)開啟一局拼圖游戲,每次點(diǎn)擊九宮格內(nèi)的圖片,都會同步更新兩臺設(shè)備的圖片位置
    的頭像 發(fā)表于 04-16 17:00 ?550次閱讀
    HarmonyOS開發(fā)實(shí)戰(zhàn):【親子<b class='flag-5'>拼圖游戲</b>】

    FPGA實(shí)現(xiàn)的“俄羅斯方塊”游戲系統(tǒng)設(shè)計(jì)

    本項(xiàng)目主要在FPGA上實(shí)現(xiàn)了一個(gè)經(jīng)典小游戲“俄羅斯方塊”。本項(xiàng)目基本解決方案是,使用Xilinx Zynq系列開發(fā)板 ZedBoard 作為平臺,實(shí)現(xiàn)主控模塊,通過VGA接口來控制屏幕進(jìn)行顯示。
    發(fā)表于 03-28 10:41 ?1919次閱讀
    FPGA實(shí)現(xiàn)的“俄羅斯方塊”<b class='flag-5'>游戲</b>系統(tǒng)設(shè)計(jì)

    請問stm32H743II usb HOST如何識別雙遙桿游戲手柄?

    stm32H743II usb HOST 如何識別 雙遙桿游戲手柄?北通usb游戲手柄插到PC上顯示是XBOX 360手柄,手柄上傳為14個(gè)字節(jié)數(shù)據(jù),分別為0-7兩個(gè)遙桿的XY,8-9為手柄油門
    發(fā)表于 03-15 07:52

    超越卡頓,突破瓶頸!華為云耀 L 實(shí)例引領(lǐng)中小企業(yè)游戲開發(fā)新風(fēng)潮

    隨著《2023 年游戲生命周期洞察》的發(fā)布,數(shù)據(jù)顯示中小游戲企業(yè)占據(jù)游戲市場的主導(dǎo)地位。然而,在競爭激烈的游戲市場,中小企業(yè)團(tuán)隊(duì)往往由于資源有限而面臨著多重挑戰(zhàn)。不僅在經(jīng)驗(yàn)和人才方面存
    的頭像 發(fā)表于 12-11 14:22 ?815次閱讀
    超越卡頓,突破瓶頸!華為云耀 L 實(shí)例引領(lǐng)中小企業(yè)<b class='flag-5'>游戲</b>開發(fā)新風(fēng)潮

    stm32啟動過程詳解

    STM32啟動過程詳解 近年來,STM32微控制器在嵌入式系統(tǒng)中的應(yīng)用越來越廣泛。STM32微控制器具有高性能、低功耗、易擴(kuò)展和豐富的外設(shè)接口等優(yōu)勢。而要讓
    的頭像 發(fā)表于 12-08 15:47 ?1522次閱讀

    詳解時(shí)域瞬態(tài)分析技術(shù)

    詳解時(shí)域瞬態(tài)分析技術(shù)
    的頭像 發(fā)表于 12-07 14:45 ?749次閱讀
    <b class='flag-5'>詳解</b>時(shí)域瞬態(tài)分析技術(shù)

    詳解汽車LED的應(yīng)用和封裝

    詳解汽車LED的應(yīng)用和封裝
    的頭像 發(fā)表于 12-04 10:04 ?523次閱讀
    <b class='flag-5'>詳解</b>汽車LED的應(yīng)用和封裝

    HarmonyOS開發(fā)案例分享:萬能卡片也能用來玩游戲

    直接在桌面上玩游戲嗎? 通過對萬能卡片相關(guān)文檔的閱讀,我認(rèn)為想要實(shí)現(xiàn)一些簡單的游戲應(yīng)該沒有問題,思考再三,我決定做一個(gè)井字棋小游戲,希望能給各位開發(fā)者提供些開發(fā)思路。 實(shí)現(xiàn)效果如下: 可以看到,在
    發(fā)表于 12-01 09:35