?? lcdtest.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 + -