📄 dispinfo.lst
字号:
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE DISPINFO
OBJECT MODULE PLACED IN .\Output\dispinfo.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE dispinfo.c COMPACT OPTIMIZE(9,SIZE) BROWSE MODDP2 INCDIR(.\Include\) DEFINE
-(INTERNAL_MCU) DEBUG OBJECTEXTEND PRINT(.\Source\dispinfo.lst) OBJECT(.\Output\dispinfo.obj)
line level source
1 //
2 #include "Config.h"
3
4 #include "typedefs.h"
5 #include "main.h"
6
7 #include "osdbasic.h"
8 #include "printf.h"
9
10 #include "osdmenu.h"
11 #include "dispinfo.h"
12 #include "tw88.h"
13 #include "i2c.h"
14 #include "etc_eep.h"
15 #include "audio.h"
16 #include "measure.h"
17 #include "pc_eep.h"
18 #include "RegMap.h"
19 #include "panel.h"
20 #ifdef SUPPORT_TV
21 #include "tuner.h"
22 #endif
23
24 //----------------------------------------------------------------------
25 //extern CODE BYTE InputSelectionString[][16];
26 extern CODE struct struct_IdName struct_InputSelection[];
27 extern CODE struct struct_IdName struct_VInputStd[];
28
29 static DATA WORD OSDDisplayedTime; //in ms
30 static IDATA BYTE DisplayedOSD = 0;
31 // DATA BYTE DisplayedOSD = 0;
32 //extern IDATA struct BarInfo BarInfo;
33 extern bit TVChManual;
34 extern bit DisplayInputHold;
35
36 extern BYTE DummyChannel;
37 #ifdef SUPPORT_COMPONENT
38 extern IDATA BYTE ComponentMode;
39 #endif
40 extern CODE BYTE Init_Osd_DisplayLogo[];
41 extern CODE BYTE Init_Osd_DisplayInput[];
42 #ifdef ADD_ANALOGPANEL
extern CODE BYTE Init_Osd_DisplayLogo_A[];
extern CODE BYTE Init_Osd_DisplayInput_A[];
#endif
46
47 #if defined( PAL_TV )
48 CODE BYTE Init_Osd_BarWindow_pal[];
49 #endif
50 extern CODE BYTE Init_Osd_BarWindow[];
51 extern CODE BYTE Init_Osd_DisplayPCInfo[];
52 extern CODE BYTE *StrVolume[];
53
54 #ifdef PAL_TV
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 2
55 extern bit ChannelEdit_Flag;
56 extern bit ChannelEdit_on;
57 #endif
58
59 #ifdef TW9908
CODE BYTE TW9908String[]= { " TW9908 "};
CODE BYTE TW9905String[]= { " TW9905 "};
#endif
63
64 CODE BYTE TW8806String[]= { " TW88X6 "};
65
66 CODE BYTE TechwellString[]= { "Techwell,Inc" };
67
68 CODE BYTE COMPONENT_STR[][15] = {
69 "YPbPr 480i", // 0
70 "YPbPr 576i", // 1
71 "YPbPr 480p", // 2
72 "YPbPr 576p", // 3
73 "YPbPr 1080i", // 4
74 "YPbPr 720p", // 5
75 "YPbPr 720p50",
76 "YPbPr 1080i50",
77 };
78 //================================================================
79 // Display information
80 //================================================================
81 void DisplayLogo(void)
82 {
83 1 BYTE CODE *str;
84 1 //ClearOSDInfo();
85 1
86 1 #ifdef TW9908
if( (ReadDecoder(0) & 0xf8) == 0x28 ) str = TW9905String;
else str = TW9908String;
#else
90 1 str = TW8806String;
91 1 #endif
92 1
93 1 InitOSDWindow(Init_Osd_DisplayLogo);
94 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
InitOSDWindow(Init_Osd_DisplayLogo_A);
#endif
98 1
99 1 ClearDataCnt(LOGO_ADDR, 12*2); // Total 12*2 Char.
100 1
101 1 DrawAttrCnt(LOGO_ADDR, CH_COLOR_WHITE, 12 );
102 1 DrawAttrCnt(LOGO_ADDR+12, CH_COLOR_RED, 12 );
103 1
104 1 WriteStringToAddr(LOGO_ADDR, str, 12);
105 1 WriteStringToAddr(LOGO_ADDR+12*1, TechwellString,12);
106 1
107 1 ShowOSDWindow(TECHWELLOGO_OSDWIN,TRUE);
108 1
109 1 }
110
111 void ClearLogo(void)
112 {
113 1 ShowOSDWindow(TECHWELLOGO_OSDWIN,FALSE);
114 1 #ifdef DEBUG_OSD
dPrintf("\r\n++(ClearLogo)");
#endif
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 3
117 1 }
118
119
120 void ClearDisplayedOSD( BYTE newd )
121 {
122 1 DisplayedOSD &= (~(newd));
123 1 }
124
125 void SetDisplayedOSD( BYTE newd )
126 {
127 1 DisplayedOSD |= newd;
128 1 }
129
130 BYTE GetDisplayedOSD(void)
131 {
132 1 return DisplayedOSD;
133 1 }
134
135 void ClearOSDInfo(void)
136 {
137 1 BYTE dt;
138 1
139 1 dt = GetDisplayedOSD();
140 1 #ifdef DEBUG_OSD
dPrintf("\r\n++(ClearOSDInfo): DisplayedOSD:%2x",(WORD) GetDisplayedOSD());
#endif
143 1 #ifdef SUPPORT_PC
144 1 if( dt & PCINFO) ClearPCInfo();
145 1 #endif
146 1
147 1 if( (dt & TVVOL) || ( dt & TVCHN) ) ClearTVInfo();
148 1
149 1 if( dt & MUTE ) ClearMuteInfo();
150 1 if( dt & INPUTINFO ) ClearInput();
151 1 if( dt & MENU ) CloseOSDMenu();
152 1 }
153
154 void DisplayInput(void)
155 {
156 1 BYTE inputs, len1, len2,i, SystemAddr;
157 1 #ifdef SUPPORT_COMPONENT
158 1 BYTE CODE *Str;
159 1 #endif
160 1
161 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
SystemAddr=INPUTINFO_ADDR+17;
else
#endif
166 1 SystemAddr=INPUTINFO1_ADDR;
167 1
168 1 if( (DisplayedOSD & INPUTINFO ) && DisplayInputHold ) return;
169 1 #ifdef DEBUG_OSD
dPrintf("\r\n++(DisplayInput)");
#endif
172 1
173 1 ClearOSDInfo();
174 1
175 1 inputs = GetInputSelection();
176 1
177 1 #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
178 1 if( inputs==PC || inputs==DTV )
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 4
179 1 len2 = strlen( GetPCInputSourceName() );
180 1 else
181 1 #endif
182 1 #ifdef SUPPORT_COMPONENT
183 1 if( inputs==COMPONENT ){
184 2 Str = COMPONENT_STR[((ReadDecoder(CVFMT)&0x70)>>4)];
185 2 len2 = strlen(Str);
186 2 }
187 1 else
188 1 #endif
189 1 len2 = strlen( struct_VInputStd[GetVInputStdInx()].Name );
190 1
191 1
192 1 for (i=1; ;i++)
193 1 if( struct_InputSelection[i].Id==inputs ) break;
194 1
195 1 len1 = strlen(struct_InputSelection[i].Name);
196 1
197 1 InitOSDWindow(Init_Osd_DisplayInput);
198 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
InitOSDWindow(Init_Osd_DisplayInput_A);
#endif
202 1 ClearDataCnt(INPUTINFO_ADDR, 51); // Total 42 Char.
203 1 DrawAttrCnt(INPUTINFO_ADDR, DEFAULT_COLOR, 51 );
204 1 WriteStringToAddr(INPUTINFO_ADDR, struct_InputSelection[i].Name, len1);
205 1
206 1 #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
207 1 if( inputs==PC || inputs==DTV )
208 1 WriteStringToAddr(SystemAddr, GetPCInputSourceName(), len2);
209 1 else
210 1 #endif
211 1 #ifdef SUPPORT_COMPONENT
212 1 if( inputs==COMPONENT ){
213 2 //i = IsNoInput();
214 2 //Printf("\r\n Display Info==> Component Noinutcheck: %d ", (WORD)i );
215 2 if( IsNoInput() == 0 ) WriteStringToAddr(SystemAddr, Str, len2);
216 2 }
217 1 else
218 1 #endif
219 1 {
220 2 if( IsNoInput() == 0 )
221 2 WriteStringToAddr(SystemAddr, struct_VInputStd[GetVInputStdInx()].Name, len2);
222 2 }
223 1
224 1 ShowOSDWindow(INPUTINFO_OSDWIN-1,TRUE);
225 1 ShowOSDWindow(INPUTINFO_OSDWIN,TRUE);
226 1 ShowOSDWindowAll(1);
227 1
228 1 DisplayedOSD |= INPUTINFO;
229 1 OSDDisplayedTime = GetTime_ms();
230 1 }
231
232 BYTE ClearInput(void)
233 {
234 1
235 1 ShowOSDWindowAll(0);
236 1 ShowOSDWindow(INPUTINFO_OSDWIN-1,FALSE);
237 1 ShowOSDWindow(INPUTINFO_OSDWIN,FALSE);
238 1
239 1 DisplayedOSD &= (~(INPUTINFO));
240 1 #ifdef DEBUG_OSD
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 5
dPrintf("\r\n++(ClearInput)");
#endif
243 1
244 1 return 1;
245 1 // ClearBlending();
246 1 }
247
248 void DisplayVol(void)
249 {
250 1 BYTE CODE *Str ;
251 1 BYTE len;
252 1
253 1 #ifdef DEBUG_OSD
dPuts("\r\n++(DisplayVol)");
#endif
256 1
257 1 if(( DisplayedOSD & TVVOL ) == 0 )
258 1 {
259 2
260 2 ClearOSDInfo();
261 2 Change_OSDColorLookup();
262 2 delay(10);
263 2
264 2
265 2 InitOSDWindow(Init_Osd_BarWindow);
266 2
267 2 ClearDataCnt(OSDMENU_BARADDR, 50); // Total 25*2 Char.
268 2 DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 25 );
269 2 DrawAttrCnt(OSDMENU_BARADDR+25, BG_COLOR_WHITE | CH_COLOR_CYAN, 25 );
270 2
271 2 Str = StrVolume[GetOSDLang()];
272 2 len=CStrlen(Str);
273 2 WriteStringToAddr(OSDMENU_BARADDR, Str, len);
274 2
275 2 ShowOSDWindow(OSDBARWINDOW,TRUE);
276 2 ShowOSDWindowAll(1);
277 2
278 2 }
279 1 DisplayVolumebar(GetAudioVol());
280 1
281 1 DisplayedOSD |= TVVOL;
282 1 OSDDisplayedTime = GetTime_ms();
283 1
284 1 }
285
286 void DisplayMuteInfo(void)
287 {
288 1 BYTE CODE *Str ;
289 1 BYTE len;
290 1 extern CODE BYTE Init_Osd_DisplayMuteInfo[];
291 1 extern CODE BYTE *MuteOnStr[];
292 1
293 1 ClearOSDInfo();
294 1 InitOSDWindow(Init_Osd_DisplayMuteInfo);
295 1
296 1 Str = MuteOnStr[GetOSDLang()];
297 1 len = strlen(Str);
298 1 WriteStringToAddr(MUTEINFO_ADDR, Str, len);
299 1 DrawAttrCnt(MUTEINFO_ADDR, BACK_COLOR|CH_COLOR_RED, len );
300 1
301 1 ShowOSDWindow(TVINFO_OSDWIN,TRUE);
302 1 ShowOSDWindowAll(1);
C51 COMPILER V7.50 DISPINFO 04/01/2008 15:02:05 PAGE 6
303 1 DisplayedOSD |= MUTE;
304 1 }
305
306 void ClearMuteInfo(void)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -