📄 osdctrlt100.lst
字号:
C51 COMPILER V7.07 OSDCTRLT100 10/27/2005 16:13:34 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE OSDCTRLT100
OBJECT MODULE PLACED IN .\Obj\OSDCTRLT100.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Source\OSD\OSDCTRLT100.C BROWSE INCDIR(.\Include\;.\Source\;.\Include\Panel
-\) DEBUG OBJECTEXTEND PRINT(.\OSDCTRLT100.lst) OBJECT(.\Obj\OSDCTRLT100.obj)
stmt level source
1 //---------------------------------------------------------------------------
2 // Terawins Inc. Company Confidential Strictly Private
3 //
4 // $Archive: OSDCtrl.c $
5 // $Revision: 2.0 $
6 // $Author: jwang $
7 // $Date: 2003/08/13 $
8 //
9 // --------------------------------------------------------------------------
10 // >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
11 // --------------------------------------------------------------------------
12 // Copyright 2002 (c) Terawins Inc.
13 // This is an unpublished work.
14 // --------------------------------------------------------------------------
15 #include <reg51.h>
16 #include "common.h"
17 #include "System.h"
18 #include "Struct.h"
19 #include "TW10xReg.h"
20 #include "OSDCtrl.h"
21 #include "TwoWire.h"
22 #include "OSDDraw.h"
23 #include "Keypad.h"
24 //#include "SrcCtrl.h"
25 //#include "ModeCtrl.h"
26 #include "Video.h"
27 //#include "Auto.h"
28 #include "Tuner.h"
29
30 #ifdef NVRAM
31 #include "NVRam.h"
32 extern uWORD idata m_wEepRom;
33 #endif
34 extern bit m_bAir_Cable;
35 extern bit m_bTV_Skip;
36 extern uCHAR ir_data;
37 extern void BKPower(void);
38 #ifdef TIMER1
39 extern void Timer1Reset(void);
40 extern void Timer1Start(void);
41 extern void Timer1Stop(void);
42 #endif
43
44 extern uCHAR m_cSoundSystem;
45 extern bit m_bBKPowerOn;
46 extern LoadFilter(uCHAR);
47 extern BOOL SrcOptimizing(uCHAR cTuneType);
48 extern OSDPARAMS code sOSDParamsDef, sOSDParamsMin, sOSDParamsMax;
49 extern uCHAR idata m_cOSDEvent;
50 extern uCHAR idata m_cOSDFunc;
51 extern uCHAR idata m_cItem;
52 extern uCHAR idata m_cSource;
53 extern uCHAR code OSDPositionTable[];
54 extern uCHAR idata m_cBuff[4];
C51 COMPILER V7.07 OSDCTRLT100 10/27/2005 16:13:34 PAGE 2
55 extern uWORD idata m_wBuff[3];
56
57 bit idata skipon=0;
58
59 #if VIDEO_AVAILABLE
60 extern EEPVIDEO idata EepVideo;
61 #endif
62 #ifdef LUMA_SHARPNESS
code unsigned char ucaSharpnessTb[]=
{
0x00, 0x31, 0x23, 0x37, 0x13, 0x3B, 0x27, 0x3F,
0x03, 0x2B, 0x17, 0x2F, 0x05, 0x1B, 0x07, 0x1F
};
#endif
69
70
71
72 void OSDItemAdj(uCHAR cAdj)
73 {
74 1 sCHAR sStep;
75 1 if(cAdj==INCREASE)
76 1 sStep=1;
77 1 else if(cAdj==DECREASE)
78 1 sStep=-1;
79 1
80 1 if(m_cOSDFunc==idVOLUMEMENU)
81 1 {
82 2 if(sStep>0)
83 2 AdjVolume(1);
84 2 else
85 2 AdjVolume(-1);
86 2 return;
87 2 }
88 1 if(cAdj==INCREASE1)
89 1 {
90 2 AdjTimingB8(1);
91 2 return;
92 2 }
93 1 else if(cAdj==DECREASE1)
94 1 {
95 2 AdjTimingB8(-1);
96 2 return;
97 2 }
98 1
99 1 OSDItemAdjVideo(sStep);
100 1 }
101
102
103
104 void OSDItemAdjVideo(sCHAR sStep)
105 {
106 1 switch(m_cOSDFunc){
107 2 case idBRIGHT_VIDEO:
108 2 case idBRIGHTMENU_VIDEO:
109 2 AdjVideoBright(sStep);
110 2 break;
111 2 case idCONTRAST_VIDEO:
112 2 case idCONTRASTMENU_VIDEO:
113 2 AdjVideoContrast(sStep);
114 2 break;
115 2 case idSHARP_VIDEO:
116 2 case idSHARPMENU_VIDEO:
C51 COMPILER V7.07 OSDCTRLT100 10/27/2005 16:13:34 PAGE 3
117 2 AdjVideoSharp(sStep);
118 2 break;
119 2 case idSAT_VIDEO:
120 2 case idSATMENU_VIDEO:
121 2 AdjVideoSat(sStep);
122 2 break;
123 2 case idHUE_VIDEO:
124 2 case idHUEMENU_VIDEO:
125 2 AdjVideoHue(sStep);
126 2 break;
127 2 case idTIMEMENU_VIDEO:
128 2 AdjTimingB2(sStep);
129 2 break;
130 2 #ifdef TV
case idCHANNEL_TV:
AdjTVChannel(sStep, 1);
break;
#ifdef PAL
case iSOUNDSYSTEM_TV:
AdjTVSoundSystem();
break;
#endif
#ifdef NTSC
case idSKIP_TV:
AdjTVSkip();
break;
case idSOURCE_TV:
OSDShowTVSource(sStep);
break;
#endif
case idFINETUNE_TV:
AdjTVFineTune(sStep);
break;
case idAUTOMEMORY_TV:
AutoMemory();
// OSDExit();
break;
case idRECALL_TV:
ResetTVChannel();
// case idAUTOSCAN_TV:
// AutoScan();
break;
#endif
160 2 default: break;
161 2 }
162 1 }
163
164
165
166 void AdjVolume(sCHAR sStep)
167 {
168 1 if( (EepVideo.cVolume+sStep)<=sOSDParamsMax.cVolume
169 1 &&(EepVideo.cVolume+sStep)>=sOSDParamsMin.cVolume)
170 1 {
171 2 EepVideo.cVolume += sStep;
172 2 I2CWriteByte(TW101, 0xE9, EepVideo.cVolume);
173 2 OSDShowVideoData();
174 2 if(EepVideo.cVolume==sOSDParamsMin.cVolume)
175 2 AUDIO_MUTE=1; //MUTE audio
176 2 else
177 2 AUDIO_MUTE=0; //open audio
178 2 }
C51 COMPILER V7.07 OSDCTRLT100 10/27/2005 16:13:34 PAGE 4
179 1
180 1 #ifdef NVRAM
181 1 I2CWriteByte(EEPVIDEOBLOCK, idVIDEO_VOLUME_INDEX, EepVideo.cVolume);
182 1 #endif
183 1 return;
184 1
185 1 }
186
187
188 #if VIDEO_AVAILABLE
189 extern uCHAR idata m_cStandard;
190 void AdjTimingB2(sCHAR sStep)
191 {
192 1 #ifdef LOAD_TIME
if(I2CReadByte(TW101,0xb2)+sStep>=0&&I2CReadByte(TW101,0xb2)+sStep<=0xFF)
{
if(!m_cStandard)
{
EepVideo.cB2=I2CReadByte(TW101,0xb2)+sStep;
EepVideo.cB8=I2CReadByte(TW101,0xb8);
I2CWriteByte(TW101,0xb2,EepVideo.cB2);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B8, EepVideo.cB8);
twdDelay(NVRDELAY);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B2, EepVideo.cB2);
twdDelay(NVRDELAY);
EepVideo.cFlag=Panel_ID;
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_FLAG_INDEX, EepVideo.cFlag);
}
else
{
EepVideo.cB2_PAL=I2CReadByte(TW101,0xb2)+sStep;
EepVideo.cB8_PAL=I2CReadByte(TW101,0xb8);
I2CWriteByte(TW101,0xb2,EepVideo.cB2_PAL);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B8_PAL, EepVideo.cB8_PAL);
twdDelay(NVRDELAY);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B2_PAL, EepVideo.cB2_PAL);
twdDelay(NVRDELAY);
EepVideo.cFlag_PAL=Panel_ID;
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_FLAG_INDEX1, EepVideo.cFlag_PAL);
}
twdDelay(NVRDELAY);
OSDShowVideoData();
}
#endif
225 1 }
*** WARNING C280 IN LINE 190 OF SOURCE\OSD\OSDCTRLT100.C: 'sStep': unreferenced local variable
226
227 void AdjTimingB8(sCHAR sStep)
228 {
229 1 #ifdef LOAD_TIME
if(I2CReadByte(TW101,0xb8)+sStep>=0&&I2CReadByte(TW101,0xb8)+sStep<=0xFF)
{
if(m_cStandard==S_NTSC)
{
EepVideo.cB2=I2CReadByte(TW101,0xb2);
EepVideo.cB8=I2CReadByte(TW101,0xb8)+sStep;
I2CWriteByte(TW101,0xb8,EepVideo.cB8);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B8,EepVideo.cB8);
twdDelay(NVRDELAY);
C51 COMPILER V7.07 OSDCTRLT100 10/27/2005 16:13:34 PAGE 5
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B2,EepVideo.cB2);
twdDelay(NVRDELAY);
EepVideo.cFlag=Panel_ID;
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_FLAG_INDEX, EepVideo.cFlag);
}
else if(m_cStandard==S_NPAL)
{
EepVideo.cB2_PAL=I2CReadByte(TW101,0xb2);
EepVideo.cB8_PAL=I2CReadByte(TW101,0xb8)+sStep;
I2CWriteByte(TW101,0xb8,EepVideo.cB8_PAL);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B8_PAL, EepVideo.cB8_PAL);
twdDelay(NVRDELAY);
I2CWriteByte(EEPVIDEOBLOCK, idTIMING_B2_PAL, EepVideo.cB2_PAL);
twdDelay(NVRDELAY);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -