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

📄 lcdtest.c

📁 基于ARM7的S3C44BO基础测试实验:LCD液晶显示驱动实验.
💻 C
字号:

#include <string.h>

#include "..\inc\44blib.h"
#include "..\inc\44b.h"
#include"..\inc\def.h"
#include "..\inc\glib.h"
#include"..\inc\option.h"
#include "..\inc\LCDTest.h"
#include"..\inc\lcdlib.h"
#include"..\inc\totalBmp.h"

volatile char p_colorbmp = 0 ;
#define ColorBMP_MAX 5
void * ColorBMP[]=
{
	
	(unsigned char *)acpicture1,//
	(unsigned char *)acpicture2,//
	(unsigned char *)acpicture3,//
	(unsigned char *)acpicture4,//
	(unsigned char *)acpicture5 //
};

U8 High_Low( U8 x )
{
	x = ( (x>>1)&0x1c ) | (x>>6) | (x<<5);
	return x ;
}


void LCD_BMP( unsigned char bmp[] )
{
    int i,j,k;

    rPDATE=rPDATE&~(1<<5)|(1<<5);		//GPE5=H	 
    rPCONE=rPCONE&~(3<<10)|(1<<10);		//GPE5=output
    rPCONC=rPCONC&~(0xff<<8)|(0xff<<8);	//GPC[4:7] => VD[7:4]

    Lcd_Init(MODE_COLOR);
    Glib_Init(MODE_COLOR);				//判断用什么显示方式

	k = 0 ;
    for(i=0;i<240;i++)
    {
    	for(j=0;j<320;j++)
    	{
    	    PutPixel( j, i, High_Low( bmp[k] ) );//其中HIGH_low是得到一个转换的东东
    	    k++;
    	}
    }
}


void LCD_Colorbmp(void)	
{

	Uart_Printf("显示彩色图片. Press any key to next picture!\n");

   	 for(p_colorbmp=0;p_colorbmp<ColorBMP_MAX;p_colorbmp++)
		{  
			LCD_BMP(ColorBMP[p_colorbmp]);
	 		Uart_Getch(); 
   	 	}
	 return;
}


void LCD_colInit(void)
{
    int i,j;
    rPCONC=rPCONC&~(0xff<<8)|(0xff<<8);			//GPC[4:7] => VD[7:4]
    rPCONG=rPCONG|(1<<10);
    rPUPG=rPUPG&(1<<5);
    Lcd_DispON();
    Lcd_Init(MODE_COLOR);
    Glib_Init(MODE_COLOR);   
    Glib_ClearScr(120);
   for( j = 0; j < SCR_YSIZE; j += 32 )
		for( i = 0; i < SCR_XSIZE; i += 16 )
		    Glib_FilledRectangle( i, j, i+31, j+31, ((j+i)/32)%256 );
}





⌨️ 快捷键说明

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