概述
- 我用到的是一块16位彩色的172X220的LCD。
- 解决那些繁琐的通讯和规定指令后,最终需要的是一个函数,可以实现给定x,y坐标和颜色,然后画出对应的点。这个可以说是最基本的函数,只要可以作点,就可以实现驱动整个LCD显示的东西(包括文字,每一个俄罗斯方块,还有图片)
- 下面是驱动程序
GUI.c
#include "stm32f10x.h"
#include "Lcd_Driver.h"
#include "GUI.h"
#include "SysTick.h"//只是为了调用延迟函数
#include "font.h"//字库
//通过该函数转换
//c:GBR格式的颜色值
//返回值:RGB格式的颜色值
u16 LCD_BGR2RGB(u16 c)
{
u16 r,g,b,rgb;
b=(c>>0)&0x1f;
g=(c>>5)&0x3f;
r=(c>>11)&0x1f;
rgb=(b<<11)+(g<<5)+(r<<0);
return(rgb);
}
//画圆函数
void Gui_Circle(u16 X,u16 Y,u16 R,u16 fc)
{//Bresenham算法
unsigned short a,b;
int c;
a=0;
b=R;
c=3-2*R;
while (a<b)
{
Gui_DrawPoint(X+a,Y+b,fc); // 7
Gui_DrawPoint(X-a,Y+b,fc); // 6
Gui_DrawPoint(X+a,Y-b,fc); // 2
Gui_DrawPoint(X-a,Y-b,fc); // 3
Gui_DrawPoint(X+b,Y+a,fc); // 8
Gui_DrawPoint(X-b,Y+a,fc); // 5
Gui_DrawPoint(X+b,Y-a,fc); // 1
Gui_DrawPoint(X-b,Y-a,fc); // 4
if(c<0) c=c+4*a+6;
else
{
c=c+4*(a-b)+10;
b-=1;
}
a+=1;
}
if (a==b)
{
Gui_DrawPoint(X+a,Y+b,fc);
Gui_DrawPoint(X+a,Y+b,fc);
Gui_DrawPoint(X+a,Y-b,fc);
Gui_DrawPoint(X-a,Y-b,fc);
Gui_DrawPoint(X+b,Y+a,fc);
Gui_DrawPoint(X-b,Y+a,fc);
Gui_DrawPoint(X+b,Y-a,fc);
Gui_DrawPoint(X-b,Y-a,fc);
}
}
//画线函数
void Gui_DrawLine(u16 x0, u16 y0,u16 x1, u16 y1,u16 Color)
{
int dx, // difference in x's
dy, // difference in y's
dx2, // dx,dy * 2
dy2,
x_inc, // amount in pixel space to move during drawing
y_inc, // amount in pixel space to move during drawing
error, // the discriminant i.e. error i.e. decision variable
index; // used for looping
Lcd_SetXY(x0,y0);
dx = x1-x0;//计算x距离
dy = y1-y0;//计算y距离
if (dx>=0)
{
x_inc = 1;
}
else
{
x_inc = -1;
dx = -dx;
}
if (dy>=0)
{
y_inc = 1;
}
else
{
y_inc = -1;
dy = -dy;
}
dx2 = dx << 1;
dy2 = dy << 1;
if (dx > dy)//x距离大于y距离,那么每个x轴上只有一个点,每个y轴上有若干个点
{//且线的点数等于x距离,以x轴递增画点
// initialize error term
error = dy2 - dx;
// draw the line
for (index=0; index <= dx; index++)//要画的点数不会超过x距离
{
//画点
Gui_DrawPoint(x0,y0,Color);
// test if error has overflowed
if (error >= 0) //是否需要增加y坐标值
{
error-=dx2;
// move to next line
y0+=y_inc;//增加y坐标值
} // end if error overflowed
// adjust the error term
error+=dy2;
// move to the next pixel
x0+=x_inc;//x坐标值每次画点后都递增1
} // end for
} // end if |slope| <= 1
else//y轴大于x轴,则每个y轴上只有一个点,x轴若干个点
{//以y轴为递增画点
// initialize error term
error = dx2 - dy;
// draw the line
for (index=0; index <= dy; index++)
{
// set the pixel
Gui_DrawPoint(x0,y0,Color);
// test if error overflowed
if (error >= 0)
{
error-=dy2;
// move to next line
x0+=x_inc;
} // end if error overflowed
// adjust the error term
error+=dx2;
// move to the next pixel
y0+=y_inc;
} // end for
} // end else |slope| > 1
}
//void Gui_box(u16 x, u16 y, u16 w, u16 h,u16 bc)
//{
// Gui_DrawLine(x,y,x+w,y,0xEF7D);
// Gui_DrawLine(x+w-1,y+1,x+w-1,y+1+h,0x2965);
// Gui_DrawLine(x,y+h,x+w,y+h,0x2965);
// Gui_DrawLine(x,y,x,y+h,0xEF7D);
// Gui_DrawLine(x+1,y+1,x+1+w-2,y+1+h-2,bc);
//}
//void Gui_box2(u16 x,u16 y,u16 w,u16 h, u8 mode)
//{
// if (mode==0) {
// Gui_DrawLine(x,y,x+w,y,0xEF7D);
// Gui_DrawLine(x+w-1,y+1,x+w-1,y+1+h,0x2965);
// Gui_DrawLine(x,y+h,x+w,y+h,0x2965);
// Gui_DrawLine(x,y,x,y+h,0xEF7D);
// }
// if (mode==1) {
// Gui_DrawLine(x,y,x+w,y,0x2965);
// Gui_DrawLine(x+w-1,y+1,x+w-1,y+1+h,0xEF7D);
// Gui_DrawLine(x,y+h,x+w,y+h,0xEF7D);
// Gui_DrawLine(x,y,x,y+h,0x2965);
// }
// if (mode==2) {
// Gui_DrawLine(x,y,x+w,y,0xffff);
// Gui_DrawLine(x+w-1,y+1,x+w-1,y+1+h,0xffff);
// Gui_DrawLine(x,y+h,x+w,y+h,0xffff);
// Gui_DrawLine(x,y,x,y+h,0xffff);
// }
//}
//显示16号字符的函数(汉字,字符都可以 但需要字库)其中x,y为坐标,fc为字的颜色,bc为背景颜色,*s为对应字符的第一位数据
void Gui_DrawFont_GBK16(u16 x, u16 y, u16 fc, u16 bc, u8 *s)
{
unsigned char i,j;
unsigned short k,x0;
x0=x;
while(*s)
{
if((*s) < 128)
{
k=*s;
if (k==13)
{
x=x0;
y+=16;
}
else
{
if (k>32) k-=32; else k=0;
for(i=0;i<16;i++)
for(j=0;j<8;j++)
{
if(asc16[k*16+i]&(0x80>>j)) Gui_DrawPoint(x+j,y+i,fc);
else
{
if (fc!=bc) Gui_DrawPoint(x+j,y+i,bc);
}
}
x+=8;
}
s++;
}
else
{
for (k=0;k<hz16_num;k++)
{
if ((hz16[k].Index[0]==*(s))&&(hz16[k].Index[1]==*(s+1)))
{
for(i=0;i<16;i++)
{
for(j=0;j<8;j++)
{
if(hz16[k].Msk[i*2]&(0x80>>j)) Gui_DrawPoint(x+j,y+i,fc);
else {
if (fc!=bc) Gui_DrawPoint(x+j,y+i,bc);
}
}
for(j=0;j<8;j++)
{
if(hz16[k].Msk[i*2+1]&(0x80>>j)) Gui_DrawPoint(x+j+8,y+i,fc);
else
{
if (fc!=bc) Gui_DrawPoint(x+j+8,y+i,bc);
}
}
}
}
}
s+=2;x+=16;
}
}
}
//对应的显示24号字的函数
void Gui_DrawFont_GBK24(u16 x, u16 y, u16 fc, u16 bc, u8 *s)
{
unsigned char i,j;
unsigned short k;
while(*s)
{
if( *s < 0x80 )
{
k=*s;
if (k>32) k-=32; else k=0;
for(i=0;i<16;i++)
for(j=0;j<8;j++)
{
if(asc16[k*16+i]&(0x80>>j))
Gui_DrawPoint(x+j,y+i,fc);
else
{
if (fc!=bc) Gui_DrawPoint(x+j,y+i,bc);
}
}
s++;x+=8;
}
else
{
for (k=0;k<hz24_num;k++)
{
if ((hz24[k].Index[0]==*(s))&&(hz24[k].Index[1]==*(s+1)))
{
for(i=0;i<24;i++)
{
for(j=0;j<8;j++)
{
if(hz24[k].Msk[i*3]&(0x80>>j))
Gui_DrawPoint(x+j,y+i,fc);
else
{
if (fc!=bc) Gui_DrawPoint(x+j,y+i,bc);
}
}
for(j=0;j<8;j++)
{
if(hz24[k].Msk[i*3+1]&(0x80>>j)) Gui_DrawPoint(x+j+8,y+i,fc);
else {
if (fc!=bc) Gui_DrawPoint(x+j+8,y+i,bc);
}
}
for(j=0;j<8;j++)
{
if(hz24[k].Msk[i*3+2]&(0x80>>j))
Gui_DrawPoint(x+j+16,y+i,fc);
else
{
if (fc!=bc) Gui_DrawPoint(x+j+16,y+i,bc);
}
}
}
}
}
s+=2;x+=24;
}
}
}
//显示类似数码管显示的函数
void Gui_DrawFont_Num32(u16 x, u16 y, u16 fc, u16 bc, u16 num)
{
unsigned char i,j,k,c;
//lcd_text_any(x+94+i*42,y+34,32,32,0x7E8,0x0,sz32,knum[i]);
// w=w/8;
for(i=0;i<32;i++)
{
for(j=0;j<4;j++)
{
c=*(sz32+num*32*4+i*4+j);
for (k=0;k<8;k++)
{
if(c&(0x80>>k)) Gui_DrawPoint(x+j*8+k,y+i,fc);
else {
if (fc!=bc) Gui_DrawPoint(x+j*8+k,y+i,bc);
}
}
}
}
}
Lcd_Driver.c
#include "stm32f10x.h"
#include "Lcd_Driver.h"
#include "SysTick.h"//只为了调用延迟函数
/***************************************************************************************
//-------------------------------------------------------------------------------------
#define LCD_CTRL GPIOB //定义TFT数据端口
#define LCD_LED GPIO_Pin_9 //PB9 连接至TFT -LED
#define LCD_RS GPIO_Pin_10 //PB10连接至TFT --RS
#define LCD_CS GPIO_Pin_11 //PB11 连接至TFT --CS
#define LCD_RST GPIO_Pin_12 //PB12连接至TFT --RST
#define LCD_SCL GPIO_Pin_13 //PB13连接至TFT -- CLK
#define LCD_SDA GPIO_Pin_15 //PB15连接至TFT - SDI
//VCC:可以接5V也可以接3.3V
//LED:可以接5V也可以接3.3V或者使用任意空闲IO控制(高电平使能)
//GND:接电源地
//说明:如需要尽可能少占用IO,可以将LCD_CS接地,LCD_LED接3.3V,LCD_RST接至单片机复位端,
//将可以释放3个可用IO
//接口定义在Lcd_Driver.h内定义,
//如需变更IO接法,请根据您的实际接线修改相应IO初始化LCD_GPIO_Init()
//-----------------------------------------------------------------------------------------
**********************************************************************************************/
//---------------------------------function----------------------------------------------------//
/****************************************************************************
* 名 称:void LCD_GPIO_Init(void)
* 功 能:STM32_模拟SPI所用到的GPIO初始化
* 入口参数:无
* 出口参数:无
* 说 明:初始化模拟SPI所用的GPIO
****************************************************************************/
void LCD_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOB ,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9| GPIO_Pin_10| GPIO_Pin_11| GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14| GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
}
/****************************************************************************
* 名 称:void SPIv_WriteData(u8 Data)
* 功 能:STM32_模拟SPI写一个字节数据底层函数
* 入口参数:Data
* 出口参数:无
* 说 明:STM32_模拟SPI读写一个字节数据底层函数
****************************************************************************/
void SPIv_WriteData(u8 Data)
{
unsigned char i=0;
for(i=8;i>0;i--)
{
if(Data&0x80)
LCD_SDA_SET; //输出数据
else LCD_SDA_CLR;
LCD_SCL_CLR;
LCD_SCL_SET;
Data<<=1;
}
}
/****************************************************************************
* 名 称:u8 SPI_WriteByte(SPI_TypeDef* SPIx,u8 Byte)
* 功 能:STM32_硬件SPI读写一个字节数据底层函数
* 入口参数:SPIx,Byte
* 出口参数:返回总线收到的数据
* 说 明:STM32_硬件SPI读写一个字节数据底层函数
****************************************************************************/
u8 SPI_WriteByte(SPI_TypeDef* SPIx,u8 Byte)
{
while((SPIx->SR&SPI_I2S_FLAG_TXE)==RESET); //等待发送区空
SPIx->DR=Byte; //发送一个byte
while((SPIx->SR&SPI_I2S_FLAG_RXNE)==RESET);//等待接收完一个byte
return SPIx->DR; //返回收到的数据
}
/****************************************************************************
* 名 称:void SPI_SetSpeed(SPI_TypeDef* SPIx,u8 SpeedSet)
* 功 能:设置SPI的速度
* 入口参数:SPIx,SpeedSet
* 出口参数:无
* 说 明:SpeedSet:1,高速;0,低速;
****************************************************************************/
void SPI_SetSpeed(SPI_TypeDef* SPIx,u8 SpeedSet)
{
SPIx->CR1&=0XFFC7;
if(SpeedSet==1)//高速
{
SPIx->CR1|=SPI_BaudRatePrescaler_2;//Fsck=Fpclk/2
}
else//低速
{
SPIx->CR1|=SPI_BaudRatePrescaler_32; //Fsck=Fpclk/32
}
SPIx->CR1|=1<<6; //SPI设备使能
}
/****************************************************************************
* 名 称:SPI2_Init(void)
* 功 能:STM32_SPI2硬件配置初始化
* 入口参数:无
* 出口参数:无
* 说 明:STM32_SPI2硬件配置初始化
****************************************************************************/
void SPI2_Init(void)
{
SPI_InitTypeDef SPI_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;
//配置SPI2管脚
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO|RCC_APB2Periph_GPIOB, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9|GPIO_Pin_10| GPIO_Pin_11| GPIO_Pin_12;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
//SPI2配置选项
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2 ,ENABLE);
SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_InitStructure.SPI_CRCPolynomial = 7;
SPI_Init(SPI2, &SPI_InitStructure);
//使能SPI2
SPI_Cmd(SPI2, ENABLE);
}
/****************************************************************************
* 名 称:Lcd_WriteIndex(u8 Index)
* 功 能:向液晶屏写一个8位指令
* 入口参数:Index 寄存器地址
* 出口参数:无
* 说 明:调用前需先选中控制器,内部函数
****************************************************************************/
void Lcd_WriteIndex(u8 Index)
{
LCD_CS_CLR;
LCD_RS_CLR;
#if USE_HARDWARE_SPI
SPI_WriteByte(SPI2,Index);
#else
SPIv_WriteData(Index);
#endif
LCD_CS_SET;
}
/****************************************************************************
* 名 称:Lcd_WriteData(u8 Data)
* 功 能:向液晶屏写一个8位数据
* 入口参数:dat 寄存器数据
* 出口参数:无
* 说 明:向控制器指定地址写入数据,内部函数
****************************************************************************/
void Lcd_WriteData(u8 Data)
{
LCD_CS_CLR;
LCD_RS_SET;
#if USE_HARDWARE_SPI
SPI_WriteByte(SPI2,Data);
#else
SPIv_WriteData(Data);
#endif
LCD_CS_SET;
}
/****************************************************************************
* 名 称:void LCD_WriteReg(u8 Index,u16 Data)
* 功 能:写寄存器数据
* 入口参数:Index,Data
* 出口参数:无
* 说 明:本函数为组合函数,向Index地址的寄存器写入Data值
****************************************************************************/
void LCD_WriteReg(u8 Index,u16 Data)
{
Lcd_WriteIndex(Index);
Lcd_WriteData_16Bit(Data);
}
/****************************************************************************
* 名 称:void Lcd_WriteData_16Bit(u16 Data)
* 功 能:向液晶屏写一个16位数据
* 入口参数:Data
* 出口参数:无
* 说 明:向控制器指定地址写入一个16位数据
****************************************************************************/
void Lcd_WriteData_16Bit(u16 Data)
{
Lcd_WriteData(Data>>8);
Lcd_WriteData(Data);
}
/****************************************************************************
* 名 称:void Lcd_Reset(void)
* 功 能:液晶硬复位函数
* 入口参数:无
* 出口参数:无
* 说 明:液晶初始化前需执行一次复位操作
****************************************************************************/
void Lcd_Reset(void)
{
LCD_RST_CLR;
delay_ms(100);
LCD_RST_SET;
delay_ms(50);
}
/****************************************************************************
* 名 称:void Lcd_Init(void)
* 功 能:液晶初始化函数
* 入口参数:无
* 出口参数:无
* 说 明:液晶初始化_ILI9225_176X220
****************************************************************************/
void Lcd_Init(void)
{
#if USE_HARDWARE_SPI //使用硬件SPI
SPI2_Init();
#else
LCD_GPIO_Init();//使用模拟SPI
#endif
Lcd_Reset(); //Reset before LCD Init.
//LCD Init For 2.2inch LCD Panel with ILI9225.
LCD_WriteReg(0x10, 0x0000); // Set SAP,DSTB,STB
LCD_WriteReg(0x11, 0x0000); // Set APON,PON,AON,VCI1EN,VC
LCD_WriteReg(0x12, 0x0000); // Set BT,DC1,DC2,DC3
LCD_WriteReg(0x13, 0x0000); // Set GVDD
LCD_WriteReg(0x14, 0x0000); // Set VCOMH/VCOML voltage
delay_ms(40); // Delay 20 ms
// Please follow this power on sequence
LCD_WriteReg(0x11, 0x0018); // Set APON,PON,AON,VCI1EN,VC
LCD_WriteReg(0x12, 0x1121); // Set BT,DC1,DC2,DC3
LCD_WriteReg(0x13, 0x0063); // Set GVDD
LCD_WriteReg(0x14, 0x3961); // Set VCOMH/VCOML voltage
LCD_WriteReg(0x10, 0x0800); // Set SAP,DSTB,STB
delay_ms(10); // Delay 10 ms
LCD_WriteReg(0x11, 0x1038); // Set APON,PON,AON,VCI1EN,VC
delay_ms(30); // Delay 30 ms
LCD_WriteReg(0x02, 0x0100); // set 1 line inversion
#if USE_HORIZONTAL//如果定义了横屏
//R01H:SM=0,GS=0,SS=0 (for details,See the datasheet of ILI9225)
LCD_WriteReg(0x01, 0x001C); // set the display line number and display direction
//R03H:BGR=1,ID0=1,ID1=1,AM=1 (for details,See the datasheet of ILI9225)
LCD_WriteReg(0x03, 0x1038); // set GRAM write direction .
#else//竖屏
//R01H:SM=0,GS=0,SS=1 (for details,See the datasheet of ILI9225)
LCD_WriteReg(0x01, 0x011C); // set the display line number and display direction
//R03H:BGR=1,ID0=1,ID1=1,AM=0 (for details,See the datasheet of ILI9225)
LCD_WriteReg(0x03, 0x1030); // set GRAM write direction.
#endif
LCD_WriteReg(0x07, 0x0000); // Display off
LCD_WriteReg(0x08, 0x0808); // set the back porch and front porch
LCD_WriteReg(0x0B, 0x1100); // set the clocks number per line
LCD_WriteReg(0x0C, 0x0000); // CPU interface
LCD_WriteReg(0x0F, 0x0501); // Set Osc
LCD_WriteReg(0x15, 0x0020); // Set VCI recycling
LCD_WriteReg(0x20, 0x0000); // RAM Address
LCD_WriteReg(0x21, 0x0000); // RAM Address
//------------------------ Set GRAM area --------------------------------//
LCD_WriteReg(0x30, 0x0000);
LCD_WriteReg(0x31, 0x00DB);
LCD_WriteReg(0x32, 0x0000);
LCD_WriteReg(0x33, 0x0000);
LCD_WriteReg(0x34, 0x00DB);
LCD_WriteReg(0x35, 0x0000);
LCD_WriteReg(0x36, 0x00AF);
LCD_WriteReg(0x37, 0x0000);
LCD_WriteReg(0x38, 0x00DB);
LCD_WriteReg(0x39, 0x0000);
// ---------- Adjust the Gamma 2.2 Curve -------------------//
LCD_WriteReg(0x50, 0x0603);
LCD_WriteReg(0x51, 0x080D);
LCD_WriteReg(0x52, 0x0D0C);
LCD_WriteReg(0x53, 0x0205);
LCD_WriteReg(0x54, 0x040A);
LCD_WriteReg(0x55, 0x0703);
LCD_WriteReg(0x56, 0x0300);
LCD_WriteReg(0x57, 0x0400);
LCD_WriteReg(0x58, 0x0B00);
LCD_WriteReg(0x59, 0x0017);
LCD_WriteReg(0x0F, 0x0701); // Vertical RAM Address Position
LCD_WriteReg(0x07, 0x0012); // Vertical RAM Address Position
delay_ms(50); // Delay 50 ms
LCD_WriteReg(0x07, 0x1017); // Vertical RAM Address Position
}
/*************************************************
函数名:LCD_Set_XY
功能:设置lcd显示起始点
入口参数:xy坐标
返回值:无
*************************************************/
void Lcd_SetXY(u16 Xpos, u16 Ypos)
{
#if USE_HORIZONTAL//如果定义了横屏
LCD_WriteReg(0x21,Xpos);
LCD_WriteReg(0x20,Ypos);
#else//竖屏
LCD_WriteReg(0x20,Xpos);
LCD_WriteReg(0x21,Ypos);
#endif
Lcd_WriteIndex(0x22);
}
/*************************************************
函数名:LCD_Set_Region
功能:设置lcd显示区域,在此区域写点数据自动换行
入口参数:xy起点和终点
返回值:无
*************************************************/
//设置显示窗口
void Lcd_SetRegion(u8 xStar, u8 yStar,u8 xEnd,u8 yEnd)
{
#if USE_HORIZONTAL//如果定义了横屏
LCD_WriteReg(0x38,xEnd);
LCD_WriteReg(0x39,xStar);
LCD_WriteReg(0x36,yEnd);
LCD_WriteReg(0x37,yStar);
LCD_WriteReg(0x21,xStar);
LCD_WriteReg(0x20,yStar);
#else//竖屏
LCD_WriteReg(0x36,xEnd);
LCD_WriteReg(0x37,xStar);
LCD_WriteReg(0x38,yEnd);
LCD_WriteReg(0x39,yStar);
LCD_WriteReg(0x20,xStar);
LCD_WriteReg(0x21,yStar);
#endif
Lcd_WriteIndex(0x22);
}
/*************************************************
函数名:LCD_DrawPoint
功能:画一个点
入口参数:xy坐标和颜色数据
返回值:无
*************************************************/
void Gui_DrawPoint(u16 x,u16 y,u16 Data)
{
Lcd_SetXY(x,y);
Lcd_WriteData_16Bit(Data);
}
/*************************************************
函数名:Lcd_Clear
功能:全屏清屏函数
入口参数:填充颜色COLOR
返回值:无
*************************************************/
void Lcd_Clear(u16 Color)
{
unsigned int i,m;
Lcd_SetRegion(0,0,X_MAX_PIXEL-1,Y_MAX_PIXEL-1);
for(i=0;i<X_MAX_PIXEL;i++)
for(m=0;m<Y_MAX_PIXEL;m++)
{
Lcd_WriteData_16Bit(Color);
}
}
Lcd_Driver.h
#ifndef _LCD_DRIVER_H_
#include "stm32f10x.h"
#define _LCD_DRIVER_H_
//-----------------------------SPI 总线配置--------------------------------------//
#define USE_HARDWARE_SPI 1 //1:Enable Hardware SPI;0:USE Soft SPI
//-------------------------屏幕物理像素设置--------------------------------------//
#define LCD_X_SIZE 220
#define LCD_Y_SIZE 176
/用户配置区///
//支持横竖屏快速定义切换
#define USE_HORIZONTAL 0 //定义是否使用横屏 0,不使用.1,使用.
#ifdef USE_HORIZONTAL//如果定义了横屏
#define X_MAX_PIXEL LCD_Y_SIZE
#define Y_MAX_PIXEL LCD_X_SIZE
#else
#define X_MAX_PIXEL LCD_X_SIZE
#define Y_MAX_PIXEL LCD_Y_SIZE
#endif
//
#define RED 0xf800
#define GREEN 0x07e0
#define BLUE 0x001f
#define WHITE 0xffff
#define BLACK 0x0000
#define YELLOW 0xFFE0
#define GRAY0 0xEF7D //灰色0
#define GRAY1 0x8410 //灰色1 三种灰色不同深度
#define GRAY2 0x4208 //灰色2
//本程序使用的是模拟SPI接口驱动
//可自由更改接口IO配置,使用任意最少4 IO即可完成本款液晶驱动显示
/******************************************************************************
接口定义在Lcd_Driver.h内定义,请根据接线修改并修改相应IO初始化LCD_GPIO_Init()
#define LCD_CTRL GPIOB //定义TFT数据端口
#define LCD_LED GPIO_Pin_9 //PB9 连接至TFT -LED
#define LCD_RS GPIO_Pin_10 //PB10连接至TFT --RS
#define LCD_CS GPIO_Pin_11 //PB11 连接至TFT --CS
#define LCD_RST GPIO_Pin_12 //PB12连接至TFT --RST
#define LCD_SCL GPIO_Pin_13 //PB13连接至TFT -- CLK
#define LCD_SDA GPIO_Pin_15 //PB15连接至TFT - SDI
*******************************************************************************/
#define LCD_CTRL GPIOB //定义TFT数据端口
#define LCD_LED GPIO_Pin_9 //MCU_PB9--->>TFT --BL
#define LCD_RS GPIO_Pin_10 //PB11--->>TFT --RS/DC
#define LCD_CS GPIO_Pin_11 //MCU_PB11--->>TFT --CS/CE
#define LCD_RST GPIO_Pin_12 //PB10--->>TFT --RST
#define LCD_SCL GPIO_Pin_13 //PB13--->>TFT --SCL/SCK
#define LCD_SDA GPIO_Pin_15 //PB15 MOSI--->>TFT --SDA/DIN
//#define LCD_CS_SET(x) LCD_CTRL->ODR=(LCD_CTRL->ODR&~LCD_CS)|(x ? LCD_CS:0)
//液晶控制口置1操作语句宏定义
#define LCD_CS_SET LCD_CTRL->BSRR=LCD_CS
#define LCD_RS_SET LCD_CTRL->BSRR=LCD_RS
#define LCD_SDA_SET LCD_CTRL->BSRR=LCD_SDA
#define LCD_SCL_SET LCD_CTRL->BSRR=LCD_SCL
#define LCD_RST_SET LCD_CTRL->BSRR=LCD_RST
#define LCD_LED_SET LCD_CTRL->BSRR=LCD_LED
//液晶控制口置0操作语句宏定义
#define LCD_CS_CLR LCD_CTRL->BRR=LCD_CS
#define LCD_RS_CLR LCD_CTRL->BRR=LCD_RS
#define LCD_SDA_CLR LCD_CTRL->BRR=LCD_SDA
#define LCD_SCL_CLR LCD_CTRL->BRR=LCD_SCL
#define LCD_RST_CLR LCD_CTRL->BRR=LCD_RST
#define LCD_LED_CLR LCD_CTRL->BRR=LCD_LED
#define LCD_DATAOUT(x) LCD_DATA->ODR=x; //数据输出
#define LCD_DATAIN LCD_DATA->IDR; //数据输入
#define LCD_WR_DATA(data){
LCD_RS_SET;
LCD_CS_CLR;
LCD_DATAOUT(data);
LCD_WR_CLR;
LCD_WR_SET;
LCD_CS_SET;
}
void LCD_GPIO_Init(void);
void Lcd_WriteIndex(u8 Index);
void Lcd_WriteData(u8 Data);
void Lcd_WriteReg(u8 Index,u8 Data);
u16 Lcd_ReadReg(u8 LCD_Reg);
void Lcd_Reset(void);
void Lcd_Init(void);
void Lcd_Clear(u16 Color);
void Lcd_SetXY(u16 x,u16 y);
void Gui_DrawPoint(u16 x,u16 y,u16 Data);
unsigned int Lcd_ReadPoint(u16 x,u16 y);
void Lcd_SetRegion(u8 x_start,u8 y_start,u8 x_end,u8 y_end);
void Lcd_WriteData_16Bit(u16 Data);
#endif
最后是我用到的字库函数 font.h
#ifndef _FONT_H_
#define _FONT_H_
#define USE_ONCHIP_FLASH_FONT 1
const unsigned char asc16[]={
#if USE_ONCHIP_FLASH_FONT
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //" "
0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00, //"!"
0x00,0x00,0x6C,0x6C,0x24,0x24,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, //"""
0x00,0x24,0x24,0x24,0x24,0xFE,0x48,0x48,0x48,0x48,0xFC,0x90,0x90,0x90,0x90,0x00, //"#"
0x00,0x10,0x3C,0x54,0x92,0x90,0x50,0x38,0x14,0x12,0x12,0x92,0x54,0x78,0x10,0x00, //"$"
0x00,0x00,0x22,0x5C,0x94,0xA8,0x48,0x10,0x10,0x24,0x2A,0x52,0x54,0x88,0x00,0x00, //"%"
0x00,0x00,0x30,0x48,0x48,0x50,0x20,0x6E,0x54,0x94,0x8C,0x88,0x8A,0x74,0x00,0x00, //"&"
0x00,0x00,0x30,0x30,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //"'"
0x00,0x04,0x08,0x10,0x10,0x20,0x20,0x20,0x20,0x20,0x20,0x10,0x10,0x08,0x04,0x00, //"("
0x00,0x80,0x40,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x20,0x40,0x80,0x00, //")"
0x00,0x00,0x00,0x00,0x10,0x54,0x38,0x10,0x38,0x54,0x10,0x00,0x00,0x00,0x00,0x00, //"*"
0x00,0x00,0x00,0x10,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00, //"+"
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x20,0x00, //","
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //"-"
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00, //"."
0x00,0x00,0x04,0x04,0x08,0x08,0x10,0x10,0x20,0x20,0x40,0x40,0x80,0x80,0x00,0x00, //"/"
0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00, //"0"
0x00,0x00,0x10,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00, //"1"
0x00,0x00,0x38,0x44,0x82,0x82,0x04,0x08,0x10,0x20,0x40,0x82,0x84,0xFC,0x00,0x00, //"2"
0x00,0x00,0x38,0x44,0x82,0x02,0x04,0x38,0x04,0x02,0x02,0x82,0x44,0x38,0x00,0x00, //"3"
0x00,0x00,0x04,0x0C,0x14,0x14,0x24,0x24,0x44,0x44,0xFE,0x04,0x04,0x0E,0x00,0x00, //"4"
0x00,0x00,0xFC,0x80,0x80,0x80,0xB8,0xC4,0x82,0x02,0x02,0x82,0x84,0x78,0x00,0x00, //"5"
0x00,0x00,0x3C,0x42,0x82,0x80,0xB8,0xC4,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00, //"6"
0x00,0x00,0x7E,0x42,0x82,0x04,0x04,0x08,0x08,0x08,0x10,0x10,0x10,0x10,0x00,0x00, //"7"
0x00,0x00,0x38,0x44,0x82,0x82,0x44,0x38,0x44,0x82,0x82,0x82,0x44,0x38,0x00,0x00, //"8"
0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x46,0x3A,0x02,0x82,0x44,0x38,0x00,0x00, //"9"
0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x00, //":"
0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x20,0x00,0x00, //";"
0x00,0x00,0x00,0x00,0x06,0x18,0x60,0x80,0x60,0x18,0x06,0x00,0x00,0x00,0x00,0x00, //"<"
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, //"="
0x00,0x00,0x00,0x00,0xC0,0x30,0x0C,0x02,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00, //">"
0x00,0x38,0x44,0x82,0x82,0x02,0x04,0x08,0x10,0x10,0x10,0x00,0x10,0x10,0x00,0x00, //"?"
0x00,0x00,0x38,0x44,0x82,0x9A,0xAA,0xAA,0xAA,0xAA,0xAA,0x96,0x80,0x42,0x3C,0x00, //"@"
0x00,0x00,0x10,0x10,0x10,0x28,0x28,0x28,0x44,0x44,0x7C,0x44,0x44,0xEE,0x00,0x00, //"A"
0x00,0x00,0xFC,0x42,0x42,0x42,0x42,0x7C,0x42,0x42,0x42,0x42,0x42,0xFC,0x00,0x00, //"B"
0x00,0x00,0x3C,0x44,0x82,0x80,0x80,0x80,0x80,0x80,0x82,0x82,0x44,0x38,0x00,0x00, //"C"
0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x44,0xF8,0x00,0x00, //"D"
0x00,0x00,0xFC,0x44,0x42,0x40,0x44,0x7C,0x44,0x40,0x40,0x42,0x44,0xFC,0x00,0x00, //"E"
0x00,0x00,0xFC,0x44,0x42,0x40,0x44,0x7C,0x44,0x40,0x40,0x40,0x40,0xF0,0x00,0x00, //"F"
0x00,0x00,0x34,0x4C,0x82,0x80,0x80,0x80,0x8E,0x84,0x84,0x84,0x4C,0x34,0x00,0x00, //"G"
0x00,0x00,0xEE,0x44,0x44,0x44,0x44,0x7C,0x44,0x44,0x44,0x44,0x44,0xEE,0x00,0x00, //"H"
0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00, //"I"
0x00,0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x88,0x88,0x70,0x00,0x00, //"J"
0x00,0x00,0xEE,0x44,0x48,0x48,0x50,0x60,0x50,0x48,0x48,0x44,0x44,0xEE,0x00,0x00, //"K"
0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x42,0x44,0xFC,0x00,0x00, //"L"
0x00,0x00,0xC6,0x44,0x6C,0x6C,0x6C,0x54,0x54,0x54,0x44,0x44,0x44,0xEE,0x00,0x00, //"M"
0x00,0x00,0xCE,0x44,0x64,0x64,0x64,0x54,0x54,0x4C,0x4C,0x4C,0x44,0xE4,0x00,0x00, //"N"
0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00, //"O"
0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x44,0x78,0x40,0x40,0x40,0x40,0xE0,0x00,0x00, //"P"
0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0xBA,0x44,0x3C,0x02,0x00, //"Q"
0x00,0x00,0xF0,0x48,0x44,0x44,0x44,0x48,0x70,0x48,0x44,0x44,0x44,0xE6,0x00,0x00, //"R"
0x00,0x00,0x3C,0x44,0x82,0x80,0x40,0x30,0x0C,0x02,0x02,0x82,0x44,0x78,0x00,0x00, //"S"
0x00,0x00,0x7C,0x54,0x92,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00, //"T"
0x00,0x00,0xEE,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00, //"U"
0x00,0x00,0xEE,0x44,0x44,0x44,0x44,0x28,0x28,0x28,0x28,0x10,0x10,0x10,0x00,0x00, //"V"
0x00,0x00,0xEE,0x44,0x54,0x54,0x54,0x54,0x54,0x54,0x28,0x28,0x28,0x28,0x00,0x00, //"W"
0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x10,0x10,0x28,0x28,0x44,0x44,0xEE,0x00,0x00, //"X"
0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x28,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00, //"Y"
0x00,0x00,0x7E,0x44,0x84,0x08,0x08,0x10,0x20,0x20,0x40,0x82,0x84,0xFC,0x00,0x00, //"Z"
0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1C,0x00, //"["
0x00,0x00,0xEE,0x44,0x54,0x54,0xFE,0x54,0x54,0x54,0x28,0x28,0x28,0x28,0x00,0x00, //""
0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x70,0x00, //"]"
0x00,0x30,0x48,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //"^"
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00, //"_"
0x00,0x40,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //"`"
0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x84,0x04,0x7C,0x84,0x84,0x8C,0x76,0x00,0x00, //"a"
0x00,0x00,0xC0,0x40,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x42,0x64,0x58,0x00,0x00, //"b"
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x44,0x80,0x80,0x80,0x80,0x44,0x38,0x00,0x00, //"c"
0x00,0x00,0x0C,0x04,0x04,0x04,0x34,0x4C,0x84,0x84,0x84,0x84,0x4C,0x36,0x00,0x00, //"d"
0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x84,0x84,0xFC,0x80,0x80,0x84,0x78,0x00,0x00, //"e"
0x00,0x00,0x18,0x24,0x20,0x20,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, //"f"
0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x44,0x44,0x78,0x80,0x7C,0x82,0x82,0x7C,0x00, //"g"
0x00,0x00,0xC0,0x40,0x40,0x40,0x58,0x64,0x44,0x44,0x44,0x44,0x44,0xEE,0x00,0x00, //"h"
0x00,0x00,0x10,0x10,0x00,0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00, //"i"
0x00,0x00,0x10,0x10,0x00,0x00,0x30,0x10,0x10,0x10,0x10,0x10,0x10,0x90,0x60,0x00, //"j"
0x00,0x00,0xC0,0x40,0x40,0x40,0x5C,0x48,0x50,0x60,0x50,0x48,0x44,0xEE,0x00,0x00, //"k"
0x00,0x00,0x30,0x10,0x10,0x10,0x10,0x11,0x10,0x10,0x10,0x10,0x10,0x39,0x00,0x00, //"l"
0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xD2,0x92,0x92,0x92,0x92,0x92,0xD6,0x00,0x00, //"m"
0x00,0x00,0x00,0x00,0x00,0x00,0x58,0xE4,0x44,0x44,0x44,0x44,0x44,0xEE,0x00,0x00, //"n"
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00, //"o"
0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x64,0x42,0x42,0x42,0x64,0x58,0x40,0xE0,0x00, //"p"
0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x4C,0x84,0x84,0x84,0x4C,0x34,0x04,0x0E,0x00, //"q"
0x00,0x00,0x00,0x00,0x00,0x00,0x6C,0x30,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, //"r"
0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x88,0x84,0x60,0x18,0x84,0x44,0x78,0x00,0x00, //"s"
0x00,0x00,0x00,0x20,0x20,0x20,0xF8,0x20,0x20,0x20,0x20,0x20,0x24,0x18,0x00,0x00, //"t"
0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x42,0x42,0x42,0x42,0x42,0x46,0x3A,0x00,0x00, //"u"
0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x28,0x10,0x10,0x00,0x00, //"v"
0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x44,0x44,0x54,0x54,0x28,0x28,0x28,0x00,0x00, //"w"
0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x44,0x28,0x10,0x10,0x28,0x44,0xEE,0x00,0x00, //"x"
0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x10,0x10,0xA0,0xC0,0x00, //"y"
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x44,0x88,0x10,0x20,0x42,0x84,0xFC,0x00,0x00, //"z"
0x00,0x0C,0x10,0x10,0x10,0x10,0x10,0x60,0x10,0x10,0x10,0x10,0x10,0x10,0x0C,0x00, //"{"
0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00, //"|"
0x00,0xC0,0x20,0x20,0x20,0x20,0x20,0x18,0x20,0x20,0x20,0x20,0x20,0x20,0xC0,0x00, //"}"
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x72,0x8C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //"~"
#endif
0x00,
};
//数码管字体 %
const unsigned char sz32[]={
#if USE_ONCHIP_FLASH_FONT
//"0",
0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,0x01,0x80,0x06,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x01,0x80,0x06,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,
//"1",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x03,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x03,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,
//"2",
0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0xFF,0xF0,0x00,0x01,0xFF,0xE0,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x1F,0xE3,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xF8,0x00,0x00,0x1F,0xE0,0x00,0x03,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x1F,0xF0,0x00,0x00,0x3F,0xF8,0x00,0x00,0x3F,0xFC,0x00,0x00,0x1F,0xFE,0x00,
//"3",
0x00,0x00,0x00,0x00,0x03,0xFF,0x80,0x00,0x01,0xFF,0xC0,0x00,0x00,0xFF,0xC0,0x00,0x00,0x7F,0x80,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x7F,0x8C,0x00,0x01,0xFF,0xE0,0x00,0x01,0xFF,0xF0,0x00,0x00,0x7F,0x80,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x18,0x00,0x00,0x7F,0x80,0x00,0x00,0xFF,0xC0,0x00,0x01,0xFF,0xC0,0x00,0x03,0xFF,0x80,0x00,
//"4",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x07,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0x1F,0xE3,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xFC,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
//"5",
0x00,0x00,0x00,0x00,0x00,0x1F,0xFC,0x00,0x00,0x3F,0xF8,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,0x01,0x80,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0x1F,0xE0,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xF8,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x06,0x00,0x00,0x3F,0xE0,0x00,0x00,0x7F,0xF0,0x00,0x00,0xFF,0xF0,0x00,0x01,0xFF,0xE0,0x00,
//"6",
0x00,0x00,0x00,0x00,0x00,0x1F,0xFC,0x00,0x00,0x3F,0xF8,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,0x01,0x80,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0x1F,0xE0,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xFC,0x00,0x00,0x1F,0xE0,0x00,0x03,0x00,0x03,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x01,0x80,0x06,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,
//"7",
0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x03,0xFF,0xC0,0x00,0x01,0xFF,0x88,0x00,0x00,0xFF,0x18,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,
//"8",
0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,0x01,0x80,0x06,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0x1F,0xE3,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xFC,0x00,0x00,0x1F,0xE0,0x00,0x03,0x00,0x03,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x01,0x80,0x06,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,
//"9",
0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x1F,0xE0,0x00,0x01,0x80,0x06,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0xC0,0x0F,0x00,0x03,0x1F,0xE3,0x00,0x00,0x7F,0xF8,0x00,0x00,0x7F,0xFC,0x00,0x00,0x1F,0xE0,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x06,0x00,0x00,0x1F,0xE0,0x00,0x00,0x3F,0xF0,0x00,0x00,0x7F,0xF0,0x00,0x00,0xFF,0xE0,0x00,
//".",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//":",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x0F,0x80,0x00,0x00,0x0F,0x80,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x0F,0x80,0x00,0x00,0x0F,0x80,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//"%",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x06,0x00,0x0F,0xE0,0x06,0x00,0x00,0x00,0x0C,0x00,0x30,0x18,0x18,0x00,0x30,0x18,0x18,0x00,0x30,0x18,0x30,0x00,0x30,0x18,0x30,0x00,0x30,0x18,0x60,0x00,0x30,0x08,0xC0,0x00,0x07,0xC0,0xC0,0x00,0x0F,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0x06,0x07,0xC0,0x00,0x06,0x30,0x18,0x00,0x0C,0x30,0x18,0x00,0x0C,0x30,0x18,0x00,0x18,0x30,0x18,0x00,0x30,0x30,0x18,0x00,0x30,0x30,0x18,0x00,0x60,0x00,0x00,0x00,0xC0,0x0F,0xE0,0x00,0xC0,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//"℃",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xE0,0x00,0x08,0x87,0xFC,0x00,0x08,0x8E,0x03,0x00,0x08,0x98,0x01,0x80,0x07,0x18,0x00,0x80,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x18,0x01,0x00,0x00,0x0C,0x03,0x00,0x00,0x07,0xFC,0x00,0x00,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//"-",
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xF0,0x00,0x00,0x7F,0xF0,0x00,0x00,0x7F,0xE0,0x00,0x00,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
#endif
0x00,
};
struct typFNT_GB162
{
unsigned char Index[2];
char Msk[32];
};
//宋体5号
#define hz16_num 50
const struct typFNT_GB162 hz16[] = {
#if USE_ONCHIP_FLASH_FONT
"分",0x00,0x40,0x04,0x40,0x04,0x20,0x08,0x20,0x10,0x10,0x20,0x08,0x40,0x04,0x9F,0xE2,0x04,0x20,0x04,0x20,0x04,0x20,0x08,0x20,0x08,0x20,0x10,0x20,0x21,0x40,0x40,0x80,/*"?",0*/
"得",0x08,0x00,0x0B,0xF8,0x12,0x08,0x23,0xF8,0x4A,0x08,0x0B,0xF8,0x10,0x00,0x33,0xFC,0x50,0x10,0x97,0xFE,0x10,0x10,0x12,0x10,0x11,0x10,0x10,0x10,0x10,0x50,0x10,0x20,/*"?",0*/
":",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,/*":",0*/
"等",0x20,0x40,0x3F,0x7E,0x48,0x90,0x85,0x08,0x01,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00,0x00,0x20,0x7F,0xFC,0x08,0x20,0x04,0x20,0x04,0xA0,0x00,0x40,/*"?",0*/
"级",0x10,0x00,0x13,0xFC,0x20,0x84,0x20,0x88,0x48,0x88,0xF8,0x90,0x10,0x9C,0x20,0x84,0x41,0x44,0xF9,0x44,0x41,0x28,0x01,0x28,0x1A,0x10,0xE2,0x28,0x44,0x44,0x01,0x82,/*"?",1*/
#endif
0x00,
};
struct typFNT_GB242
{
unsigned char Index[2];
char Msk[72];
};
#define hz24_num 40
const struct typFNT_GB242 hz24[] =
{
#if USE_ONCHIP_FLASH_FONT
"游",0x00,0x00,0x00,0x00,0x00,0xC0,0x1C,0x60,0xC0,0x0E,0x71,0xC0,0x06,0x31,0x80,0x00,0x01,0xFE,0x03,0xFF,0x00,0x73,0x63,0x00,0x3B,0x67,0xFE,0x1E,0x60,0x1C,0x1E,0x7E,0x18,0x06,0xEC,0x70,0x0C,0xEC,0x70,0x0C,0xCC,0x70,0x0C,0xCF,0xFE,0x7C,0xCC,0x70,0x18,0xCC,0x70,0x19,0x8C,0x70,0x19,0x9C,0x70,0x1B,0x18,0x70,0x3B,0xF8,0x70,0x06,0x38,0xF0,0x0C,0x00,0x60,0x00,0x00,0x00,/*"?",0*/
"戏",0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x06,0x00,0x00,0x06,0xE0,0x00,0x06,0x78,0x7F,0xE6,0x38,0x00,0xE6,0x18,0x00,0xC6,0x0E,0x00,0xC7,0xFC,0x19,0xFF,0x00,0x0D,0x87,0x18,0x0F,0x83,0x1C,0x07,0x83,0x38,0x03,0x83,0x70,0x07,0xC3,0xE0,0x07,0xC1,0xE0,0x0E,0xE1,0xC0,0x0C,0x63,0xC6,0x18,0x67,0xE6,0x30,0x0C,0x76,0x30,0x38,0x3E,0x60,0x60,0x1E,0x00,0x00,0x07,0x00,0x00,0x00,/*"?",1*/
"结",0x00,0x00,0x00,0x00,0x01,0x80,0x07,0x81,0xC0,0x07,0x01,0x80,0x06,0x01,0x80,0x0E,0x01,0x80,0x0C,0xFF,0xFE,0x18,0xE1,0x80,0x19,0xC1,0x80,0x31,0x81,0x80,0x3F,0x1F,0xFC,0x03,0x00,0x00,0x06,0x00,0x00,0x0C,0x00,0x00,0x19,0xFF,0xFC,0x3F,0x1C,0x1C,0x18,0x1C,0x1C,0x00,0x1C,0x1C,0x01,0xFC,0x1C,0x0F,0x1C,0x1C,0x3C,0x1F,0xFC,0x30,0x1C,0x1C,0x00,0x18,0x18,0x00,0x00,0x00,/*"?",2*/
"束",0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x7F,0xFF,0xFE,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x30,0x07,0xFF,0xF8,0x06,0x1C,0x30,0x06,0x1C,0x30,0x06,0x1C,0x30,0x07,0xFF,0xF0,0x06,0x3E,0x30,0x06,0x7E,0x00,0x00,0xFF,0x00,0x01,0xDD,0x80,0x01,0x9C,0xC0,0x03,0x1C,0xF0,0x06,0x1C,0x7C,0x1C,0x1C,0x1E,0x30,0x1C,0x0C,0x00,0x18,0x00,0x00,0x00,0x00,/*"?",3*/
",",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x0E,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*",",4*/
"本",0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x0C,0x3F,0xFF,0xFE,0x00,0x3E,0x00,0x00,0x3E,0x00,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0xFD,0x80,0x00,0xDD,0xC0,0x01,0xDC,0xC0,0x03,0x9C,0x60,0x03,0x1C,0x70,0x06,0x1C,0xFC,0x0F,0xFF,0xFF,0x38,0x1C,0x0C,0x60,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,/*"?",5*/
"次",0x00,0x00,0x00,0x00,0x0E,0x00,0x18,0x0E,0x00,0x0C,0x0E,0x00,0x0E,0x0C,0x00,0x06,0xDC,0x00,0x07,0x9F,0xFE,0x01,0x98,0x0C,0x01,0xB3,0x18,0x03,0x33,0x30,0x03,0x63,0x80,0x06,0xC3,0x80,0x07,0x87,0x80,0x0C,0x07,0x80,0x3C,0x06,0xC0,0x1C,0x06,0xC0,0x0C,0x0E,0x60,0x0C,0x0C,0x60,0x1C,0x18,0x30,0x1C,0x30,0x38,0x1C,0x60,0x1E,0x01,0xC0,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,/*"?",6*/
"得",0x00,0x00,0x00,0x01,0x80,0x00,0x03,0xFF,0xF8,0x07,0x38,0x18,0x06,0x38,0x18,0x0C,0x3F,0xF8,0x19,0xF8,0x18,0x31,0xF8,0x18,0x03,0xB8,0x18,0x03,0x3F,0xF8,0x06,0x38,0x1C,0x0E,0x7F,0xFE,0x1E,0x00,0x30,0x36,0x00,0x36,0x66,0xFF,0xFF,0x06,0x30,0x30,0x06,0x18,0x30,0x06,0x0C,0x30,0x06,0x0E,0x30,0x06,0x0C,0x30,0x06,0x03,0x70,0x06,0x01,0xF0,0x06,0x00,0x60,0x00,0x00,0x00,/*"?",7*/
"分",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0xE3,0x00,0x00,0xE3,0x00,0x01,0xC3,0x00,0x01,0x81,0x80,0x03,0x81,0xC0,0x03,0x00,0xC0,0x06,0x00,0x70,0x0C,0x00,0xF8,0x1F,0xFF,0xFF,0x70,0x30,0xCC,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x60,0xC0,0x00,0x60,0xC0,0x00,0xC0,0xC0,0x00,0xC0,0xC0,0x01,0x81,0xC0,0x03,0x01,0xC0,0x0E,0x0F,0x80,0x18,0x03,0x00,0x00,0x00,0x00,/*"?",8*/
":",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*":",9*/
"请",0x00,0x00,0x00,0x00,0x03,0x00,0x0C,0x03,0x80,0x0E,0x03,0x8C,0x0E,0xFF,0xFE,0x06,0x03,0x98,0x00,0x3F,0xFC,0x00,0x03,0x80,0x00,0x03,0x86,0x7F,0xFF,0xFE,0x0E,0x00,0x00,0x0E,0x00,0x00,0x0E,0x3F,0xF8,0x0E,0x38,0x18,0x0E,0x3F,0xF8,0x0E,0x38,0x18,0x0E,0xF8,0x18,0x0F,0xBF,0xF8,0x0F,0x38,0x18,0x0F,0x38,0x18,0x0E,0x38,0x18,0x00,0x38,0xF8,0x00,0x30,0x30,0x00,0x00,0x00,/*"?",20*/
"按",0x00,0x00,0x00,0x06,0x03,0x00,0x07,0x03,0x80,0x06,0x01,0x80,0x06,0x01,0x80,0x06,0x1F,0xFE,0x7F,0xF0,0x0E,0x06,0x73,0x0C,0x06,0x03,0x00,0x06,0x07,0x00,0x07,0x86,0x00,0x07,0xFF,0xFE,0x0E,0x0C,0x38,0x3E,0x0C,0x30,0x36,0x18,0x70,0x06,0x18,0x60,0x06,0x1E,0xE0,0x06,0x03,0xC0,0x06,0x01,0xF0,0x06,0x03,0xBC,0x06,0x0E,0x1E,0x1E,0x38,0x0E,0x0C,0xE0,0x00,0x00,0x00,0x00,/*"?",21*/
"”",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x18,0x00,0x06,0x30,0x00,0x0C,0x60,0x00,0x0C,0x60,0x00,0x1E,0xF8,0x00,0x1F,0xF8,0x00,0x0E,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?,22*/
"上",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x30,0x00,0x3F,0xF8,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x0C,0x7F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",23*/
"“",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x78,0x00,0x0F,0x78,0x00,0x07,0x38,0x00,0x03,0x18,0x00,0x06,0x30,0x00,0x0C,0x60,0x00,0x18,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?,24*/
"继",0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xC0,0x07,0x38,0xC0,0x06,0x30,0xC0,0x0E,0x3C,0xCC,0x0C,0x36,0xDC,0x18,0xF7,0xD8,0x19,0xF0,0xF0,0x31,0xB0,0xC0,0x3F,0xBF,0xFE,0x03,0x31,0xC0,0x06,0x31,0xC0,0x0C,0x31,0xF0,0x18,0x33,0xF8,0x3F,0xB3,0xDC,0x18,0x36,0xCC,0x00,0x3C,0xC0,0x00,0xF8,0xC0,0x07,0xB0,0xC0,0x3C,0x30,0xC0,0x30,0x7F,0xFE,0x00,0x30,0x00,0x00,0x00,0x00,/*"?",25*/
"续",0x00,0x00,0x00,0x00,0x03,0x80,0x07,0x01,0x80,0x0E,0x01,0x98,0x0C,0x3F,0xFC,0x0C,0x01,0x80,0x19,0xC1,0x80,0x19,0xFF,0xFE,0x31,0x80,0x0E,0x7F,0x19,0xCC,0x33,0x0F,0x80,0x06,0x07,0x80,0x0C,0x39,0x80,0x1C,0x19,0x80,0x3F,0x99,0x80,0x3C,0xFF,0xFE,0x00,0x01,0x80,0x00,0x03,0x80,0x03,0xC3,0xC0,0x3E,0x07,0x78,0x38,0x0E,0x1C,0x00,0x38,0x0C,0x01,0xE0,0x00,0x00,0x00,0x00,/*"?",26*/
"。",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x19,0x80,0x00,0x19,0x80,0x00,0x19,0x80,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",27*/
"欢",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x07,0x00,0x7F,0xE6,0x00,0x00,0xE6,0x00,0x00,0xC7,0xFE,0x30,0xCD,0x8E,0x19,0xCD,0xCC,0x0D,0x99,0xD8,0x07,0x99,0xC0,0x07,0xB1,0xC0,0x03,0x03,0xC0,0x07,0x83,0x60,0x07,0xC3,0x60,0x0E,0xE7,0x60,0x0C,0xE6,0x70,0x18,0x6E,0x30,0x30,0x7C,0x38,0x30,0x38,0x1C,0x60,0x60,0x0F,0x01,0xC0,0x00,0x00,0x00,0x00,/*"?",0*/
"迎",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x0C,0x0F,0x80,0x0E,0x78,0x00,0x06,0x61,0xFE,0x00,0x61,0x8C,0x00,0x61,0x8C,0x00,0x61,0x8C,0x7F,0x61,0x8C,0x06,0x61,0x8C,0x06,0x61,0x8C,0x06,0x61,0x8C,0x06,0x67,0x8C,0x06,0x7D,0x8C,0x06,0x71,0xFC,0x06,0x61,0x9C,0x06,0x01,0x80,0x1F,0x01,0x80,0x71,0xC1,0x80,0x30,0xFE,0x3F,0x00,0x1F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",1*/
"来",0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x18,0x1F,0xFF,0xFC,0x00,0x1C,0x60,0x03,0x1C,0x78,0x03,0x9C,0xE0,0x01,0xDC,0xC0,0x01,0x9D,0x8C,0x7F,0xFF,0xFE,0x00,0x3E,0x00,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0xFD,0x80,0x01,0xDC,0xC0,0x03,0x9C,0xE0,0x07,0x1C,0x78,0x0E,0x1C,0x3F,0x18,0x1C,0x0C,0x30,0x1C,0x00,0x00,0x18,0x00,0x00,0x00,0x00,/*"?",2*/
"到",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x3F,0xFE,0x0E,0x01,0xC0,0x0E,0x01,0xC0,0xCE,0x03,0x00,0xCE,0x06,0x38,0xCE,0x0C,0x1C,0xCE,0x1F,0xFE,0xCE,0x1D,0xCE,0xCE,0x01,0xC6,0xCE,0x01,0xC0,0xCE,0x01,0xCC,0xCE,0x3F,0xFE,0xCE,0x01,0xC0,0xCE,0x01,0xC0,0xCE,0x01,0xC0,0xCE,0x01,0xC6,0x0E,0x01,0xFC,0x0E,0x1F,0x80,0x0E,0x3C,0x00,0x7C,0x00,0x00,0x1C,0x00,0x00,0x00,/*"?",3*/
"俄",0x00,0x00,0x00,0x03,0x01,0x80,0x03,0x01,0xC0,0x07,0x0F,0xB0,0x06,0x79,0x98,0x07,0xF9,0x9C,0x0C,0x39,0x8C,0x0E,0x39,0x8C,0x1F,0xFF,0xFE,0x1E,0x39,0xC0,0x3E,0x39,0xCC,0x6E,0x39,0xDC,0x6E,0x3E,0xDC,0x0E,0x38,0xD8,0x0E,0xF8,0xF0,0x0F,0xF8,0xF0,0x0F,0xB8,0xE0,0x0E,0x38,0xE6,0x0E,0x39,0xF6,0x0E,0x3B,0x3E,0x0F,0xFE,0x1E,0x0E,0x70,0x0E,0x0C,0x00,0x00,0x00,0x00,0x00,/*"?",4*/
"罗",0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFC,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0F,0xFF,0xFC,0x0C,0x30,0x1C,0x18,0x70,0x00,0x00,0xFF,0xF0,0x01,0xC0,0x60,0x03,0x80,0xE0,0x07,0xE0,0xC0,0x0C,0x71,0xC0,0x38,0x73,0x80,0x00,0x07,0x00,0x00,0x0E,0x00,0x00,0x38,0x00,0x00,0xE0,0x00,0x07,0x80,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,/*"?",5*/
"斯",0x00,0x00,0x00,0x00,0x60,0x00,0x06,0x70,0x0E,0x06,0x73,0xF8,0x06,0x73,0x80,0x3F,0xFF,0x80,0x06,0x73,0x80,0x06,0x73,0x80,0x07,0xF3,0x80,0x06,0x73,0xFE,0x06,0x73,0x98,0x07,0xF3,0x98,0x06,0x73,0x98,0x06,0x73,0x98,0x7F,0xFF,0x98,0x00,0x03,0x18,0x06,0x63,0x18,0x07,0x33,0x18,0x0E,0x3E,0x18,0x0C,0x1E,0x18,0x18,0x0C,0x18,0x30,0x18,0x18,0x00,0x30,0x18,0x00,0x00,0x00,/*"?",6*/
"方",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x0C,0x06,0x7F,0xFF,0xFF,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x3F,0xF0,0x00,0x70,0x70,0x00,0x70,0x70,0x00,0x60,0x60,0x00,0xE0,0x60,0x00,0xC0,0x60,0x01,0xC0,0xE0,0x03,0x80,0xE0,0x03,0x00,0xE0,0x06,0x1C,0xC0,0x1C,0x07,0xC0,0x30,0x03,0x00,0x00,0x00,0x00,/*"?",7*/
"块",0x00,0x00,0x00,0x00,0x06,0x00,0x07,0x07,0x00,0x06,0x06,0x00,0x06,0x06,0x00,0x06,0x06,0x00,0x06,0x7F,0xF8,0x06,0xC6,0x38,0x7F,0xE6,0x38,0x06,0x06,0x38,0x06,0x06,0x38,0x06,0x06,0x38,0x06,0x06,0x3E,0x07,0xFF,0xFF,0x06,0x07,0x80,0x06,0x0F,0x80,0x07,0xCD,0x80,0x3F,0x0C,0xC0,0x78,0x18,0x60,0x00,0x30,0x70,0x00,0x60,0x3C,0x01,0xC0,0x1F,0x07,0x00,0x0C,0x00,0x00,0x00,/*"?",8*/
"傻",0x00,0x00,0x00,0x03,0x06,0x00,0x03,0x86,0x00,0x03,0x06,0x00,0x07,0x7F,0xFC,0x06,0x7C,0xCC,0x06,0x77,0xCC,0x0E,0x73,0xCC,0x0E,0x7E,0x6C,0x1E,0x7F,0xFC,0x36,0x7C,0xCC,0x36,0x1E,0x78,0x66,0x3E,0x1C,0x06,0x67,0x0E,0x07,0xCF,0xF6,0x06,0x1C,0x70,0x06,0x1C,0x60,0x06,0x36,0xE0,0x06,0x63,0xC0,0x06,0x03,0x80,0x06,0x0E,0xE0,0x06,0x38,0x7F,0x07,0xE0,0x0E,0x00,0x00,0x00,/*"?",0*/
"逼",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x1C,0xFF,0xFE,0x0E,0x00,0x00,0x06,0x3F,0xF0,0x00,0x38,0x30,0x00,0x38,0x30,0x00,0x3F,0xF0,0x06,0x38,0x30,0x7F,0x00,0x00,0x06,0x7F,0xFC,0x06,0x63,0x18,0x06,0x63,0x18,0x06,0x63,0x18,0x06,0x7F,0xF8,0x06,0x63,0x18,0x06,0x63,0x18,0x0E,0x7F,0xF8,0x1B,0x60,0x18,0x71,0xC0,0x00,0x30,0x7F,0xFF,0x00,0x1F,0xFC,0x00,0x00,0x00,/*"?",1*/
"东",0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x30,0x18,0x3F,0xFF,0xFC,0x00,0x60,0x00,0x00,0xE0,0x00,0x00,0xC0,0x00,0x01,0xCE,0x00,0x03,0x8C,0x00,0x03,0x0C,0x30,0x0F,0xFF,0xF8,0x06,0x0C,0x00,0x00,0xCC,0x00,0x00,0xEC,0xC0,0x01,0xCC,0x60,0x03,0x8C,0x38,0x07,0x0C,0x1C,0x0C,0x0C,0x0E,0x18,0x0C,0x0E,0x30,0xEC,0x00,0x00,0x3C,0x00,0x00,0x18,0x00,0x00,0x00,0x00,/*"?",2*/
"西",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x3F,0xFF,0xFE,0x00,0x63,0x00,0x00,0x63,0x00,0x00,0x63,0x00,0x00,0x63,0x00,0x1F,0xFF,0xFC,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0x63,0x1C,0x0C,0xE3,0x1C,0x0C,0xC3,0x1C,0x0C,0xC3,0x1C,0x0D,0x83,0xFC,0x0F,0x00,0x1C,0x0E,0x00,0x1C,0x0C,0x00,0x1C,0x0F,0xFF,0xFC,0x0C,0x00,0x1C,0x1C,0x00,0x18,0x00,0x00,0x00,/*"?",3*/
"开",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3F,0xFF,0xFC,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x8C,0x7F,0xFF,0xFE,0x00,0xC1,0x80,0x00,0xC1,0x80,0x00,0xC1,0x80,0x01,0xC1,0x80,0x01,0x81,0x80,0x01,0x81,0x80,0x03,0x01,0x80,0x07,0x01,0x80,0x0E,0x01,0x80,0x18,0x01,0x80,0x30,0x01,0x80,0x00,0x00,0x00,/*"?",0*/
"始",0x00,0x00,0x00,0x06,0x01,0x80,0x07,0x01,0xC0,0x07,0x03,0x80,0x06,0x03,0x00,0x06,0x03,0x00,0x7F,0xE6,0x30,0x0C,0x66,0x1C,0x0C,0xEC,0x0E,0x0C,0xFC,0x7E,0x1C,0xDF,0xC6,0x18,0xC0,0x06,0x18,0xC0,0x00,0x19,0xCF,0xFC,0x31,0x8E,0x0C,0x1F,0x8E,0x0C,0x07,0x8E,0x0C,0x03,0xCE,0x0C,0x07,0xEE,0x0C,0x0E,0x6E,0x0C,0x0C,0x0F,0xFC,0x38,0x0E,0x0C,0x60,0x0C,0x00,0x00,0x00,0x00,/*"?",1*/
"已",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0F,0xFF,0xF0,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x70,0x0C,0x00,0x70,0x0E,0x00,0x70,0x0F,0xFF,0xF0,0x0E,0x00,0x70,0x0E,0x00,0x00,0x0E,0x00,0x00,0x0E,0x00,0x00,0x0E,0x00,0x00,0x0E,0x00,0x0C,0x0E,0x00,0x0C,0x0E,0x00,0x0C,0x0E,0x00,0x0C,0x0E,0x00,0x0E,0x07,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",0*/
"暂",0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x80,0x7E,0x03,0x1B,0xC0,0x3F,0xFF,0x00,0x06,0xC3,0x00,0x0E,0xDB,0xFE,0x1F,0xFF,0x30,0x00,0xC3,0x30,0x00,0xFF,0x30,0x1F,0xC6,0x30,0x3C,0xCE,0x30,0x00,0xD8,0x30,0x01,0xB0,0x30,0x03,0xFF,0xF0,0x03,0x00,0x30,0x03,0x00,0x30,0x03,0xFF,0xF0,0x03,0x00,0x30,0x03,0x00,0x30,0x03,0x00,0x30,0x03,0xFF,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,/*"?",1*/
"停",0x00,0x00,0x00,0x00,0x06,0x00,0x07,0x07,0x00,0x06,0x03,0x0C,0x07,0xFF,0xFE,0x0E,0x00,0x00,0x0C,0x3F,0xF0,0x0E,0x30,0x30,0x1C,0x30,0x30,0x1C,0x3F,0xF0,0x3C,0x30,0x30,0x3C,0xFF,0xFE,0x6D,0x80,0x0C,0x0D,0x80,0x0C,0x0C,0x7F,0xF8,0x0C,0x03,0x80,0x0C,0x03,0x80,0x0C,0x03,0x80,0x0C,0x03,0x80,0x0C,0x03,0x80,0x0C,0x03,0x80,0x0C,0x0F,0x00,0x0C,0x07,0x00,0x00,0x00,0x00,/*"?",2*/
#endif
0x00,
};
#endif
关于这些字库里面汉字和字符的代码是怎么生成的,这里提供两个软件
一个是把文字生成代码的
还有一个是把图片生成代码的
文件内有适合这个项目教程。
文字提取软件
图片提取软件
总工程文件:点击下载
最后
以上就是冷艳大地为你收集整理的基于stm32的俄罗斯方块游戏机(2、LCD的驱动)(大三寒假)的全部内容,希望文章能够帮你解决基于stm32的俄罗斯方块游戏机(2、LCD的驱动)(大三寒假)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复