display.c

来自「智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder」· C语言 代码 · 共 45 行

C
45
字号
/*******************
 *    display.c
 *******************/

#include <string.h>
#include "api.h"
#include "lcd1.h"
#include "common.h"
#include "display.h"

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;
}


void gfx_filename(UINT8 x, UINT8 y)
{	
	if(*(UINT16 xdata *)curr_finfo.pu8LongFileName == 0) {
		get_short_name(&curr_finfo, _buf);
		lcd_puts(x, y, _buf,0, FONTSIZE_HYPER,0);
	}
	else {
		get_long_name(&curr_finfo, _buf);
		lcd_puts_unicode(x, y, (UINT16 *)_buf,0, FONTSIZE_HYPER,0);
	}
}

⌨️ 快捷键说明

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