📄 gui.c
字号:
const unsigned char char_8s_t[12]={
0x00,0x00,0x00,0x20,0x20,0x70,0x20,0x20,0x20,0x18,0x00,0x00,
};
/*-- 文字: u --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_u[12]={
0x00,0x00,0x00,0x00,0x00,0xD8,0x48,0x48,0x48,0x3C,0x00,0x00,
};
/*-- 文字: v --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_v[12]={
0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x00,0x00,
};
/*-- 文字: w --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_w[12]={
0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x70,0x50,0x50,0x00,0x00,
};
/*-- 文字: x --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_x[12]={
0x00,0x00,0x00,0x00,0x00,0xD8,0x50,0x20,0x50,0xD8,0x00,0x00,
};
/*-- 文字: y --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_y[12]={
0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x20,0xC0,
};
/*-- 文字: z --*/
/*-- 新宋体9; 此字体下对应的点阵为:宽x高=6x12 --*/
/*-- 宽度不是8的倍数,现调整为:宽度x高度=8x12 --*/
const unsigned char char_8s_z[12]={
0x00,0x00,0x00,0x00,0x00,0x78,0x10,0x20,0x20,0x78,0x00,0x00,
};
//8x8数字
const unsigned char number_88[10][8]={
{0x00,0x60,0x90,0x90,0x90,0x90,0x60,0x00},/*"0",0*/
{0x00,0x60,0x20,0x20,0x20,0x20,0x20,0x00},/*"1",1*/
{0x00,0x70,0x10,0x10,0x20,0x40,0x70,0x00},/*"2",2*/
{0x00,0x70,0x10,0x60,0x10,0x10,0x70,0x00},/*"3",3*/
{0x00,0x20,0x60,0x60,0xA0,0xF0,0x20,0x00},/*"4",4*/
{0x00,0x70,0x40,0x60,0x10,0x10,0x60,0x00},/*"5",5*/
{0x00,0x70,0x80,0xF0,0x90,0x90,0x60,0x00},/*"6",6*/
{0x00,0xF0,0x10,0x20,0x40,0x40,0x80,0x00},/*"7",7*/
{0x00,0x70,0x90,0x60,0x90,0x90,0x60,0x00},/*"8",8*/
{0x00,0x60,0x90,0x90,0x70,0x10,0xE0,0x00},/*"9",9*/
};
const unsigned char fuhao_812_dian[12]=
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00};/*".",0*/
const unsigned char fuhao_812_bolang[12]=
{0x30,0x4C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/*"~",1*/
const unsigned char fuhao_812_jiantan[12]=
{0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x18,0x00,0x00};/*"!",2*/
const unsigned char fuhao_812_jing[12]=
{0x00,0x00,0x24,0x24,0xFE,0x48,0x48,0xFE,0x48,0x48,0x00,0x00};/*"#",3*/
const unsigned char fuhao_812_at[12]=
{0x00,0x00,0x3C,0x46,0x9A,0xAA,0xAA,0xBC,0x40,0x3E,0x00,0x00};/*"@",4*/
const unsigned char fuhao_812_dola[12]=
{0x00,0x10,0x3C,0x54,0x50,0x30,0x18,0x14,0x54,0x78,0x10,0x00};/*"$",5*/
const unsigned char fuhao_812_baifen[12]=
{0x00,0x00,0xE4,0xA4,0xA8,0xF0,0x1E,0x2A,0x2A,0x4E,0x00,0x00};/*"%",6*/
const unsigned char fuhao_812_jiankuo[12]=
{0x00,0x1C,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/*"^",7*/
const unsigned char fuhao_812_and[12]=
{0x00,0x00,0x30,0x48,0x48,0x7E,0xA4,0x94,0x88,0x77,0x00,0x00};/*"&",8*/
const unsigned char fuhao_812_xing[12]=
{0x00,0x00,0x00,0x10,0x92,0x7C,0x7C,0x92,0x10,0x00,0x00,0x00};/*"*",9*/
const unsigned char fuhao_812_zuokuo[12]=
{0x00,0x02,0x0C,0x08,0x10,0x10,0x10,0x10,0x08,0x08,0x06,0x00};/*"(",10*/
const unsigned char fuhao_812_youkuo[12]=
{0x00,0x40,0x20,0x10,0x08,0x08,0x08,0x08,0x10,0x20,0x40,0x00};/*")",11*/
const unsigned char fuhao_812_gang[12]=
{0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};/*"-",12*/
const unsigned char fuhao_812_jia[12]=
{0x00,0x00,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x00,0x00,0x00};/*"+",13*/
const unsigned char fuhao_812_deng[12]=
{0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00};/*"=",14*/
const unsigned char fuhao_812_xiaoyu[12]=
{0x00,0x02,0x04,0x18,0x20,0x40,0x20,0x10,0x0C,0x02,0x00,0x00};/*"<",15*/
const unsigned char fuhao_812_dayu[12]=
{0x00,0x40,0x20,0x18,0x04,0x02,0x04,0x08,0x30,0x40,0x00,0x00};/*">",16*/
const unsigned char fuhao_812_wenhao[12]=
{0x00,0x00,0x3C,0x42,0x62,0x02,0x0C,0x08,0x00,0x18,0x00,0x00};/*"?",17*/
const unsigned char fuhao_812_xiegang[12]=
{0x00,0x01,0x02,0x06,0x04,0x08,0x08,0x10,0x20,0x20,0x40,0x00};/*"/",0*/
const unsigned char fuhao_812_maohao[12]=
{0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00};/* : */
/////////////
const unsigned char char_88_a[8]=
{0x00,0x00,0x00,0x38,0x38,0x48,0x38,0x00};/*"a",0*/
const unsigned char char_88_b[8]=
{0x40,0x40,0x40,0x70,0x48,0x48,0x70,0x00};/*"b",1*/
const unsigned char char_88_c[8]=
{0x00,0x00,0x00,0x38,0x40,0x40,0x38,0x00};/*"c",2*/
const unsigned char char_88_d[8]=
{0x08,0x08,0x08,0x38,0x48,0x48,0x38,0x00};/*"d",3*/
const unsigned char char_88_e[8]=
{0x00,0x00,0x00,0x30,0x78,0x40,0x30,0x00};/*"e",4*/
const unsigned char char_88_f[8]=
{0x00,0x10,0x20,0x78,0x20,0x20,0x20,0x00};/*"f",5*/
const unsigned char char_88_g[8]=
{0x00,0x00,0x00,0x38,0x48,0x38,0x08,0x30};/*"g",6*/
const unsigned char char_88_h[8]=
{0x40,0x40,0x40,0x70,0x50,0x50,0x50,0x00};/*"h",7*/
const unsigned char char_88_i[8]=
{0x00,0x00,0x20,0x00,0x20,0x20,0x20,0x00};/*"i",8*/
const unsigned char char_88_j[8]=
{0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x60};/*"j",9*/
const unsigned char char_88_k[8]=
{0x40,0x40,0x40,0x58,0x60,0x50,0x48,0x00};/*"k",10*/
const unsigned char char_88_l[8]=
{0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x00};/*"l",11*/
const unsigned char char_88_m[8]=
{0x00,0x00,0x00,0x78,0x58,0x58,0x58,0x00};/*"m",12*/
const unsigned char char_88_n[8]=
{0x00,0x00,0x00,0x70,0x48,0x48,0x48,0x00};/*"n",13*/
const unsigned char char_88_o[8]=
{0x00,0x00,0x00,0x30,0x48,0x48,0x30,0x00};/*"o",14*/
const unsigned char char_88_p[8]=
{0x00,0x00,0x00,0x70,0x48,0x48,0x70,0x40};/*"p",15*/
const unsigned char char_88_q[8]=
{0x00,0x00,0x00,0x38,0x48,0x48,0x38,0x08};/*"q",16*/
const unsigned char char_88_r[8]=
{0x00,0x00,0x00,0x58,0x60,0x40,0x40,0x00};/*"r",17*/
const unsigned char char_88_s[8]=
{0x00,0x00,0x00,0x38,0x60,0x18,0x70,0x00};/*"s",18*/
const unsigned char char_88_t[8]=
{0x00,0x00,0x20,0x70,0x20,0x20,0x30,0x00};/*"t",19*/
const unsigned char char_88_u[8]=
{0x00,0x00,0x00,0x48,0x48,0x48,0x38,0x00};/*"u",20*/
const unsigned char char_88_v[8]=
{0x00,0x00,0x00,0x48,0x48,0x30,0x30,0x00};/*"v",21*/
const unsigned char char_88_w[8]=
{0x00,0x00,0x00,0xA8,0xA8,0x70,0x50,0x00};/*"w",22*/
const unsigned char char_88_x[8]=
{0x00,0x00,0x00,0x48,0x30,0x30,0x48,0x00};/*"x",23*/
const unsigned char char_88_y[8]=
{0x00,0x00,0x00,0x48,0x48,0x38,0x08,0x30};/*"y",24*/
const unsigned char char_88_z[8]=
{0x00,0x00,0x00,0x78,0x10,0x20,0x78,0x00};/*"z",25*/
const unsigned char char_88_A[8]=
{0x30,0x48,0x48,0x48,0x78,0x48,0x48,0x00};/*"A",26*/
const unsigned char char_88_B[8]=
{0x70,0x48,0x48,0x70,0x48,0x48,0x70,0x00};/*"B",27*/
const unsigned char char_88_C[8]=
{0x30,0x48,0x40,0x40,0x40,0x48,0x30,0x00};/*"C",28*/
const unsigned char char_88_D[8]=
{0x70,0x48,0x48,0x48,0x48,0x48,0x70,0x00};/*"D",29*/
const unsigned char char_88_E[8]=
{0x78,0x40,0x40,0x70,0x40,0x40,0x78,0x00};/*"E",30*/
const unsigned char char_88_F[8]=
{0x78,0x40,0x40,0x70,0x40,0x40,0x40,0x00};/*"F",31*/
const unsigned char char_88_G[8]=
{0x30,0x48,0x40,0x58,0x48,0x48,0x30,0x00};/*"G",32*/
const unsigned char char_88_H[8]=
{0x48,0x48,0x48,0x78,0x48,0x48,0x48,0x00};/*"H",33*/
const unsigned char char_88_I[8]=
{0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00};/*"I",34*/
const unsigned char char_88_J[8]=
{0x08,0x08,0x08,0x08,0x48,0x48,0x30,0x00};/*"J",35*/
const unsigned char char_88_K[8]=
{0x48,0x48,0x50,0x60,0x50,0x48,0x48,0x00};/*"K",36*/
const unsigned char char_88_L[8]=
{0x40,0x40,0x40,0x40,0x40,0x40,0x78,0x00};/*"L",37*/
const unsigned char char_88_M[8]=
{0x48,0x78,0x78,0x48,0x48,0x48,0x48,0x00};/*"M",38*/
const unsigned char char_88_N[8]=
{0x48,0x68,0x68,0x58,0x58,0x48,0x48,0x00};/*"N",39*/
const unsigned char char_88_O[8]=
{0x78,0x48,0x48,0x48,0x48,0x48,0x78,0x00};/*"O",40*/
const unsigned char char_88_P[8]=
{0x70,0x48,0x48,0x70,0x40,0x40,0x40,0x00};/*"P",41*/
const unsigned char char_88_Q[8]=
{0x30,0x48,0x48,0x48,0x68,0x58,0x38,0x00};/*"Q",42*/
const unsigned char char_88_R[8]=
{0x70,0x48,0x48,0x70,0x60,0x50,0x48,0x00};/*"R",43*/
const unsigned char char_88_S[8]=
{0x30,0x48,0x40,0x30,0x08,0x48,0x30,0x00};/*"S",44*/
const unsigned char char_88_T[8]=
{0x78,0x20,0x20,0x20,0x20,0x20,0x20,0x00};/*"T",45*/
const unsigned char char_88_U[8]=
{0x48,0x48,0x48,0x48,0x48,0x48,0x30,0x00};/*"U",46*/
const unsigned char char_88_V[8]=
{0x48,0x48,0x48,0x48,0x30,0x30,0x30,0x00};/*"V",47*/
const unsigned char char_88_W[8]=
{0x48,0x48,0x48,0x48,0x78,0x78,0x48,0x00};/*"W",48*/
const unsigned char char_88_X[8]=
{0x48,0x48,0x30,0x30,0x30,0x48,0x48,0x00};/*"X",49*/
const unsigned char char_88_Y[8]=
{0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x00};/*"Y",50*/
const unsigned char char_88_Z[8]=
{0x78,0x08,0x10,0x30,0x20,0x40,0x78,0x00};/*"Z",51*/
//#ifndef LCM12864Drive_H
//#define LCM12864Drive_H
/******************************************************************************************************************
* 函数名称:GUI_ClearSCR()
* 功 能:清屏。
* 入口参数:无
* 出口参数:无
*******************************************************************************************************************/
#define GUI_ClearSCR() GUI_FillSCR(0x00)
/******************************************************************************************************************
* 函数名称:GUI_CmpColor()
* 功 能:判断颜色值是否一致
* 入口参数:color1 颜色值1
* color2 颜色值2
* 出口参数:返回1表示相同;返回0表示不相同
*******************************************************************************************************************/
#define GUI_CmpColor(color1,color2) ((color1&0x01)==(color2&0x01))
/******************************************************************************************************************
* 函数名称:GUI_CopyColor()
* 功 能:颜色值复制
* 入口参数:color1 目标颜色变量
* color2 源颜色变量
* 出口参数:无
*******************************************************************************************************************/
#define GUI_CopyColor(color1,color2) *color1=color2&0x01
//#endif
/////////////////////////////////////////////
TCOLOR gui_disp_buf[GUI_LCM_YMAX/8][GUI_LCM_XMAX];// 定义显示缓冲区
// 注意:由于LCM12864液晶模块的显示单元是按垂直方向排列的,即1字节
// 数据表示某一列的8个点,所以定义显示缓冲区时就使用了"列宽/8"
// 作为第1维数组的大小。
/******************************************************************************************************************
* 函数名称:LCM12864_Delay()
* 功 能:软件延时函数。用于LCM12864显示输出时序控制。
* 入口参数:无
* 出口参数:无
*******************************************************************************************************************/
void LCM12864_Delay(void)
{
uint8 i;
//for(i=0; i<100; i++); //正常
for(i=0; i<2; i++); //测试
//for(i=0; i<15; i++); //测试
}
/******************************************************************************************************************
* 函数名称:OutData()
* 功 能:输出总线数据/命令。
* 入口参数:dat 8位数据/命令
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -