- /*****************************************************************
- * [url=home.php?mod=space&uid=247401]@brief[/url] 检查LCD的RGB接线是否正常
- * @param 无
- * @retval 无
- * [url=home.php?mod=space&uid=536309]@NOTE[/url] 分别显示RGB各脚为1的图形,过渡不连续说明该脚异常
- ****************************************************************/
- void Check_LCD_Connection (void)
- {
- unsigned long fore_color=0x800000;
- unsigned int block_width=(LCD_Width-16)/8;
- unsigned int n,row=1;
-
- BTE_Solid_Fill(0,canvas_image_width,0,0,color16M_black,LCD_Width,LCD_Height);
- Foreground_color_16M(color16M_white);
- Select_Font_Height_WxN_HxN_ChromaKey_Alignment(24,2,2,1,0); //设定文字格式,放大两倍
- Goto_Text_XY(8,10);
- Show_String("Check LCD Connection:");
-
- Select_Font_Height_WxN_HxN_ChromaKey_Alignment(24,1,1,1,0); //设定文字格式
- //单独显示RGB24脚位块
- for(row=1;row<4;row++)
- {
- for(n=0;n<8;n++)
- {
- BTE_Solid_Fill(0,canvas_image_width,8+block_width*n,row*60,fore_color,block_width,50);
- fore_color=fore_color>>1;
- }
- }
-
- //显示红、绿、蓝渐进色条
- block_width=LCD_Width/256;
- for(row=1;row<4;row++)
- {
- fore_color=0;
- for(n=0;n<256;n++)
- {
- BTE_Solid_Fill(0,canvas_image_width,block_width*n,(row+3)*60,fore_color<<(3-row)*8,block_width,50);
- fore_color++;
- }
- }
-
- delay_ms(3000);
- }
源代码下载:
[attach]2308576[/attach]
欢迎光临 21ic电子技术开发论坛 (https://bbs.21ic.com/) |
Powered by Discuz! X3.5 |