📄 menufunc.lst
字号:
893 1 g_NLCAudioVolume.X0 = INIT_AudioVolume_X0;
894 1 g_NLCAudioVolume.X1 = INIT_AudioVolume_X1;
895 1 g_NLCAudioVolume.X2 = INIT_AudioVolume_X2;
896 1 g_NLCAudioVolume.X3 = INIT_AudioVolume_X3;
897 1 g_NLCAudioVolume.X4 = INIT_AudioVolume_X4;
898 1 }
899
900 #if CCFL_FUNCTION
void msSetCCFLBrightness(void)
{
msWriteByte(BK0_00_REGBK, REG_BANK4_LVDS_CCFL);
msWriteByte(BK4_6B, 0x80);
#if CCFL_BURST_MODE
msWriteByte(BK4_91, 0x00);
msWriteByte(BK4_90, 0xAE);//tony for SZ demo 0xAE);
#else
msWriteByte(BK4_82, 0xAA);
#endif
msWriteByte(BK4_6B, 0x00);
C51 COMPILER V8.18 MENUFUNC 09/29/2009 23:58:03 PAGE 16
msWriteByte(BK0_00_REGBK, REG_BANK_SCALER);
}
#endif
917
918
919 #if VGA_ENABLE
920
921 BOOL EnablePowerDownCounter(void)
922 {
923 1 g_ucPowerDownCounter=0;// 3 , no sync blue BK0_5E_PATTERN always on zwtan 20050528
924 1 return TRUE;
925 1 }
926
927 #define MaxHStart g_ModeSetting.AutoHStart+50
928 #define MinHStart g_ModeSetting.AutoHStart-50
929 BOOL AdjustHPosition(MenuItemActionType action)
930 {
931 1 WORD tempValue;
932 1
933 1 tempValue=DecIncValue(action, g_ModeSetting.HStart, MinHStart, MaxHStart, 1);
934 1 if (tempValue==g_ModeSetting.HStart)
935 1 return FALSE;
936 1 g_ModeSetting.HStart=tempValue;
937 1 msAdjustHPosition(g_ModeSetting.HStart);
938 1
939 1 return TRUE;
940 1 }
941
942 WORD GetHPositionValue(void)
943 {
944 1 return 100-GetScale100Value(g_ModeSetting.HStart, MinHStart, MaxHStart);//, 0);
945 1 }
946
947 //====================================================
948 BOOL AdjustVPosition(MenuItemActionType action)
949 {
950 1 WORD tempValue;
951 1
952 1 tempValue=DecIncValue(action, g_ModeSetting.VStart, 0, 2*StandardModeVStart, 1);
953 1 if (tempValue==g_ModeSetting.VStart)
954 1 return FALSE;
955 1 g_ModeSetting.VStart=tempValue;
956 1 msAdjustVPosition(g_ModeSetting.VStart);
957 1
958 1 return TRUE;
959 1 }
960
961 WORD GetVPositionValue(void)
962 {
963 1 return GetScale100Value(g_ModeSetting.VStart, 0, 2*StandardModeVStart);
964 1 }
965
966 BOOL AutoConfig(void)
967 {
968 1 BOOL result;
969 1 result=msAutoGeometry(AUTO_TUNE_BASIC);
970 1 g_ModeSetting.AutoHStart=g_ModeSetting.HStart;
971 1 g_ModeSetting.AutoVStart=g_ModeSetting.VStart;
972 1 if (result)
973 1 {
974 2 g_ModeSetting.AutoTimes=1;
975 2 #if RM_EEPROM_TYPE<RM_TYPE_SST512
C51 COMPILER V8.18 MENUFUNC 09/29/2009 23:58:03 PAGE 17
976 2 SaveModeSetting();
977 2 #endif
978 2 }
979 1 return result;
980 1 }
981 //=======================================================================================
982 #endif
983
984 #if TV_ENABLE
985 WORD GetAGCValue(void)
986 {
987 1 return g_VideoSetting.TunerAGC;
988 1 }
989
990 BOOL AdjustAGC(MenuItemActionType action)
991 {
992 1 if (action==MIA_IncValue)
993 1 g_VideoSetting.TunerAGC+=1;
994 1 else
995 1 g_VideoSetting.TunerAGC+=(0x20-1);
996 1
997 1 g_VideoSetting.TunerAGC%=0x20;
998 1 devTunerSetAGCValue(g_VideoSetting.TunerAGC);
999 1 return TRUE;
1000 1 }
1001
1002 BOOL AdjustSWAPLeftSerNum(MenuItemActionType action)
1003 {
1004 1 if(action==MIA_IncValue)
1005 1 g_ucSwapLeftSerNum+=1;
1006 1 else
1007 1 g_ucSwapLeftSerNum+=(MAX_CHANNEL_NUM-1);
1008 1 g_ucSwapLeftSerNum%=MAX_CHANNEL_NUM;
1009 1 return TRUE;
1010 1 }
1011
1012 BOOL AdjustSWAPChannel(MenuItemActionType action)
1013 {
1014 1 Osd_SetTextColor(CP_RedColor, CP_GrayColor);
1015 1 Osd_DrawStr(11, 5, "\x081\x082");
1016 1 action=action;
1017 1
1018 1 ChannelSwap(g_ucSwapLeftSerNum,g_TVChSetting.ucCurChannelNO);
1019 1
1020 1 Osd_SetTextColor(CP_WhiteColor, CP_GrayColor);
1021 1 Osd_DrawStr(11, 5, "\x081\x082");
1022 1
1023 1 return TRUE;
1024 1 }
1025
1026 WORD GetSWAPLeftSerNumValue(void)
1027 {
1028 1 return (g_ucSwapLeftSerNum%=MAX_CHANNEL_NUM);
1029 1 }
1030
1031 BOOL AdjustCOPYLeftSerNum(MenuItemActionType action)
1032 {
1033 1 if(action==MIA_IncValue)
1034 1 g_ucCopyLeftSerNum+=1;
1035 1 else
1036 1 g_ucCopyLeftSerNum+=(MAX_CHANNEL_NUM-1);
1037 1 g_ucCopyLeftSerNum%=MAX_CHANNEL_NUM;
C51 COMPILER V8.18 MENUFUNC 09/29/2009 23:58:03 PAGE 18
1038 1
1039 1 return TRUE;
1040 1 }
1041
1042 BOOL AdjustCopyChannel(MenuItemActionType action)
1043 {
1044 1 Osd_SetTextColor(CP_RedColor, CP_GrayColor);
1045 1 Osd_DrawStr(11, 6, "\x081\x080");
1046 1
1047 1 action=action;
1048 1 SaveTVChannelInfo(g_ucCopyLeftSerNum,TRUE);
1049 1 Delay1ms(10);
1050 1 Osd_SetTextColor(CP_WhiteColor, CP_GrayColor);
1051 1 Osd_DrawStr(11, 6, "\x081\x080");
1052 1
1053 1 return TRUE;
1054 1 }
1055
1056 WORD GetCOPYLeftSerNumValue(void)
1057 {
1058 1 return (g_ucCopyLeftSerNum%=MAX_CHANNEL_NUM);
1059 1 }
1060
1061 WORD GetBandValue(void)
1062 {
1063 1 if(chData.wFreq< TN_LOWBAND_END)
1064 1 return 0;
1065 1 else if(chData.wFreq < TN_MIDBAND_END)
1066 1 return 1;
1067 1 else
1068 1 return 2;
1069 1 }
1070
1071 BOOL AdjustBandValue(MenuItemActionType action)
1072 {
1073 1 WORD tempvalue;
1074 1 tempvalue= GetBandValue();
1075 1 if(action==MIA_IncValue)
1076 1 tempvalue++;
1077 1 else
1078 1 tempvalue+=(3-1);
1079 1
1080 1 tempvalue%=3;
1081 1 switch(tempvalue)
1082 1 {
1083 2 case 0:
1084 2 chData.wFreq=TN_FREQMIN;
1085 2 break;
1086 2 case 1:
1087 2 chData.wFreq=TN_LOWBAND_END;
1088 2 break;
1089 2 case 2:
1090 2 chData.wFreq=TN_MIDBAND_END;
1091 2 break;
1092 2 }
1093 1 ResetTuner();
1094 1 return TRUE;
1095 1 }
1096
1097 BOOL AdjustProgram(MenuItemActionType action)
1098 {
1099 1 BYTE tempvalue;
C51 COMPILER V8.18 MENUFUNC 09/29/2009 23:58:03 PAGE 19
1100 1 tempvalue= GetChannelNumber();
1101 1 if(action==MIA_IncValue)
1102 1 tempvalue+=1;
1103 1 else
1104 1 tempvalue+=(MAX_CHANNEL_NUM-1);
1105 1 tempvalue%=MAX_CHANNEL_NUM;
1106 1
1107 1 TV_SelectChannel(tempvalue);
1108 1 DrawChannelFreqGuage( chData.wFreq,CP_SeaBlueColor);
1109 1 tempvalue=GetSkipValue();
1110 1 Osd_SetTextColor(CP_WhiteColor, CP_GrayColor);
1111 1 if (tempvalue==0)
1112 1 Osd_DrawStr(14, 8, " ON");
1113 1 else
1114 1 Osd_DrawStr(14, 8, "OFF");
1115 1 return TRUE;
1116 1 }
1117
1118
1119 //===============================for MenuFunc=======================================
1120 BYTE GetCurrentChannelNum(void)
1121 {
1122 1 return g_TVChSetting.ucCurChannelNO%MAX_CHANNEL_NUM;
1123 1 }
1124
1125 void ChannelUp(void)
1126 {
1127 1 BYTE TempChannel=SearchTVNoSkipChannel(g_TVChSetting.ucCurChannelNO,1);
1128 1 TV_SelectChannel(TempChannel);
1129 1 }
1130
1131
1132 void ChannelDown(void)
1133 {
1134 1 BYTE TempChannel=SearchTVNoSkipChannel(g_TVChSetting.ucCurChannelNO,0);
1135 1 TV_SelectChannel(TempChannel);
1136 1 }
1137
1138 BOOL FineTuneAdjust(MenuItemActionType action)
1139 {
1140 1 DrawChannelFreqGuage( chData.wFreq ,CP_RedColor);
1141 1 if(action==MIA_IncValue)
1142 1 chData.wFreq++;
1143 1 else
1144 1 chData.wFreq--;
1145 1
1146 1 if(chData.wFreq>TN_FREQMAX)
1147 1 chData.wFreq=TN_FREQMIN;
1148 1 else if(chData.wFreq<TN_FREQMIN)
1149 1 chData.wFreq=TN_FREQMAX;
1150 1
1151 1 chData.ucChannelMisc=chData.ucChannelMisc&(~DoAFCFlag);
1152 1 DrawScanProgress(chData.wFreq);
1153 1 ResetTuner();
1154 1 SaveTVChannelInfo(g_TVChSetting.ucCurChannelNO, TRUE);
1155 1 DrawChannelFreqGuage( chData.wFreq ,CP_SeaBlueColor);
1156 1 GetAFCValue(10);
1157 1 return TRUE;
1158 1 }
1159
1160 #endif
1161
C51 COMPILER V8.18 MENUFUNC 09/29/2009 23:58:03 PAGE 20
1162 #ifdef Multi_language
BOOL AdjustLanguage(MenuItemActionType action)
{
if (action==MIA_IncValue)
{
if(g_VideoSetting.Language==LANG_Nums-1)
g_VideoSetting.Language = 0;
else
g_VideoSetting.Language+=1;
}
else if(action == MIA_DecValue)
{
if(g_VideoSetting.Language==0)
g_VideoSetting.Language = LANG_Nums-1;
else
g_VideoSetting.Language-=1;
}
Osd_LoadDymaticFont();
Osd_Hide();
Delay1ms(10);
Set_RedrawSystemMenuFlag();
Set_SaveSettingFlag();
return TRUE;
}
#endif
C51 COMPILATION COMPLETE. 1 WARNING(S), 5 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -