📄 ir.lst
字号:
=2 #define VideoSel P1_7 // PIC_CS
=2
=2 #define TFT_ON byMTV_Port53
=2
=2 #define MOD1 byMTV_Port44 //Zoom
=2 #define MOD2 byMTV_Port43 //SIDE1
=2 #define MOD3 byMTV_Port42 //JUST
=2 #endif
153 =2 #define PWM_CONT byMTV_DA0
154 =2 #define PWM_TINT byMTV_DA1
155 =2 #define PWM_BRIT byMTV_DA2
156 =2 #define PWM_COLR byMTV_DA3
157 =2
158 =2
159 =2
160 =2
161 =2 extern void InitialMCU(void);
162 =2 extern void InitialIO(void);
163 =2 extern void CheckMode(void);
164 =2
165 =2
6 =1 #include "video.h"
1 =2 #define MinHue 101
2 =2 #define MaxHue 200
3 =2 #define MinSat 116
4 =2 #define MaxSat 215
5 =2 #define MinBright 171
6 =2 #define MaxBright 220
7 =2 #define MinCont 171
8 =2 #define MaxCont 220
9 =2
10 =2 struct VideoData{
11 =2 BYTE Brightness;
12 =2 BYTE Contrast;
13 =2 BYTE Saturation;
14 =2 BYTE Hue;
15 =2 };
16 =2
17 =2 struct BrightData{
18 =2 BYTE Brightness;
19 =2 BYTE Contrast;
20 =2 };
21 =2
22 =2 struct ColorData{
23 =2 BYTE Saturation;
24 =2 BYTE Hue;
25 =2 };
26 =2
27 =2 extern struct VideoData sVideo;
28 =2 extern struct BrightData sBright;
29 =2 extern struct ColorData sColor;
30 =2
31 =2 extern void WriteDecoderRegister(BYTE addr, BYTE senddata);
32 =2 extern void InitialVideo(void);
33 =2 extern void InitialSystem(void);
34 =2 extern void Set_VideoBrightness(void);
35 =2 extern void Set_VideoContrast(void);
36 =2 extern void Set_VideoSaturation(void);
37 =2 extern void Set_VideoHue(void);
38 =2
39 =2
40 =2 #ifdef IIC_SW_2526
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 8
=2 //extern void Video_Write(BYTE addr,BYTE *databuf,WORD number);
=2 #endif
43 =2
44 =2
7 =1 #include "eeprom.h"
1 =2
2 =2 #define I2C_EEP_ADDR 0xa0
3 =2 //-----------------------------------------------
4 =2 union W_TEMP{
5 =2 BYTE valB[2]; //B[]={0xaa,0xbb}
6 =2 WORD valW; //W=0xaabb
7 =2 };
8 =2 //-----------------------------------------------
9 =2
10 =2 #ifdef EE24C16
=2 extern void EEPROM_Write(WORD addr,BYTE *databuf,WORD number);
=2 extern void EEPROM_Read(WORD addr,BYTE *databuf,WORD number);
=2 #endif
14 =2
15 =2 #ifdef EE24C02
16 =2 extern void EEPROM_Write(BYTE addr,BYTE *databuf,BYTE number);
17 =2 extern void EEPROM_Read(BYTE addr,BYTE *databuf,BYTE number);
18 =2 #endif
19 =2
20 =2 extern void Initial_I2C_EE(void);
21 =2 extern void InitialEEPROM(void);
22 =2 extern void ReadParameter(void);
23 =2
8 =1 #include "key.h"
1 =2
2 =2 enum{
3 =2 NOKEY,
4 =2 POWERKEY,
5 =2 MENUKEY,
6 =2 SELECTKEY,
7 =2 UPKEY,
8 =2 DOWNKEY
9 =2 //FACTORYKEY,
10 =2 //DEBUGKEY
11 =2 };
12 =2
13 =2 #define KEY_STABLE_TIME 50 // key debounce time (ms)
14 =2 #define KEY_REPEAT_TIME1 800 // wait (ms) before start repeat key
15 =2 #define KEY_REPEAT_TIME2 50 // repeat key per (ms)
16 =2
17 =2 #ifdef _JRCPIN_
18 =2 #define PressPOWERKey ((P1_3&0x01)==0)
19 =2 #define PressMENUKey ((P1_4&0x01)==0)
20 =2 #define PressSELECTKey ((P1_0&0x01)==0)
21 =2 #define PressUPKey ((P1_1&0x01)==0)
22 =2 #define PressDOWNKey ((P1_2&0x01)==0)
23 =2 #endif
24 =2 extern BYTE OldKey,KeyStep,KeyNo;
25 =2 extern WORD KeyReChkCnt;
26 =2 //extern BIT i2c_flag;
27 =2 extern BIT PowerFlag;
28 =2 extern BIT NTSCFlag;
29 =2
30 =2 extern void Initial_Key(void);
31 =2 extern BYTE GetKey(void);
32 =2 extern BYTE ReadKeyPort(void);
33 =2
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 9
34 =2
9 =1 #include "ir.h"
1 =2 #define IR_Customer_Code 0x00FF
2 =2
3 =2 union DW_TEMP{
4 =2 unsigned char valB[4]; //B[]={0x0xaa,0xbb,0xcc,0xdd}
5 =2 unsigned int valW[2]; //W[]={0xaabb,0xccdd}
6 =2 unsigned long valDW; //DW=0xaabbccdd
7 =2 };
8 =2
9 =2 enum
10 =2 {
11 =2 IR_No_Key,
12 =2
13 =2 IR_Power_Key,
14 =2 IR_MTS_Key,
15 =2 IR_Mute_Key,
16 =2 IR_Source_Key,
17 =2 IR_Auto_Key,
18 =2 IR_Up_Key,
19 =2 IR_Down_Key,
20 =2 IR_Menu_Key,
21 =2 IR_Jump_Key,
22 =2 IR_ChUp_Key,
23 =2 IR_ChDown_Key,
24 =2 IR_VolUp_Key,
25 =2 IR_VolDown_Key,
26 =2 IR_Search_Key,
27 =2 IR_Pic_Key,
28 =2 IR_PicLeft_Key,
29 =2 IR_PicRight_Key,
30 =2
31 =2 IR_0_Key,
32 =2 IR_1_Key,
33 =2 IR_2_Key,
34 =2 IR_3_Key,
35 =2 IR_4_Key,
36 =2 IR_5_Key,
37 =2 IR_6_Key,
38 =2 IR_7_Key,
39 =2 IR_8_Key,
40 =2 IR_9_Key,
41 =2 IR_100_Key
42 =2 };
43 =2
44 =2 extern unsigned char GetIRKey(void);
45 =2 extern void Init_IR(void);
46 =2 extern unsigned char IRDecode(unsigned char);
47 =2 extern void DebugIRKey(void);
48 =2
49 =2 #ifdef _MAIN_
=2
=2 unsigned char IR_Key;
=2 unsigned char byIRstateHighCount;
=2 unsigned char byIRstateLowCount;
=2 unsigned char IR_Data_Count;
=2 unsigned char IR_Step;
=2 unsigned char IR_OldKey;
=2 unsigned char IR_RepeatKey;
=2 unsigned char IR_RepeatFlag;
=2 unsigned long IR_DebugKey;
=2
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 10
=2 union DW_TEMP IR_Value;
=2
=2 unsigned char code IRDecodeTable[]=
=2 {
=2 0xBF, IR_Power_Key,
=2 0xAF, IR_MTS_Key,
=2 0xCF, IR_Mute_Key,
=2 0x17, IR_Source_Key,
=2 0x7F, IR_Auto_Key,
=2 0xB7, IR_Up_Key,
=2 0x15, IR_Down_Key,
=2 0x07, IR_Menu_Key,
=2 0xD5, IR_Jump_Key,
=2 0xE5, IR_ChUp_Key,
=2 0x65, IR_ChDown_Key,
=2 0xE7, IR_VolUp_Key,
=2 0x25, IR_VolDown_Key,
=2 0x67, IR_Search_Key,
=2 0xA5, IR_PicLeft_Key,
=2 0xA7, IR_PicRight_Key,
=2 0x27, IR_Pic_Key,
=2
=2 0x55, IR_0_Key,
=2 0x4F, IR_1_Key,
=2 0x1F, IR_2_Key,
=2 0x9F, IR_3_Key,
=2 0x8F, IR_4_Key,
=2 0x5F, IR_5_Key,
=2 0xDF, IR_6_Key,
=2 0xC7, IR_7_Key,
=2 0x47, IR_8_Key,
=2 0x87, IR_9_Key,
=2 0x95, IR_100_Key,
=2 0xFF
=2 };
=2 #else
97 =2
98 =2 extern unsigned char byIRstateHighCount;
99 =2 extern unsigned char byIRstateLowCount;
100 =2 extern unsigned char IR_Data_Count;
101 =2 extern unsigned char IR_Step;
102 =2 extern unsigned char IR_OldKey;
103 =2 extern unsigned char IR_RepeatKey;
104 =2 extern unsigned char IR_RepeatFlag;
105 =2 extern unsigned char IR_Key;
106 =2 extern union DW_TEMP IR_Value;
107 =2 extern unsigned char code IRDecodeTable[];
108 =2 extern unsigned long IR_DebugKey;
109 =2 #endif
10 =1 #include "osd.h"
1 =2
2 =2 // osd address and attribute
3 =2 #define Address 0x00
4 =2 #define Attribute 0x40
5 =2 // osd control bit define
6 =2 #define OSDEN 0x80
7 =2 #define BSEN 0x40
8 =2 #define Shoadow 0x20
9 =2 #define FBEN 0x10
10 =2 #define Blend 0x08
11 =2 #define WENclr 0x04
12 =2 #define RAMclr 0x02
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 11
13 =2 #define FBKGC 0x01
14 =2
15 =2 #define WEN 0x04
16 =2 #define WINT 0x02
17 =2 #define WSHD 0x01
18 =2 //--------------------
19 =2 //---------------------
20 =2 // osd color define
21 =2 #define Black 0x00
22 =2 #define Blue 0x01
23 =2 #define Green 0x02
24 =2 #define Cyan 0x03
25 =2 #define Red 0x04
26 =2 #define Magenta 0x05
27 =2 #define Yellow 0x06
28 =2 #define White 0x07
29 =2 //----------------------
30 =2 //define language item
31 =2 enum LanguageItem{
32 =2 English,
33 =2 Chinese,
34 =2 MaxLanguageItem
35 =2 };
36 =2 //define page item width
37 =2 enum MainPageItem{
38 =2 SaturatiOne, // Color
39 =2 BrightOne, // Bright
40 =2 HueOne, // TINT
41 =2 DimmerOne,//Dimmer
42 =2 FormatOne,//Format
43 =2 RecallItem,
44 =2 //ContrastOne, // ch15
45 =2 //HPositionOne,
46 =2 //VPositionOne,
47 =2 //OSDSetupItem,
48 =2 //RotateOne,
49 =2 //BrightItem,
50 =2 //ColorItem,
51 =2 //MiscItem,
52 =2 MaxMainPageItem
53 =2 };
54 =2
55 =2 enum BrightPageItem{
56 =2 BrightnessItem, // ch8
57 =2 ContrastItrm, // ch15
58 =2 MaxBrightPageItem
59 =2 };
60 =2
61 =2 enum ColorPageItem{
62 =2 SaturationItem, // ch5
63 =2 HueItem, // ch6
64 =2 MaxColorPageItem
65 =2 };
66 =2
67 =2 enum OSDPageItem{
68 =2 HPositionItem,
69 =2 VPositionItem,
70 =2 //LanguageItem,
71 =2 MaxOSDPageItem
72 =2 };
73 =2
74 =2 enum MiscPageItem{
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 12
75 =2 //VsignalPosition,
76 =2 //HsignalPosition,
77 =2 //PWM,
78 =2 CommonPulse,
79 =2 YGain,
80 =2 BlackLevel,
81 =2 YaperGain,
82 =2 RsubBri,
83 =2 BsubBri,
84 =2 WhitePeakLevel,
85 =2 Gamma1,
86 =2 Gamma2,
87 =2 MaxMiscPageItem
88 =2 };
89 =2
90 =2 enum {
91 =2 NOTHING,
92 =2 BRIGHT_BRIGHTNESS,
93 =2 BRIGHT_CONTRAST,
94 =2 COLOR_HUE,
95 =2 COLOR_SATURATION,
96 =2 RunDimmer,
97 =2 RunFormat, //OSD_VPOS_U,
98 =2 RunRecall,//OSD_LANGUAGE_U,
99 =2 VIDEO_BRIGHTNESS,
100 =2 VIDEO_CONTRAST,
101 =2 VIDEO_HUE,
102 =2 VIDEO_SATURATION,
103 =2 VIDEO_Rotate
104 =2 };
105 =2 //----------------------
106 =2 // osd page define
107 =2 #define MainPageWinNo 3
108 =2 #define MainPageColor Black
109 =2 #define MainPageBarColor Cyan
110 =2 #define MainPageItemLength 15
111 =2 #define MainPageCharColor Green //White
112 =2 #define MainPageProcessColor Red
113 =2 #define MainPageExitColor Cyan
114 =2 //#define MainPageItemWidth MaxMainPageItem
115 =2 #define MainPageBarLength MainPageItemLength
116 =2 #define MainPageYStart 1 //row start
117 =2 #define MainPageYEnd 10 //row end
118 =2 #define MainPageXStart 0 //column start
119 =2 #define MainPageXEnd 15//cloumn end
120 =2
121 =2 #define BackGroundWinNo 4
122 =2 #define BackGroundColor Magenta
123 =2 #define BackGroundYStart 0
124 =2 #define BackGroundYEnd 11
125 =2 #define BackGroundXStart 0
126 =2 #define BackGroundXEnd 16
127 =2 /*
128 =2 #define SecondPageWinNo 2
129 =2 #define SecondPageColor Green
130 =2 #define SecondPageBarColor Cyan
131 =2 #define SecondPageItemLength MainPageItemLength
132 =2 #define SecondPageItemWidth ?
133 =2 #define SecondPageBarLength SecondPageItemLength
134 =2 #define SecondPageYStart (MainPageYStart+1)
135 =2 #define SecondPageYEnd (MainPageYEnd+1) //row end
136 =2 #define SecondPageXStart (MainPageXStart+1) //column start
C51 COMPILER V6.10 IR 12/02/2004 10:58:52 PAGE 13
137 =2 #define SecondPageXEnd (MainPageXEnd+1) //cloumn end
138 =2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -