📄 setup.lst
字号:
929 8 delayTimerh(TMSGWAITTIME);
930 8 }
931 7 else
932 7 {
933 8 displaymessage(LMMASTERCHANGEFAIL,LINE1);
934 8 displaymessage(LMMASTERBACKTO0,LINE2);
935 8 delayTimerh(TMSGWAITTIME);
936 8 ram_writep0(MASTERCHANGED,0);
937 8 }
938 7 }
939 6 else
940 6 {
941 7 displaymessage(LMBLANK,LINE1);
942 7 displaymessage(LMMASTERCHANGEOK,LINE2);
943 7 delayTimerh(TMSGWAITTIME);
944 7
945 7 }
946 6
947 6 clearsetup();
948 6 setmasterchangedisp();
949 6
950 6 }
951 5
952 5 }
953 4 }
954 3 }
955 2 }
956 1 }
957 ////////////////////////////////////////////////////////////////////////////////////
958 ////////////////////////////////////////////////////////////////////////////////////
959 void setpowerinitpass()
960 {
961 1 if((keynumber==CANCEL)||(keynumber==ENTER));
962 1 else
963 1 {
964 2 dispbuff[LINE2][setcount+MASTERPASSSTARTP]=keynumber;
965 2 displaybyte('*',MASTERPASSSTARTP+setcount+0x40+SET_DDRAM_ADD);
966 2 keybuff[setcount]=keynumber;
967 2 //display(LINE2);
968 2 setcount++;
969 2 lcdcuron(MASTERPASSSTARTP+setcount,LINE2);
970 2 if(setcount>=4)
971 2 {
972 3 clearsetup();
973 3 passinflag=0;
974 3 setflag=0;
975 3
976 3 keybuff[0]=(keybuff[0]<<4)+keybuff[1];
977 3 keybuff[1]=(keybuff[2]<<4)+keybuff[3];
978 3 if((keybuff[0]==MASTERPASSHIGH)&&(keybuff[1]==MASTERPASSLOW))
979 3 {
980 4 displaymessage(LMBLANK,LINE1);
981 4 displaymessage(LMINITIALIZE,LINE2);
982 4 initfpsystem();
983 4 displaymessage(LMBLANK,LINE1);
984 4 displaymessage(LMSYSINITOK,LINE2);
C51 COMPILER V7.01 SETUP 03/08/2007 12:09:38 PAGE 17
985 4
986 4 delayTimerh(TMSGWAITTIME);
987 4
988 4 displaymessage(LMBLANK,LINE1);
989 4 displaymessage(LMSWITCH,LINE2);
990 4 }
991 3 while(1)delayTimerh(T100MS);
992 3 }
993 2 }
994 1 }
995 ////////////////////////////////////////////////////////////////////////////////////
996 void setsysinitdisp()
997 {
998 1 if(!submenuflag)
999 1 {
1000 2 setupitem=SETSYSINIT;
1001 2 displaymessage(LMSYSTEMINIT,LINE1);
1002 2 displaymessage(LMBLANK,LINE2);
1003 2 }
1004 1 else
1005 1 {
1006 2 displaymessage(LMYESNO,LINE2);
1007 2 }
1008 1 }
1009 ////////////////////////////////////////////////////////////////////////////////////
1010 void setsysinit() //ok
1011 {
1012 1 if(keynumber==0xff)setsysinitdisp();
1013 1 else
1014 1 {
1015 2 if(!submenuflag)
1016 2 {
1017 3 if(keynumber==ENTER)
1018 3 {
1019 4 submenuflag=1;
1020 4 //setsysinit(0xff);
1021 4 setsysinitdisp();
1022 4 }
1023 3 else if(keynumber==CANCEL)terminatesetup();
1024 3 else if(keynumber==NUMBER6)setidcleardisp();
1025 3 else if(keynumber==NUMBER4)setmasterchangedisp();
1026 3 }
1027 2 else
1028 2 {
1029 3 if((keynumber==ENTER)||(keynumber==CANCEL)||(keynumber==NUMBER0))
1030 3 {
1031 4 //submenuflag=0;
1032 4 clearsetup();
1033 4 setsysinitdisp();
1034 4 //setsysinit(0xff);
1035 4 }
1036 3 else if(keynumber==NUMBER1)
1037 3 {
1038 4 submenuflag=0;
1039 4 //here initialize the system
1040 4 displaymessage(LMBLANK,LINE1);
1041 4 displaymessage(LMINITIALIZE,LINE2);
1042 4 initfpsystem();
1043 4 displaymessage(LMBLANK,LINE1);
1044 4 displaymessage(LMSYSINITOK,LINE2);
1045 4
1046 4 delayTimerh(TMSGWAITTIME);
C51 COMPILER V7.01 SETUP 03/08/2007 12:09:38 PAGE 18
1047 4
1048 4
1049 4 setsysinitdisp();
1050 4 }
1051 3 }
1052 2 }
1053 1 }
1054 //////////////////////////////////////////////////////////////
1055 void setidcleardisp()
1056 {
1057 1 if(!submenuflag)
1058 1 {
1059 2 setupitem=SETCLEARID;
1060 2 displaymessage(LMIDCLEAR,LINE1);
1061 2 displaymessage(LMBLANK,LINE2);
1062 2 }
1063 1 else
1064 1 {
1065 2 displaymessage(LMYESNO,LINE2);
1066 2 }
1067 1 }
1068
1069 //////////////////////////////////////////////////////////////
1070 void setidclear()
1071 {
1072 1 if(keynumber==0xff)setidcleardisp();
1073 1 else
1074 1 {
1075 2 if(!submenuflag)
1076 2 {
1077 3 if(keynumber==ENTER)
1078 3 {
1079 4 submenuflag=1;
1080 4 //setidclear(0xff);
1081 4 setidcleardisp();
1082 4 }
1083 3 else if(keynumber==CANCEL)terminatesetup();
1084 3 else if(keynumber==NUMBER6)settscleardisp();
1085 3 else if(keynumber==NUMBER4)setsysinitdisp();
1086 3 }
1087 2 else
1088 2 {
1089 3 if((keynumber==ENTER)||(keynumber==CANCEL)||(keynumber==NUMBER0))
1090 3 {
1091 4 //submenuflag=0;
1092 4 clearsetup();
1093 4 setidcleardisp();
1094 4 //setidclear(0xff);
1095 4 }
1096 3 else if(keynumber==NUMBER1)
1097 3 {
1098 4 submenuflag=0;
1099 4 //here clear all the id registered
1100 4 //deletealluser();
1101 4 //rdeletealluser();
1102 4 displaymessage(LMBLANK,LINE1);
1103 4 displaymessage(LMUSERCLEANING,LINE2);
1104 4
1105 4 userclear();
1106 4 setidcleardisp();
1107 4 }
1108 3 }
C51 COMPILER V7.01 SETUP 03/08/2007 12:09:38 PAGE 19
1109 2 }
1110 1 }
1111 ////////////////////////////////////////////////////
1112 void settscleardisp()
1113 {
1114 1 if(!submenuflag)
1115 1 {
1116 2 setupitem=SETCLEARTS;
1117 2 displaymessage(LMTSCLEAR,LINE1);
1118 2 displaymessage(LMBLANK,LINE2);
1119 2 }
1120 1 else
1121 1 {
1122 2 displaymessage(LMYESNO,LINE2);
1123 2 }
1124 1 }
1125 ////////////////////////////////////////////////////
1126 void settsclear()
1127 {
1128 1 if(keynumber==0xff)settscleardisp();
1129 1 else
1130 1 {
1131 2 if(!submenuflag)
1132 2 {
1133 3 if(keynumber==ENTER)
1134 3 {
1135 4 submenuflag=1;
1136 4 //settsclear(0xff);
1137 4 settscleardisp();
1138 4 }
1139 3 else if(keynumber==CANCEL)terminatesetup();
1140 3 else if(keynumber==NUMBER6)setkeyindisp();
1141 3 else if(keynumber==NUMBER4)setidcleardisp();
1142 3 }
1143 2 else
1144 2 {
1145 3 if((keynumber==ENTER)||(keynumber==CANCEL)||(keynumber==NUMBER0))
1146 3 {
1147 4 //submenuflag=0;
1148 4 //settsclear(0xff);
1149 4 clearsetup();
1150 4 settscleardisp();
1151 4 }
1152 3 else if(keynumber==NUMBER1)
1153 3 {
1154 4 submenuflag=0;
1155 4 //here clear the ts
1156 4 clearts();
1157 4 settscleardisp();
1158 4 }
1159 3 }
1160 2 }
1161 1 }
1162 //////////////////////////////////////////////////////////////////////////////
1163 unsigned char code tblkeyinsel[2]={LMDISABLE,LMENABLE};
1164 //////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -