亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? lcd_.c

?? 基于ARM處理器的S3C44Bx芯片
?? C
字號(hào):
/*********************************************************************************************
* File:	lcd.c
* Author:	embest	
* Desc:	LCD control and display functions
* History:	
*********************************************************************************************/
#include "lcd.h"
#include "bmp.h"
#include "44b.h"

/*------------------------------------------------------------------------------------------*/
/*	 								constant define							 			    */
/*------------------------------------------------------------------------------------------*/
#define XWIDTH 				6

/*------------------------------------------------------------------------------------------*/
/*	 								global variables						 			    */
/*------------------------------------------------------------------------------------------*/
UINT32T g_unLcdActiveBuffer[LCD_YSIZE][LCD_XSIZE/4];

/*------------------------------------------------------------------------------------------*/
/*	 								extern variables						 			    */
/*------------------------------------------------------------------------------------------*/
extern UINT8T g_ucAscii8x16[];
extern UINT8T g_ucAscii6x8[];
#ifdef CHINESE_VERSION
extern const UINT8T g_ucHZK16[];
#endif

/*********************************************************************************************
* name:		lcd_init()
* func:		Initialize LCD Controller
* para:		none
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_init(void)
{     
	rDITHMODE = 0x12210;
	rDP1_2  = 0xa5a5;      
	rDP4_7  = 0xba5da65;
	rDP3_5  = 0xa5a5f;
	rDP2_3  = 0xd6b;
	rDP5_7  = 0xeb7b5ed;
	rDP3_4  = 0x7dbe;
	rDP4_5  = 0x7ebdf;
	rDP6_7  = 0x7fdfbfe;

	// disable,8B_SNGL_SCAN,WDLY=16clk,WLH=16clk,
	rLCDCON1 = (0x0)|(2<<5)|(MVAL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<<12);
	// LINEBLANK=10 (without any calculation) 
	rLCDCON2 = (LINEVAL)|(HOZVAL_COLOR<<10)|(10<<21);  
	rLCDCON3 = 0;

	// 256-color, LCDBANK, LCDBASEU
	rLCDSADDR1 = (0x3<<27) | ( ((unsigned int)g_unLcdActiveBuffer>>22)<<21 ) | M5D((unsigned int)g_unLcdActiveBuffer>>1);
	rLCDSADDR2 = M5D((((unsigned int)g_unLcdActiveBuffer+(SCR_XSIZE*LCD_YSIZE))>>1)) | (MVAL<<21);
	rLCDSADDR3 = (LCD_XSIZE/2) | ( ((SCR_XSIZE-LCD_XSIZE)/2)<<9 );

	//The following value has to be changed for better display.
	rREDLUT  =0xfdb96420; // 1111 1101 1011 1001 0110 0100 0010 0000
	rGREENLUT=0xfdb96420; // 1111 1101 1011 1001 0110 0100 0010 0000
	rBLUELUT =0xfb40;     // 1111 1011 0100 0000

	rLCDCON1=(0x1)|(2<<5)|(MVAL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<<12);
	rPDATE=rPDATE&0x0e;
	lcd_clr();
}

/*********************************************************************************************
* name:		lcd_clr()
* func:		clear LCD screen
* para:		none 
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_clr(void)
{
	UINT32T i;
	UINT32T *pDisp = (UINT32T*)g_unLcdActiveBuffer;
	
	for (i = 0; i < (SCR_XSIZE * SCR_YSIZE  / 4); i++)
	{
		*pDisp++ = ALLWHITE;
	}
}

/*********************************************************************************************
* name:		lcd_clr_rect()
* func:		fill appointed area with appointed color
* para:		usLeft,usTop,usRight,usBottom -- area's rectangle acme coordinate
*			ucColor -- appointed color value
* ret:		none
* modify:
* comment:	also as clear screen function 
*********************************************************************************************/
void lcd_clr_rect(UINT16T usLeft, UINT16T usTop, UINT16T usRight, UINT16T usBottom, UINT8T ucColor)
{
	UINT32T i, j;
	UINT8T  *pDisp = (UINT8T*)g_unLcdActiveBuffer;
	UINT8T  buf[4*1024][4*1024];
	
	for(i=usTop;i<=usBottom;i++)
	{
		for(j=usLeft;j<=usRight;j++)
		{
			buf[i][j]=*(pDisp+i+j);
		}
	}	

	for(i=usTop;i<=usBottom;i++)
	{
		for(j=usLeft;j<=usRight;j++)
		{
			LCD_PutPixel(j, i, ucColor);
		}
	}	
	
	for(i=usTop;i<=usBottom;i++)
	{
		for(j=usLeft;j<=usRight;j++)
		{
			*(pDisp+i+j)=buf[i][j];
		}
	}	

}

/*********************************************************************************************
* name:		lcd_draw_box()
* func:		Draw rectangle with appointed color
* para:		usLeft,usTop,usRight,usBottom -- rectangle's acme coordinate
*			ucColor -- appointed color value
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_draw_box(UINT16T usLeft, UINT16T usTop, UINT16T usRight, UINT16T usBottom, UINT8T ucColor)
{
	lcd_draw_hline(usLeft, usRight,  usTop,    ucColor, 1);
	lcd_draw_hline(usLeft, usRight,  usBottom, ucColor, 1);
	lcd_draw_vline(usTop,  usBottom, usLeft,   ucColor, 1);
	lcd_draw_vline(usTop,  usBottom, usRight,  ucColor, 1);
}

/*********************************************************************************************
* name:		lcd_draw_line()
* func:		Draw line with appointed color
* para:		usX0,usY0 -- line's start point coordinate
*			usX1,usY1 -- line's end point coordinate
*			ucColor -- appointed color value
*			usWidth -- line's width
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_draw_line(UINT16T usX0, UINT16T usY0, UINT16T usX1, UINT16T usY1, UINT8T ucColor, UINT16T usWidth)
{
	UINT16T usDx;
	UINT16T usDy;
	UINT16T y_sign;
	UINT16T x_sign;
	UINT16T decision;
	UINT16T wCurx, wCury, wNextx, wNexty, wpy, wpx;

	if( usY0 == usY1 )
	{
		lcd_draw_hline (usX0, usX1, usY0, ucColor, usWidth);
		return;
	}
	if( usX0 == usX1 )
	{
		lcd_draw_vline (usY0, usY1, usX0, ucColor, usWidth);
		return;
	}
	usDx = abs(usX0 - usX1);
	usDy = abs(usY0 - usY1);
	if( ((usDx >= usDy && (usX0 > usX1)) ||
        ((usDy > usDx) && (usY0 > usY1))) )
    {
        GUISWAP(usX1, usX0);
        GUISWAP(usY1, usY0);
    }
    y_sign = (usY1 - usY0) / usDy;
    x_sign = (usX1 - usX0) / usDx;

    if( usDx >= usDy )
    {
        for( wCurx = usX0, wCury = usY0, wNextx = usX1,
             wNexty = usY1, decision = (usDx >> 1);
             wCurx <= wNextx; wCurx++, wNextx--, decision += usDy )
        {
            if( decision >= usDx )
            {
                decision -= usDx;
                wCury += y_sign;
                wNexty -= y_sign;
            }
            for( wpy = wCury - usWidth / 2;
                 wpy <= wCury + usWidth / 2; wpy++ )
            {
                LCD_PutPixel(wCurx, wpy, ucColor);
            }

            for( wpy = wNexty - usWidth / 2;
                 wpy <= wNexty + usWidth / 2; wpy++ )
            {
                LCD_PutPixel(wNextx, wpy, ucColor);
            }
        }
    }
    else
    {
        for( wCurx = usX0, wCury = usY0, wNextx = usX1,
             wNexty = usY1, decision = (usDy >> 1);
             wCury <= wNexty; wCury++, wNexty--, decision += usDx )
        {
            if( decision >= usDy )
            {
                decision -= usDy;
                wCurx += x_sign;
                wNextx -= x_sign;
            }
            for( wpx = wCurx - usWidth / 2;
                 wpx <= wCurx + usWidth / 2; wpx++ )
            {
                LCD_PutPixel(wpx, wCury, ucColor);
            }

            for( wpx = wNextx - usWidth / 2;
                 wpx <= wNextx + usWidth / 2; wpx++ )
            {
                LCD_PutPixel(wpx, wNexty, ucColor);
            }
        }
    }
}

/*********************************************************************************************
* name:		lcd_draw_hline()
* func:		Draw horizontal line with appointed color
* para:		usX0,usY0 -- line's start point coordinate
*			usX1 -- line's end point X-coordinate
*			ucColor -- appointed color value
*			usWidth -- line's width
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_draw_hline(UINT16T usX0, UINT16T usX1, UINT16T usY0, UINT8T ucColor, UINT16T usWidth)
{
	UINT16T usLen;

    if( usX1 < usX0 )
    {
        GUISWAP (usX1, usX0);
    }

    while( (usWidth--) > 0 )
    {
        usLen = usX1 - usX0 + 1;
        while( (usLen--) > 0 )
        {
        	LCD_PutPixel(usX0 + usLen, usY0, ucColor);
        }
        usY0++;
    }
}

/*********************************************************************************************
* name:		lcd_draw_vline()
* func:		Draw vertical line with appointed color
* para:		usX0,usY0 -- line's start point coordinate
*			usY1 -- line's end point Y-coordinate
*			ucColor -- appointed color value
*			usWidth -- line's width
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_draw_vline (UINT16T usY0, UINT16T usY1, UINT16T usX0, UINT8T ucColor, UINT16T usWidth)
{
	UINT16T usLen;

    if( usY1 < usY0 )
    {
        GUISWAP (usY1, usY0);
    }

    while( (usWidth--) > 0 )
    {
        usLen = usY1 - usY0 + 1;
        while( (usLen--) > 0 )
        {
        	LCD_PutPixel(usX0, usY0 + usLen, ucColor);
        }
        usX0++;
    }
}

/*********************************************************************************************
* name:		lcd_disp_ascii8x16()
* func:		display 8x16 ASCII character string 
* para:		usX0,usY0 -- ASCII character string's start point coordinate
*			ForeColor -- appointed color value
*			pucChar   -- ASCII character string
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_disp_ascii8x16(UINT16T x0, UINT16T y0, UINT8T ForeColor, UINT8T * s)
{
	UINT16T i,j,k,x,y,xx;
	UINT8T qm;
	UINT32T ulOffset;
	INT8T ywbuf[16],temp[2];
    
	for( i = 0; i < strlen((const char*)s); i++ )
	{
		if( (UINT8T)*(s+i) >= 161 )
		{
			temp[0] = *(s + i);
			temp[1] = '\0';
			return;
		}
		else
		{
			qm = *(s+i);
			ulOffset = (UINT32T)(qm) * 16;		//Here to be changed tomorrow
			for( j = 0; j < 16; j ++ )
			{
				ywbuf[j] = g_ucAscii8x16[ulOffset + j];
            }

            for( y = 0; y < 16; y++ )
            {
            	for( x = 0; x < 8; x++ ) 
               	{
                	k = x % 8;
			    	if( ywbuf[y]  & (0x80 >> k) )
			       	{
			       		xx = x0 + x + i*8;
			       		LCD_PutPixel(xx, y + y0, (UINT8T)ForeColor);
			       	}
			   	}
            }
		}
	}
}

/*********************************************************************************************
* name:		lcd_disp_ascii6x8()
* func:		display 6x8 ASCII character string 
* para:		usX0,usY0 -- ASCII character string's start point coordinate
*			ForeColor -- appointed color value
*			pucChar   -- ASCII character string
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_disp_ascii6x8(UINT16T usX0, UINT16T usY0,UINT8T ForeColor, UINT8T* pucChar)
{
	UINT32T i,j;
	UINT8T  ucTemp;

	while( *pucChar != 0 )
	{
		for( i=0; i < 8; i++ )
		{
  			ucTemp = g_ucAscii6x8[(*pucChar) * 8 + i];
  			for( j = 0; j < 8; j++ )
  			{
  				if( (ucTemp & (0x80 >> j)) != 0 )
  				{
  					LCD_PutPixel(usX0 + i, usY0 + 8 - j, (UINT8T)ForeColor);
  				}  				
  			}
		}
		usX0 += XWIDTH;
		pucChar++;
	}
}

#ifdef CHINESE_VERSION
/*********************************************************************************************
* name:		lcd_disp_hz16()
* func:		display chinese character string in 16x16 dot array
* para:		usX0,usY0 -- ASCII character string's start point coordinate
*			ForeColor -- appointed color value
*			pucChar   -- ASCII character string
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void lcd_disp_hz16(UINT16T x0, UINT16T y0, UINT8T ForeColor, UINT8T *s)
{
	UINT16T i,j,k,x,y,xx;
	UINT8T qm,wm;
	UINT32T ulOffset;
	INT8T hzbuf[32],temp[2];

	for( i = 0; i < strlen((const char*)s); i++ )
	{
		if( ((UINT8T)(*(s+i))) < 161 )
		{
			temp[0] = *(s+i);
			temp[1] = '\0';
			break;
		}
		else
		{
			qm = *(s+i) - 161;
    		wm = *(s + i + 1) - 161;
       		ulOffset = (UINT32T)(qm * 94 + wm) * 32;
			for( j = 0; j < 32; j ++ )
            {
            	hzbuf[j] = g_ucHZK16[ulOffset + j];
            }
            for( y = 0; y < 16; y++ )
            {
	        	for( x = 0; x < 16; x++ ) 
	            {
                	k = x % 8;
				   	if( hzbuf[y * 2 + x / 8]  & (0x80 >> k) )
				    {
				    	xx = x0 + x + i * 8;
				    	LCD_PutPixel( xx, y + y0, (UINT8T)ForeColor);
				    }
			   	}
           	}
		    i++;
		}
	}
}
#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久色婷婷小香蕉久久| 国产精品美女久久久久久久久| 国内精品不卡在线| 亚洲欧美日韩在线不卡| 2023国产精品自拍| 精品国产乱码久久久久久浪潮| jlzzjlzz亚洲日本少妇| 韩国女主播成人在线| 久久精品99国产国产精| 视频一区视频二区在线观看| 亚洲欧美日韩中文播放| 国产精品久久久久久亚洲毛片| 国产亚洲一本大道中文在线| 日韩精品最新网址| 精品免费99久久| 精品久久久久久亚洲综合网| 日韩欧美一区在线| 欧美不卡一二三| 26uuu亚洲婷婷狠狠天堂| 久久中文娱乐网| 久久久99精品久久| 久久婷婷成人综合色| 精品国产髙清在线看国产毛片| 日韩视频免费观看高清在线视频| 7777精品伊人久久久大香线蕉最新版| 亚洲自拍欧美精品| 国产精品久久一卡二卡| 麻豆精品新av中文字幕| 在线视频欧美精品| 中文字幕视频一区| 粉嫩av一区二区三区| 日韩免费电影网站| 国产精品午夜免费| 日韩制服丝袜av| 成人福利视频网站| 8x8x8国产精品| 综合中文字幕亚洲| 精品一区二区免费看| 色综合久久天天综合网| 91精品国产乱| 亚洲午夜国产一区99re久久| 国产综合色视频| 欧美日韩成人高清| 中文字幕av免费专区久久| 视频一区二区中文字幕| av在线一区二区| 久久亚洲综合av| 日本不卡不码高清免费观看| 99视频超级精品| 国产亚洲一区字幕| 久久精品国产99| 欧美日韩激情在线| 久久久久久久久久看片| 偷拍一区二区三区四区| 日本精品一区二区三区四区的功能| 337p粉嫩大胆噜噜噜噜噜91av| 一区二区在线免费观看| 成人一级片在线观看| 日韩精品中文字幕一区二区三区| 亚洲国产日韩在线一区模特| 成人深夜在线观看| 国产亚洲成aⅴ人片在线观看| 免费看日韩a级影片| 欧美日韩久久不卡| 午夜不卡在线视频| 欧美日韩在线不卡| 亚洲美女屁股眼交| 欧美日韩久久久| 丝袜亚洲另类欧美综合| 这里只有精品99re| 美国十次综合导航| 久久久久久久久岛国免费| 国产一区二区三区日韩| 亚洲成人在线观看视频| 国产成人av福利| 国产色91在线| 在线视频观看一区| 日本成人超碰在线观看| 国产日韩精品一区二区三区在线| 国产精品99久久久| 亚洲综合偷拍欧美一区色| 日韩一区二区电影| 国产成人超碰人人澡人人澡| 亚洲日本va午夜在线影院| 欧美高清激情brazzers| 国产精品综合一区二区| 亚洲最大色网站| 欧美伦理影视网| 日韩国产在线一| 久久综合中文字幕| 一本色道**综合亚洲精品蜜桃冫 | 亚洲一区二三区| 日韩精品影音先锋| 91国偷自产一区二区三区观看| 蜜臀va亚洲va欧美va天堂| 青青草国产成人av片免费| 久久久久久久综合日本| 欧美美女激情18p| 91小视频在线免费看| 狠狠色狠狠色综合系列| 亚洲国产视频在线| 中文字幕视频一区| 久久婷婷久久一区二区三区| 538在线一区二区精品国产| 成人黄色av网站在线| 免费在线看成人av| 一区二区在线看| 亚洲同性gay激情无套| 久久色在线观看| 欧美日韩成人综合天天影院| 国产酒店精品激情| 蜜桃精品视频在线| 亚洲一区二区三区国产| 国产精品久久久久影院色老大| 精品久久免费看| 日韩亚洲欧美中文三级| 欧美精品乱码久久久久久| 在线免费不卡电影| 在线免费观看日韩欧美| 欧美色综合影院| 91精品国产综合久久福利| 欧美丰满美乳xxx高潮www| 欧美日韩成人一区| 26uuu久久综合| 久久久国产一区二区三区四区小说 | 91麻豆国产福利在线观看| 91丝袜国产在线播放| 欧美丝袜自拍制服另类| 欧美美女bb生活片| 精品国产网站在线观看| 国产欧美精品一区二区色综合朱莉| 精品国产伦理网| 国产精品二三区| 丝袜美腿高跟呻吟高潮一区| 精品一区二区成人精品| 91蜜桃免费观看视频| 欧美日韩一区二区在线观看 | 欧美r级在线观看| 中文字幕亚洲欧美在线不卡| 亚洲18女电影在线观看| 国产一区二区在线观看视频| 99久久综合色| 26uuu色噜噜精品一区| 最新热久久免费视频| 亚洲一区二区不卡免费| 极品少妇xxxx精品少妇| 日本高清不卡在线观看| 久久久久国产一区二区三区四区| 亚洲黄色录像片| 国产精品911| 精品久久久网站| 日本vs亚洲vs韩国一区三区| 色综合天天做天天爱| 国产天堂亚洲国产碰碰| 色中色一区二区| 欧美韩日一区二区三区| 极品美女销魂一区二区三区免费| 欧美性极品少妇| 亚洲美女偷拍久久| 成人激情小说网站| 国产三级精品视频| 韩国女主播一区二区三区| 3d动漫精品啪啪1区2区免费| 亚洲精选视频在线| 日本韩国欧美一区二区三区| 国产精品久久久久永久免费观看 | 久久精品水蜜桃av综合天堂| 久久99国内精品| 精品久久久久一区| 国产乱人伦精品一区二区在线观看| 欧美一区二区三区在线视频| 日韩精品成人一区二区三区| 91精品福利在线一区二区三区| 亚洲大片一区二区三区| 欧美巨大另类极品videosbest | 日韩精品中午字幕| 狠狠狠色丁香婷婷综合激情 | 国产夜色精品一区二区av| 成人性视频免费网站| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲一区二区三区在线| 91精品一区二区三区久久久久久 | 国产在线精品免费| 国产精品福利影院| 欧美性淫爽ww久久久久无| 美女视频一区二区三区| 国产午夜一区二区三区| 成人av网站在线观看免费| 亚洲综合久久av| 日韩三级在线观看| 色婷婷狠狠综合| 精品在线观看视频| 亚洲欧洲制服丝袜| 精品久久久久久久人人人人传媒| 高清久久久久久| 免费成人性网站| 亚洲人成网站影音先锋播放| 亚洲精品在线免费播放| 欧美三级欧美一级| 不卡电影一区二区三区|