📄 lcm.c
字号:
函数名:LCM_SDOVER()
功能:LCM显示SD卡连接失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SDOVER(void)
{
//显示【连接SD卡失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0D,W42); //“连”
LCM_WriteChinese(y,0x0F,W43); //“接”
LCM_WriteEnglish(y,0x11,No28); //写字母“S”
LCM_WriteEnglish(y,0x12,No13); //写字母“D”
LCM_WriteChinese(y,0x13,W41); //“卡”
LCM_WriteChinese(y,0x15,W44); //“失”
LCM_WriteChinese(y,0x17,W45); //“败”
LCM_WriteChinese(y,0x19,W77); //“!”
}
/*=========================================================
函数名:LCM_ClearRegistryERR()
功能:LCM显示清除SD卡注册表失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_ClearRegistryERR(void)
{
//显示【清除SD卡注册表失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0A,W46); //“清”
LCM_WriteChinese(y,0x0C,W47); //“除”
LCM_WriteEnglish(y,0x0E,No28); //写字母“S”
LCM_WriteEnglish(y,0x0F,No13); //写字母“D”
LCM_WriteChinese(y,0x10,W41); //“卡”
LCM_WriteChinese(y,0x12,W48); //“注”
LCM_WriteChinese(y,0x14,W49); //“册”
LCM_WriteChinese(y,0x16,W50); //“表”
LCM_WriteChinese(y,0x18,W44); //“失”
LCM_WriteChinese(y,0x1A,W45); //“败”
LCM_WriteChinese(y,0x1C,W77); //“!”
}
/*=========================================================
函数名:LCM_SD_ClearRegistryOver()
功能:LCM显示清除SD卡数据完成函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_ClearRegistryOver(void)
{
//显示【清除SD卡注册表完成!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0A,W46); //“清”
LCM_WriteChinese(y,0x0C,W47); //“除”
LCM_WriteEnglish(y,0x0E,No28); //写字母“S”
LCM_WriteEnglish(y,0x0F,No13); //写字母“D”
LCM_WriteChinese(y,0x10,W41); //“卡”
LCM_WriteChinese(y,0x12,W48); //“注”
LCM_WriteChinese(y,0x14,W49); //“册”
LCM_WriteChinese(y,0x16,W50); //“表”
LCM_WriteChinese(y,0x18,W55); //“完”
LCM_WriteChinese(y,0x1A,W56); //“成”
LCM_WriteChinese(y,0x1C,W77); //“!”
}
/*=========================================================
函数名:LCM_SD_CheckRegistryERR()
功能:LCM显示读取SD卡注册表失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_CheckRegistryERR(void)
{
//显示【检测SD卡注册表失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0A,W51); //“检”
LCM_WriteChinese(y,0x0C,W52); //“测”
LCM_WriteEnglish(y,0x0E,No28); //写字母“S”
LCM_WriteEnglish(y,0x0F,No13); //写字母“D”
LCM_WriteChinese(y,0x10,W41); //“卡”
LCM_WriteChinese(y,0x12,W48); //“注”
LCM_WriteChinese(y,0x14,W49); //“册”
LCM_WriteChinese(y,0x16,W50); //“表”
LCM_WriteChinese(y,0x18,W44); //“失”
LCM_WriteChinese(y,0x1A,W45); //“败”
LCM_WriteChinese(y,0x1C,W77); //“!”
}
/*=========================================================
函数名:LCM_SD_ClearDataERR()
功能:LCM显示清除SD卡数据失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_ClearDataERR(void)
{
//显示【清除SD卡数据失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0B,W46); //“清”
LCM_WriteChinese(y,0x0D,W47); //“除”
LCM_WriteEnglish(y,0x0F,No28); //写字母“S”
LCM_WriteEnglish(y,0x10,No13); //写字母“D”
LCM_WriteChinese(y,0x11,W41); //“卡”
LCM_WriteChinese(y,0x13,W53); //“数”
LCM_WriteChinese(y,0x15,W54); //“据”
LCM_WriteChinese(y,0x17,W44); //“失”
LCM_WriteChinese(y,0x19,W45); //“败”
LCM_WriteChinese(y,0x1B,W77); //“!”
}
/*=========================================================
函数名:LCM_SD_ClearDataOver()
功能:LCM显示清除SD卡数据完成函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_ClearDataOver(void)
{
//显示【清除SD卡数据完成!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0B,W46); //“清”
LCM_WriteChinese(y,0x0D,W47); //“除”
LCM_WriteEnglish(y,0x0F,No28); //写字母“S”
LCM_WriteEnglish(y,0x10,No13); //写字母“D”
LCM_WriteChinese(y,0x11,W41); //“卡”
LCM_WriteChinese(y,0x13,W53); //“数”
LCM_WriteChinese(y,0x15,W54); //“据”
LCM_WriteChinese(y,0x17,W55); //“完”
LCM_WriteChinese(y,0x19,W56); //“成”
LCM_WriteChinese(y,0x1B,W77); //“!”
}
/*=========================================================
函数名:LCM_CreateRegistryERR()
功能:LCM显示创建注册表失败函数
入口参数:区号,从机号(2字节)
出口参数:无
=========================================================*/
void LCM_CreateRegistryERR(Uchar Part,Uchar No)
{
//显示 【XX区XX号】
//显示【创建SD卡注册表失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x50; //定义纵坐标值
LCM_No(y,0x10,Part); //显示区号
LCM_WriteChinese(y,0x12,W84); //“区”
LCM_No(y,0x14,No); //显示从机号
LCM_WriteChinese(y,0x16,W130); //“号”
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0A,W57); //“创”
LCM_WriteChinese(y,0x0C,W58); //“建”
LCM_WriteEnglish(y,0x0E,No28); //写字母“S”
LCM_WriteEnglish(y,0x0F,No13); //写字母“D”
LCM_WriteChinese(y,0x10,W41); //“卡”
LCM_WriteChinese(y,0x12,W48); //“注”
LCM_WriteChinese(y,0x14,W49); //“册”
LCM_WriteChinese(y,0x16,W50); //“表”
LCM_WriteChinese(y,0x18,W44); //“失”
LCM_WriteChinese(y,0x1A,W45); //“败”
LCM_WriteChinese(y,0x1C,W77); //“!”
}
/*=========================================================
函数名:LCM_CreateRegistryOver()
功能:LCM显示创建注册表完成函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_CreateRegistryOver(Uchar Part,Uchar No)
{
//显示 【XX区XX号】
//显示【创建SD卡注册表完成!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x50; //定义纵坐标值
LCM_No(y,0x10,Part); //显示区号
LCM_WriteChinese(y,0x12,W84); //“区”
LCM_No(y,0x14,No); //显示从机号
LCM_WriteChinese(y,0x16,W130); //“号”
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0A,W57); //“创”
LCM_WriteChinese(y,0x0C,W58); //“建”
LCM_WriteEnglish(y,0x0E,No28); //写字母“S”
LCM_WriteEnglish(y,0x0F,No13); //写字母“D”
LCM_WriteChinese(y,0x10,W41); //“卡”
LCM_WriteChinese(y,0x12,W48); //“注”
LCM_WriteChinese(y,0x14,W49); //“册”
LCM_WriteChinese(y,0x16,W50); //“表”
LCM_WriteChinese(y,0x18,W55); //“完”
LCM_WriteChinese(y,0x1A,W56); //“成”
LCM_WriteChinese(y,0x1C,W77); //“!”
}
/*=========================================================
函数名:LCM_CheckAllDataWarning()
功能:LCM显示总抄表警示函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_CheckAllDataWarning(void)
{
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x60; //显示纵坐标赋值
//显示【正在进行抄表,请稍候…】
LCM_WriteChinese(y,0x09,W59); //“正”
LCM_WriteChinese(y,0x0B,W60); //“在”
LCM_WriteChinese(y,0x0D,W61); //“进”
LCM_WriteChinese(y,0x0F,W62); //“行”
LCM_WriteChinese(y,0x11,W79); //“抄”
LCM_WriteChinese(y,0x13,W50); //“表”
LCM_WriteChinese(y,0x15,W78); //“,”
LCM_WriteChinese(y,0x17,W63); //“请”
LCM_WriteChinese(y,0x19,W64); //“稍”
LCM_WriteChinese(y,0x1B,W65); //“候”
LCM_WriteChinese(y,0x1D,W66); //“…”
//显示【请勿切断电源或进行其它操作!】
y+=0x18; //下一行
LCM_WriteChinese(y,0x06,W63); //“请”
LCM_WriteChinese(y,0x08,W67); //“勿”
LCM_WriteChinese(y,0x0A,W68); //“切”
LCM_WriteChinese(y,0x0C,W69); //“断”
LCM_WriteChinese(y,0x0E,W70); //“电”
LCM_WriteChinese(y,0x10,W71); //“源”
LCM_WriteChinese(y,0x12,W72); //“或”
LCM_WriteChinese(y,0x14,W61); //“进”
LCM_WriteChinese(y,0x16,W62); //“行”
LCM_WriteChinese(y,0x18,W73); //“其”
LCM_WriteChinese(y,0x1A,W74); //“它”
LCM_WriteChinese(y,0x1C,W75); //“操”
LCM_WriteChinese(y,0x1E,W76); //“作”
LCM_WriteChinese(y,0x20,W77); //“!”
}
/*=========================================================
函数名:LCM_CheckAllDataERR()
功能:LCM显示总抄表失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_CheckAllDataERR(void)
{
//显示【抄表失败!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0B,W79); //“抄”
LCM_WriteChinese(y,0x0F,W50); //“表”
LCM_WriteChinese(y,0x13,W44); //“失”
LCM_WriteChinese(y,0x17,W45); //“败”
LCM_WriteChinese(y,0x1B,W77); //“!”
}
/*=========================================================
函数名:LCM_CheckAllDataOver()
功能:LCM显示总抄表完成函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_CheckAllDataOver(void)
{
//显示【抄表完成!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x68; //显示纵坐标赋值
LCM_WriteChinese(y,0x0B,W79); //“抄”
LCM_WriteChinese(y,0x0F,W50); //“表”
LCM_WriteChinese(y,0x13,W55); //“完”
LCM_WriteChinese(y,0x17,W56); //“成”
LCM_WriteChinese(y,0x1B,W77); //“!”
}
/*=========================================================
函数名:LCM_CheckDateERR()
功能:LCM显示日期错误函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_CheckDateERR(void)
{
//显示【抄表检测日期错误!】
Uchar y; //声明变量
LCM_ClearWorkSpace(); //清除工作区
y=0x60; //显示纵坐标赋值
LCM_WriteChinese(y,0x0D,W51); //“检”
LCM_WriteChinese(y,0x0F,W52); //“测”
LCM_WriteChinese(y,0x11,W20); //“日”
LCM_WriteChinese(y,0x13,W22); //“期”
LCM_WriteChinese(y,0x15,W80); //“错”
LCM_WriteChinese(y,0x17,W81); //“误”
LCM_WriteChinese(y,0x19,W77); //“!”
//显示【请检查系统日期!】
y=0x78; //定位行
LCM_WriteChinese(y,0x0C,W63); //“请”
LCM_WriteChinese(y,0x0E,W51); //“检”
LCM_WriteChinese(y,0x10,W132); //“查”
LCM_WriteChinese(y,0x12,W141); //“系”
LCM_WriteChinese(y,0x14,W142); //“统”
LCM_WriteChinese(y,0x16,W20); //“日”
LCM_WriteChinese(y,0x18,W22); //“期”
LCM_WriteChinese(y,0x1A,W77); //“!”
}
/*=========================================================
函数名:LCM_CheckDateERR()
功能:LCM显示数字代码函数
入口参数:位置(2个字节),数字(1个字节)
出口参数:无
=========================================================*/
void LCM_No(Uchar x,Uchar y,Uchar z)
{
//在相关位置显示数字
Uchar shi,ge;
shi=z/10;
ge=z%10;
switch(shi)
{
case 0:
LCM_WriteEnglish(x,y,No0); //写数字“0”
break; //中断退出
case 1:
LCM_WriteEnglish(x,y,No1); //写数字“0”
break; //中断退出
case 2:
LCM_WriteEnglish(x,y,No2); //写数字“0”
break; //中断退出
case 3:
LCM_WriteEnglish(x,y,No3); //写数字“0”
break; //中断退出
case 4:
LCM_WriteEnglish(x,y,No4); //写数字“0”
break; //中断退出
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -