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

📄 display.c

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 C
字号:
/*******************
 *    display.c
 *******************/

#include <string.h>
#include "api.h"
#include "lcd.h"
#include "common.h"
#include "display.h"
 
void gfx_bg(void)
{
	UINT8 i;
	
	gfx_set_bg(COLOR_WHITE);
	
	lcd_set_rw_area(SCREEN_START_X,SCREEN_START_Y,SCREEN_WIDTH,SCREEN_HEIGHT);
		
	for(i = 0; i < SCREEN_HEIGHT; i++)
		lcd_put_data((UINT16)bg_pixel, sizeof(bg_pixel));
}

void gfx_bg_rectangle(UINT8 x, UINT8 y, UINT8 w, UINT8 h)
{
	lcd_set_rw_area(x, y, w, h);
	
	while(h--)
		lcd_put_data((UINT16)bg_pixel, w << 1);
}

void gfx_set_bg(UINT16 color)
{
	UINT8 i;
	static UINT16 curr_color;

	if(curr_color != color)
		curr_color = color;
		
	/* Init background pixel */
	for(i = 0; i < SCREEN_WIDTH; i++)
		bg_pixel[i] = color;
}


⌨️ 快捷键说明

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