?? dispinfo.lst
字號:
C51 COMPILER V7.50 DISPINFO 08/20/2007 10:23:30 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE DISPINFO
OBJECT MODULE PLACED IN dispinfo.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE dispinfo.c COMPACT OPTIMIZE(9,SIZE)
line level source
1 //
2 #include "Config.h"
3
4 #include "typedefs.h"
5 #include "Debug.h"
6 #include "main.h"
7
8 #include "osdbasic.h"
9 #include "printf.h"
10
11 #include "cc.h"
12 #include "eds.h"
13 #include "osdmenu.h"
14 #include "dispinfo.h"
15 #include "tw88.h"
16 #include "i2c.h"
17 #include "etc_eep.h"
18 #ifdef SUPPORT_TV
#include "tuner.h"
#endif
21 #include "audio.h"
22 #include "measure.h"
23 #include "pc_eep.h"
24 #include "RegMap.h"
25 #include "panel.h"
26 //----------------------------------------------------------------------
27 //extern CODE BYTE InputSelectionString[][16];
28 extern CODE struct struct_IdName struct_InputSelection[];
29 extern CODE struct struct_IdName struct_VInputStd[];
30
31 static DATA WORD OSDDisplayedTime; //in ms
32 static IDATA BYTE DisplayedOSD = 0;
33 // DATA BYTE DisplayedOSD = 0;
34 //extern IDATA struct BarInfo BarInfo;
35 extern bit TVChManual;
36 extern bit DisplayInputHold;
37
38 extern PDATA BYTE DummyChannel;
39 #ifdef SUPPORT_COMPONENT
40 extern PDATA BYTE ComponentMode;
41 #endif
42 extern CODE BYTE Init_Osd_DisplayLogo[];
43 extern CODE BYTE Init_Osd_DisplayInput[];
44 #ifdef ADD_ANALOGPANEL
extern CODE BYTE Init_Osd_DisplayLogo_A[];
extern CODE BYTE Init_Osd_DisplayInput_A[];
#endif
48
49 extern CODE BYTE Init_Osd_BarWindow[];
50 extern CODE BYTE Init_Osd_DisplayPCInfo[];
51 extern CODE BYTE *StrVolume[];
52 //----------------------------------------------------------------------
53
54 #ifdef TW9908
CODE BYTE TW9908String[]= { " TW9908 "};
C51 COMPILER V7.50 DISPINFO 08/20/2007 10:23:30 PAGE 2
CODE BYTE TW9905String[]= { " TW9905 "};
#endif
58
59 CODE BYTE TW8806String[]= { " TW8806 "};
60
61 CODE BYTE TechwellString[]= { "Techwell,Inc" };
62
63 CODE BYTE COMPONENT_STR[][15] = {
64 "YPbPr 480i", // 0
65 "YPbPr 576i", // 1
66 "YPbPr 480p", // 2
67 "YPbPr 576p", // 3
68 "YPbPr 1080i", // 4
69 "YPbPr 720p", // 5
70 "YPbPr 720p50",
71 "YPbPr 1080i50",
72 };
73 //================================================================
74 // Display information
75 //================================================================
76 void DisplayLogo(void)
77 {
78 1 CODE_P BYTE *str;
79 1 //ClearOSDInfo();
80 1
81 1 #ifdef TW9908
if( (ReadDecoder(0) & 0xf8) == 0x28 ) str = TW9905String;
else str = TW9908String;
#else
85 1 str = TW8806String;
86 1 #endif
87 1
88 1 InitOSDWindow(Init_Osd_DisplayLogo);
89 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
InitOSDWindow(Init_Osd_DisplayLogo_A);
#endif
93 1
94 1 ClearDataCnt(LOGO_ADDR, 12*2); // Total 12*2 Char.
95 1
96 1 DrawAttrCnt(LOGO_ADDR, CH_COLOR_WHITE, 12 );
97 1 DrawAttrCnt(LOGO_ADDR+12, CH_COLOR_RED, 12 );
98 1
99 1 WriteStringToAddr(LOGO_ADDR, str, 12);
100 1 WriteStringToAddr(LOGO_ADDR+12*1, TechwellString,12);
101 1
102 1 ShowOSDWindow(TECHWELLOGO_OSDWIN,TRUE);
103 1
104 1 }
105
106 void ClearLogo(void)
107 {
108 1 ShowOSDWindow(TECHWELLOGO_OSDWIN,FALSE);
109 1 #ifdef DEBUG_OSD
Printf("\r\n++(ClearLogo)");
#endif
112 1 }
113
114
115 void ClearDisplayedOSD( BYTE newd )
116 {
117 1 DisplayedOSD &= (~(newd));
C51 COMPILER V7.50 DISPINFO 08/20/2007 10:23:30 PAGE 3
118 1 #ifdef DEBUG_CCEDS
Printf("\r\ClearDisplayedOSD==> dt:%2x", (WORD)DisplayedOSD);
#endif
121 1 }
122
123 void SetDisplayedOSD( BYTE newd )
124 {
125 1 DisplayedOSD |= newd;
126 1 #ifdef DEBUG_CCEDS
Printf("\r\SetDisplayedOSD==> dt:%2x", (WORD)DisplayedOSD);
#endif
129 1 }
130
131 BYTE GetDisplayedOSD(void)
132 {
133 1 return DisplayedOSD;
134 1 }
135
136 void ClearOSDInfo(void)
137 {
138 1 BYTE dt;
139 1
140 1 dt = GetDisplayedOSD();
141 1 #ifdef DEBUG_OSD
Printf("\r\n++(ClearOSDInfo): DisplayedOSD:%2x",(WORD) GetDisplayedOSD());
#endif
144 1 #ifdef SUPPORT_PC
145 1 if( dt & PCINFO) ClearPCInfo();
146 1 #endif
147 1
148 1 if( (dt & TVVOL) || ( dt & TVCHN) ) ClearTVInfo();
149 1
150 1 if( dt & MUTE ) ClearMuteInfo();
151 1 if( dt & INPUTINFO ) ClearInput();
152 1 #ifdef SUPPORT_CCD_VCHIP
if( dt & CC ) ClearClosedCaption();
if( dt & RATINGINFO ) ClearBlockedInput();
#endif
156 1 if( dt & MENU ) CloseOSDMenu();
157 1 }
158
159 void DisplayInput(void)
160 {
161 1 BYTE inputs, len1, len2,i, SystemAddr;
162 1 #ifdef SUPPORT_COMPONENT
163 1 CODE_P BYTE *Str;
164 1 #endif
165 1
166 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
SystemAddr=INPUTINFO_ADDR+17;
else
#endif
171 1 SystemAddr=INPUTINFO1_ADDR;
172 1
173 1 if( (DisplayedOSD & INPUTINFO ) && DisplayInputHold ) return;
174 1 #ifdef DEBUG_OSD
Printf("\r\n++(DisplayInput)");
#endif
177 1
178 1 ClearOSDInfo();
179 1 #ifdef SUPPORT_CCD_VCHIP
C51 COMPILER V7.50 DISPINFO 08/20/2007 10:23:30 PAGE 4
if( GetDisplayedOSD() & CC ) ClearClosedCaption();
#endif
182 1
183 1 inputs = GetInputSelection();
184 1
185 1 #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
186 1 if( inputs==PC || inputs==DTV )
187 1 len2 = strlen( GetPCInputSourceName() );
188 1 else
189 1 #endif
190 1 #ifdef SUPPORT_COMPONENT
191 1 if( inputs==COMPONENT ){
192 2 Str = COMPONENT_STR[((ReadDecoder(CVFMT)&0x70)>>4)];
193 2 len2 = strlen(Str);
194 2 }
195 1 else
196 1 #endif
197 1 len2 = strlen( struct_VInputStd[GetVInputStdInx()].Name );
198 1
199 1
200 1 for (i=1; ;i++)
201 1 if( struct_InputSelection[i].Id==inputs ) break;
202 1
203 1 len1 = strlen(struct_InputSelection[i].Name);
204 1
205 1 InitOSDWindow(Init_Osd_DisplayInput);
206 1 #ifdef ADD_ANALOGPANEL
if(IsAnalogOn())
InitOSDWindow(Init_Osd_DisplayInput_A);
#endif
210 1 ClearDataCnt(INPUTINFO_ADDR, 51); // Total 42 Char.
211 1 DrawAttrCnt(INPUTINFO_ADDR, DEFAULT_COLOR, 51 );
212 1 WriteStringToAddr(INPUTINFO_ADDR, struct_InputSelection[i].Name, len1);
213 1
214 1 #if defined( SUPPORT_PC ) || defined( SUPPORT_DTV )
215 1 if( inputs==PC || inputs==DTV )
216 1 WriteStringToAddr(SystemAddr, GetPCInputSourceName(), len2);
217 1 else
218 1 #endif
219 1 #ifdef SUPPORT_COMPONENT
220 1 if( inputs==COMPONENT ){
221 2 //i = IsNoInput();
222 2 //Printf("\r\n Display Info==> Component Noinutcheck: %d ", (WORD)i );
223 2 if( IsNoInput() == 0 ) WriteStringToAddr(SystemAddr, Str, len2);
224 2 }
225 1 else
226 1 #endif
227 1 {
228 2 if( IsNoInput() == 0 )
229 2 WriteStringToAddr(SystemAddr, struct_VInputStd[GetVInputStdInx()].Name, len2);
230 2 }
231 1
232 1 #ifdef SUPPORT_TV
if(inputs == TV) // Audio Info Display
{
extern CODE BYTE StereoMomoYesNo[];
extern PDATA BYTE TVChannel;
DrawStringByLang( INPUTINFO1_ADDR+len2+5, (CODE_P struct EnumType *)StereoMomoYesNo, SteroMonoDetection(
-) );
DisplayTVChannel(TVChannel,1);
}
C51 COMPILER V7.50 DISPINFO 08/20/2007 10:23:30 PAGE 5
#endif
242 1
243 1 ShowOSDWindow(INPUTINFO_OSDWIN-1,TRUE);
244 1 ShowOSDWindow(INPUTINFO_OSDWIN,TRUE);
245 1 ShowOSDWindowAll(1);
246 1
247 1 DisplayedOSD |= INPUTINFO;
248 1 OSDDisplayedTime = GetTime_ms();
249 1 }
250
251 BYTE ClearInput(void)
252 {
253 1
254 1 ShowOSDWindowAll(0);
255 1 ShowOSDWindow(INPUTINFO_OSDWIN-1,FALSE);
256 1 ShowOSDWindow(INPUTINFO_OSDWIN,FALSE);
257 1
259 1 #ifdef DEBUG_OSD
Printf("\r\n++(ClearInput)");
#endif
262 1
263 1 #ifdef SUPPORT_CCD_VCHIP
InitClosedCaption();
#endif // SUPPORT_CCD_VCHIP
266 1
267 1 return 1;
268 1 // ClearBlending();
269 1 }
270
271 void DisplayVol(void)
272 {
273 1 CODE_P BYTE *Str ;
274 1 BYTE len;
275 1
276 1 #ifdef DEBUG_OSD
dPuts("\r\n++(DisplayVol)");
#endif
279 1
280 1 if(( DisplayedOSD & TVVOL ) == 0 )
281 1 {
282 2
283 2 ClearOSDInfo();
284 2 Change_OSDColorLookup();
285 2 delay(10);
286 2
287 2
288 2 InitOSDWindow(Init_Osd_BarWindow);
289 2
290 2 ClearDataCnt(OSDMENU_BARADDR, 50); // Total 25*2 Char.
291 2 DrawAttrCnt(OSDMENU_BARADDR, BG_COLOR_CYAN | CH_COLOR_WHITE, 25 );
292 2 DrawAttrCnt(OSDMENU_BARADDR+25, BG_COLOR_WHITE | CH_COLOR_CYAN, 25 );
293 2
294 2 Str = StrVolume[GetOSDLang()];
295 2 len=CStrlen(Str);
296 2 WriteStringToAddr(OSDMENU_BARADDR, Str, len);
297 2
298 2 ShowOSDWindow(OSDBARWINDOW,TRUE);
299 2 ShowOSDWindowAll(1);
300 2
301 2 }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -