📄 osddraw.lst
字号:
C51 COMPILER V7.50 OSDDRAW 01/12/2006 13:31:13 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE OSDDRAW
OBJECT MODULE PLACED IN .\Obj\OSDDRAW.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Source\OSD\OSDDRAW.C BROWSE INCDIR(.\Include\;.\Source\;.\Include\Panel\;.\
-Include\GammaTable\) DEFINE(T106) DEBUG OBJECTEXTEND PRINT(.\OSDDRAW.lst) OBJECT(.\Obj\OSDDRAW.obj)
line level source
1 #include <reg51.h>
2 #include "common.h"
3 #include "System.h"
4 #include "Struct.h"
5 #include "OSDDraw.h"
6 #include "Keypad.h"
7 #include "TwoWire.h"
8 #include "TW10xReg.h"
9 #include "OSDCtrl.h"
10 #include "OSDDRAW.h"
11 #include "Video.h"
12 #include "Tuner.h"
13
14 #if (defined T100A)|(defined T101A)|(defined T101)
#include "T100_OSDString.h"
#include "T100OSD.h"
#endif
18
19 #if (defined T102)|(defined T106)
20 #include "T102_OSDString.h"
21 #include "T102OSD.h"
22 #endif
23
24
25 #include "OSDTbl.h"
26 #include "OSDMenu.h"
27 #include "intrins.h"
28 extern uCHAR ir_data;
29 extern uCHAR m_cSoundSystem;
30 extern uCHAR ir_data;
31 extern uCHAR ir_repeat;
32 extern bit m_bAir_Cable;
33 extern bit m_bTV_Skip;
34 extern bit m_bKyPowerFlat;
35 extern bit m_bBKPowerOn;
36 extern bit m_bOSDEnable;
37 extern bit m_bKyPowerOn;
38 extern bit m_bChipPowerOn;
39 extern bit m_bKyBlocked;
40 extern uCHAR idata m_cBuff[5];
41 extern uWORD idata m_wBuff[3];
42 extern uDWORD m_dwBuff[2];
43 extern uCHAR idata m_cOSDEvent;
44 extern uCHAR idata m_cCurreKey;
45 extern uCHAR idata m_cPreKey;
46 extern uCHAR idata m_cItem;
47 extern uCHAR idata m_cOSDFunc;
48 extern uWORD idata m_wVRes;
49 extern uWORD idata m_wHRes;
50 extern uCHAR idata m_cSource;
51
52 extern uCHAR idata m_cTV_Num;
53
54 extern uDWORD m_dwVFrameCntPre;
C51 COMPILER V7.50 OSDDRAW 01/12/2006 13:31:13 PAGE 2
55 extern uWORD m_wHSyncPeriodPre;
56 extern void BKPower(void);
57 extern void PowerManage(void);
58 extern void AutoScanChannel(void);
59
60 #if VIDEO_AVAILABLE
61 extern EEPVIDEO idata EepVideo;
62 #endif
63
64 #ifdef TIMER0
65 extern void Timer0Start(void);
66 extern void Timer0Stop(void);
67 #endif
68
69 #ifdef NVRAM
70 #include "NVRam.h"
71 extern uWORD idata m_wEepRom;
72 #endif
73
74
75 extern uCHAR idata m_cOSDMenu;
76
77
78
79 MULTILANGUAGEOSD *pOSDLangPtr;
80 OSDMENU **pOSDMenuPtr;
81 uCHAR cTotal=0;
82
83 // ADC Digi
84 //Bright,contrast,sharp,freq,phase,hpos,vpos,Bklight,OSDH/V,Gain/Offset Gain/Offset Volume
85 OSDPARAMS code sOSDParamsMax=
86 {0xff, 0xff, 5, 20, 0x1f, 40, 20, 20, 80,65, 0xC0,0xff, 0xff,0xff, 0xFF};
87 OSDPARAMS code sOSDParamsMin=
88 {0, 0, 0, 0, 0x00, 0, 0, 0, 1,1, 0,0, 0,0, 0x00};
89 OSDPARAMS code sOSDParamsDef=
90 {0x80, 0x80, 2, 10, 0x10, 20, 10, 10, 75,45, 0x80,0x80, 0x80,0x80, 0x40};
91
92 #if (defined T102)|(defined T106)
93 uCHAR code cOSDMenuLutData[32]={ //For test
94 //0xGB, 0x0R
95 0x00,0x00, //0
96 0x0f,0x00, //1 blue
97 0x00,0x0f, //2 black
98 0xf0,0x00, //3 purple
99 0x0f,0x00, //1 blue
100 0x00,0x0f, //2 black
101 0x0f,0x00, //3 purple
102 0x0f,0x00, //1 blue
103 0x00,0x0f, //2 black
104 0xf0,0x00, //3 purple
105 0x0f,0x00, //1 blue
106 0x00,0x0f, //2 black
107 0xf0,0x00, //3 purple
108 0x0f,0x00, //1 blue
109 0x00,0x0f, //2 black
110 0xf0,0x00, //3 purple
111 };
112 #else
uCHAR code cOSDMenuLutData[32]={
//0xGB, 0x0R
0x00,0x00, //0
0x0f,0x00, //1 blue
C51 COMPILER V7.50 OSDDRAW 01/12/2006 13:31:13 PAGE 3
0x00,0x00, //2 black
0x0f,0x0a, //3 purple
0x0e,0x00, //4 dark blue
0xf8,0x00, //5 green
0x22,0x0A, //6 red
0xc4,0x0c, //7 olive
0x88,0x05, //8 light grey
0xb9,0x0b, //9 purple
0xBD,0x05, //A purple
0x0f,0x0f, //B
0xA3,0x0A, //C Yellow
0xcc,0x0c, //D light grey
0x68,0x03, //E Light Blue Main Menu Background or 0x79, 0x04 which is a litter light
0xff,0x0f, //F white
};
#endif
133
134 void OSDLoadColor(void)
135 {
136 1 uCHAR i;
137 1 I2CWriteByte(TW101,OSD_CFG_INDEX,OSD_LUT_RAM_DATA);
138 1 for(i=0;i<32;i++)
139 1 I2CWriteByte(TW101,OSD_CFG_DATA,cOSDMenuLutData[i]);
140 1
141 1 }
142
143 void OSDSetRamAddr(uWORD address)
144 {
145 1 I2CWriteByte(TW101,OSD_RAM_AH,(uCHAR)(address>>8));
146 1 I2CWriteByte(TW101,OSD_RAM_AL,(uCHAR)(address & 0xff));
147 1
148 1 }
149
150 void OSDEnable(void)
151 {
152 1 m_bOSDEnable = 1;
153 1 OSDCfgWr(OSD_CTRL,0x84);//0x80);//0x84);//0x98); //change by Sherman 05'11'01
154 1
155 1 #ifdef TIMER0
156 1 Timer0Start();
157 1 #endif
158 1
159 1 }
160
161 void OSDDisable(void)
162 {
163 1 Timer0Stop();
164 1 OSDCfgWr(OSD_CTRL,0x18);
165 1 m_cOSDEvent=0;
166 1 m_cOSDFunc=0;
167 1 m_cItem=1;
168 1 m_bOSDEnable=0;
169 1 m_cCurreKey=m_cPreKey=0xFF;
170 1 }
171
172 void OSDExit(void)
173 {
174 1 OSDCfgWr(OSD_CTRL,0x18);
175 1 OSDCfgWr(0x10,0x00); //Disable window
176 1 OSDDisable();
177 1 // OSDClearPage();
178 1 }
C51 COMPILER V7.50 OSDDRAW 01/12/2006 13:31:13 PAGE 4
179
180 void OSDFuncSelect(sCHAR sStep)
181 {
182 1 //Remove previous cursor
183 1 OSDClearCursor();
184 1 if(m_cItem+sStep>=1 && m_cItem+sStep<=cTotal)
185 1 m_cItem+=sStep;
186 1 else
187 1 {
188 2 if(sStep<0)
189 2 m_cItem=cTotal;
190 2 else
191 2 m_cItem=1;
192 2 }
193 1 m_cOSDFunc=m_cItem;
194 1
195 1 switch(m_cOSDMenu){
196 2 case idVIDEOMENU:
197 2 OSDShowVideoData();
198 2 break;
199 2 case idTVMENU:
200 2 // OSDShowTVData(); // mark by Sherman 05'11'14
201 2 break;
202 2 default:
203 2 break;
204 2 }
205 1 OSDMoveCursor();
206 1 return;
207 1 }
208
209
210 void OSDEventMgr(void)
211 {
212 1 Timer0Stop();
213 1 switch(m_cOSDEvent){
214 2 case CLOSEMENU:
215 2 OSDExit();
216 2 break;
217 2 case OPENMENU:
218 2 m_cItem=1;
219 2 OSDOpenMenu();
220 2 break;
221 2
222 2 case FUNCSELCT_IN:
223 2 OSDFuncSelect(1);
224 2 break;
225 2 case FUNCSELCT_DN:
226 2 OSDFuncSelect(-1);
227 2 break;
228 2 case FUNCENTER:
229 2 OSDClearPage();
230 2 OSDPosition(CENTER);
231 2 OSDShowPage();
232 2 break;
233 2 case FUNCEXIT:
234 2 OSDFuncExit();
235 2 break;
236 2 case FUNCADJ_IN:
237 2 OSDItemAdj(INCREASE);
238 2 break;
239 2 case FUNCADJ_IN1:
240 2 OSDItemAdj(INCREASE1);
C51 COMPILER V7.50 OSDDRAW 01/12/2006 13:31:13 PAGE 5
241 2 break;
242 2 case FUNCADJ_DN:
243 2 OSDItemAdj(DECREASE);
244 2 break;
245 2 case FUNCADJ_DN1:
246 2 OSDItemAdj(DECREASE1);
247 2 break;
248 2 case FUNCADCCAL:
249 2 break;
250 2 case POWERMANAGE:
251 2 m_bKyPowerOn = m_bKyPowerOn^0x01;
252 2 PowerManage();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -