⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 avr LCM SSD1289 color Graphical LCD Display Driver and graphic library
💻 C
字号:
/**************************************************************************************************
*	  			  BL-TFT320420 tester
* File name		: main.c
* Programmer 	: jaruwit supa
* Web presence  : www.thaibestlink.com
* Note			: test lcd BL-TFT320420
* Language		: avrGCC
* Hardware		: atmega16
* Date			: 01/05/2009
***************************************************************************************************/

/* _____STANDARD INCLUDES____________________________________________________ */
#include <avr/io.h>  		// include I/O definitions (port names, pin names, etc)

/* _____PROJECT INCLUDES_____________________________________________________ */
#include "SSD1289x16.h"
#include "graphic.h"
#include "font.h"

#include "ft18x34.h"

#include "color3.h"

/* _____LOCAL DEFINITIONS____________________________________________________ */

/* _____LOCAL VARIABLES______________________________________________________ */


/* _____PRIVATE FUNCTIONS____________________________________________________ */
int main(void)
{
	uint16_t color[]={0xf800,0x001f,0xffe0,0x0000,0xffff,0x07ff,0xf81f,0x07e0};    

	LCD_Reset();
	LCD_Clear(BLACK);

    for(uint8_t n=0;n<8;n++)    
    {    
    	SetColor(color[n]);
		FillRectangle(0, 40*n, GetMaxX(), 40*(n+1)-1);
   	}    	

	SetColor(WHITE);
	RoundRectangle(0+40, 0+40, GetMaxX()-40, GetMaxY()-40, 10, 1);
	SetColor(BLACK);
	RoundRectangle(0+50, 0+50, GetMaxX()-50, GetMaxY()-50, 10, 0);
	SetColor(RED);
	Circle(GetMaxX() / 2, GetMaxY() / 2, GetMaxX()/4 + 40, 1);
	SetColor(GREEN);
	Circle(GetMaxX() / 2, GetMaxY() / 2, GetMaxX()/4 + 30, 1);
//	SetColor(WHITE);
//	Line(0, 0, GetMaxX(), GetMaxY());
//	Line(0, GetMaxY(), GetMaxX(), 0);

	LcdFont(ft18x34);
	SetFgColor(WHITE);
	DrawText(0,0, GetMaxX(), 30, "BL-TFT320420", ALINE_CENTER);
	SetFgColor(RED);
	DrawText(0,GetMaxY()-30, GetMaxX(), GetMaxY(), "www.thaibestlink.com", ALINE_CENTER);

	LCD_DrawImage(50, 95, gIcon_color3);

	while(1);
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -