📄 tv.lst
字号:
else
{
_sTunerPLL.wDB -= 0x02;
}
_bSearchState = S_STATE_SET;
}
break;
}
*/
if ((--_bSearchVerifyCnt)>0)
{
_bSearchState = S_STATE_CHECK_PLLLOCK;
break;
}
else
{
if (dir == UP_SEARCH)
{
_sTunerPLL.wDB+= 0x02; //05Jun08 test
}
C51 COMPILER V8.05a TV 07/03/2008 18:27:39 PAGE 17
else
{
_sTunerPLL.wDB -= 0x02;
}
_bSearchState = S_STATE_SET;
break;
}
#else
989 2 /*=============================================================================
990 2 =============================================================================*/
991 2 //02Jul08 bTvIfValue=bTV_IF_Read();
992 2 #ifdef ENABLE_PRINTF //03Jul08
// printf("PLL LOCK is ok\n");
#endif
995 2 fgAFCWIN=(bTvIfValue &0x80)>>7;
996 2 bAfc=(bTvIfValue >>1) & 0x0f;
997 2
998 2 /*
999 2 if(bAFCTimeOut >= 0x0a)
1000 2 {
1001 2 bAFCTimeOut=0x00;
1002 2 if (dir == UP_SEARCH)
1003 2 {
1004 2 _sTunerPLL.wDB+= 0x10;
1005 2 }
1006 2 else
1007 2 {
1008 2 _sTunerPLL.wDB -= 0x10;
1009 2 }
1010 2 _bSearchState = S_STATE_SET;
1011 2 break;
1012 2 }
1013 2
1014 2 */
1015 2 // Delay1ms(10);
1016 2 // _bLockStatus = bTV_PLL_Read();
1017 2
1018 2 // btesttvIf=bTvIfValue;
1019 2 // //06Jun08 while(bTimeOut)
1020 2 {
1021 3 // bTimeOut--;
1022 3 #ifdef MARTIN_SAVE_CHANNEL_READ_DVD
1023 3 #if 1
1024 3 #if 1
1025 3 if(bDataUpdateEn == 0)
1026 3 {
1027 4 #if 1
1028 4 //02Jul08 if(mReadDvdDat() ==0 )
1029 4 if(fgAFCWIN)
1030 4 {
1031 5 #ifdef MARTIN_SIGNAL_LOW_NOT_SAVE_CHANNEL
//fgTVSync=1; //01Jun08
// bTVSyncCnt++;
#endif
1035 5
1036 5 if((bAfc == 0x00)||(bAfc == 0x01)||(bAfc == 0x0f)||(bAfc == 0x0e))
1037 5 {
1038 6 bAFCTimeOut=0x00; //02Jun08
1039 6 Delay1ms(300);
1040 6 if(mReadDvdDat() ==0 )
C51 COMPILER V8.05a TV 07/03/2008 18:27:39 PAGE 18
1041 6 {
1042 7 #ifdef MARTIN_SIGNAL_LOW_NOT_SAVE_CHANNEL
fgTVSync=0; //01Jun08
bTVSyncCnt=0;
#endif
1046 7
1047 7 if((_bSearchMode == SEARCH_SCAN)||((_bSearchMode == SEARCH_SEEK)&&((b
-TvCurrChIndex<0x01)||(bTvCurrChIndex > bTvTotalCh))))
1048 7 {
1049 8 bTvTotalCh++;
1050 8 bTvCurrChIndex = bTvTotalCh;
1051 8 WriteE2prom(TV_TOTAL_CH_POS,&bTvTotalCh,1);
1052 8 WriteE2prom(TV_LAST_CH_POS,&bTvCurrChIndex,1);
1053 8 }
1054 7 sTvCurrChannel.bSkip=(sTvCurrChannel.bSkip & 0xef); //16Jun08
1055 7 sTvCurrChannel.wFreq=_sTunerPLL.wDB;
1056 7 WriteTVChannel(bTvCurrChIndex,sTvCurrChannel);
1057 7
1058 7 if(_bSearchMode == SEARCH_SCAN)
1059 7 {
1060 8 if (dir == UP_SEARCH)
1061 8 {
1062 9 _sTunerPLL.wDB+= 0x40; //05Jun08 test
1063 9 }
1064 8 else
1065 8 {
1066 9 _sTunerPLL.wDB -= 0x40;
1067 9 }
1068 8 _bSearchState = S_STATE_SET;
1069 8 break;
1070 8 }
1071 7 else
1072 7 {
1073 8 fgTvSearchState=0;
1074 8 bDisplaMode=0x08;
1075 8 DataOutValid=0;
1076 8 _bSearchState = S_STATE_IDLE;
1077 8 break;
1078 8 }
1079 7 }
1080 6 else
1081 6 {
1082 7 if (dir == UP_SEARCH)
1083 7 {
1084 8 _sTunerPLL.wDB+= 0x07; //05Jun08 test
1085 8 }
1086 7 else
1087 7 {
1088 8 _sTunerPLL.wDB -= 0x07;
1089 8 }
1090 7 _bSearchState = S_STATE_SET;
1091 7 break;
1092 7
1093 7 }
1094 6 }
1095 5 if (dir == UP_SEARCH)
1096 5 {
1097 6 if((bAfc >= 0x02)&&(bAfc <= 0x03))
1098 6 {
1099 7 bAFCTimeOut++; //02Jun08
1100 7 if(bAFCTimeOut >= 0x07)
1101 7 {
C51 COMPILER V8.05a TV 07/03/2008 18:27:39 PAGE 19
1102 8 bAFCTimeOut=0x00;
1103 8 if (dir == UP_SEARCH)
1104 8 {
1105 9 _sTunerPLL.wDB+= 0x10;
1106 9 }
1107 8 else
1108 8 {
1109 9 _sTunerPLL.wDB -= 0x10;
1110 9 }
1111 8 _bSearchState = S_STATE_SET;
1112 8 break;
1113 8 }
1114 7
1115 7 #ifdef MARTIN_SIGNAL_LOW_NOT_SAVE_CHANNEL
fgTVSync=1; //01Jun08
bTVSyncCnt++;
bTVSyncFre=_sTunerPLL.wDB;
#endif
1120 7
1121 7 // Delay1ms(30);
1122 7 // if(mReadDvdDat() ==0 )
1123 7 {
1124 8 //02Jun08 if (dir == UP_SEARCH)
1125 8 {
1126 9 _sTunerPLL.wDB+= 0x01; //05Jun08 test
1127 9 }
1128 8 /* //02Jun08
1129 8 else
1130 8 {
1131 8 _sTunerPLL.wDB -= 0x01;
1132 8 }
1133 8 */ //02Jun08
1134 8
1135 8 _bSearchState = S_STATE_SET;
1136 8 break;
1137 8 }
1138 7 }
1139 6 else if((bAfc >= 0x04)&&(bAfc <= 0x06))
1140 6 {
1141 7 bAFCTimeOut++; //02Jun08
1142 7 if(bAFCTimeOut >= 0x07)
1143 7 {
1144 8 bAFCTimeOut=0x00;
1145 8 if (dir == UP_SEARCH)
1146 8 {
1147 9 _sTunerPLL.wDB+= 0x10;
1148 9 }
1149 8 else
1150 8 {
1151 9 _sTunerPLL.wDB -= 0x10;
1152 9 }
1153 8 _bSearchState = S_STATE_SET;
1154 8 break;
1155 8 }
1156 7 #ifdef MARTIN_SIGNAL_LOW_NOT_SAVE_CHANNEL
fgTVSync=1; //01Jun08
bTVSyncCnt++;
bTVSyncFre=_sTunerPLL.wDB;
#endif
1161 7
1162 7
1163 7
C51 COMPILER V8.05a TV 07/03/2008 18:27:39 PAGE 20
1164 7
1165 7 _sTunerPLL.wDB+= 0x02; //05Jun08 test
1166 7
1167 7
1168 7 _bSearchState = S_STATE_SET;
1169 7 break;
1170 7
1171 7 }
1172 6 }
1173 5
1174 5 if(dir == DOWN_SEARCH)
1175 5 {
1176 6 if((bAfc >= 0x0c)&&(bAfc <= 0x0d))
1177 6 {
1178 7 bAFCTimeOut++; //02Jun08
1179 7 if(bAFCTimeOut >= 0x07)
1180 7 {
1181 8 bAFCTimeOut=0x00;
1182 8 if (dir == UP_SEARCH)
1183 8 {
1184 9 _sTunerPLL.wDB+= 0x10;
1185 9 }
1186 8 else
1187 8 {
1188 9 _sTunerPLL.wDB -= 0x10;
1189 9 }
1190 8 _bSearchState = S_STATE_SET;
1191 8 break;
1192 8 }
1193 7 #ifdef MARTIN_SIGNAL_LOW_NOT_SA
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -