?? yuv.lst
字號:
C51 COMPILER V7.50 YUV 02/05/2007 16:33:26 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE YUV
OBJECT MODULE PLACED IN .\OBJ\YUV.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE YUV.C ROM(COMPACT) OPTIMIZE(9,SPEED) NOAREGS DEFINE(PROJECT=DMO04015800,MCU
-_CFG=BIT5101,VP_IF_CFG=VP_IF_BITEK) PRINT(.\LST\YUV.lst) OBJECT(.\OBJ\YUV.obj)
line level source
1 /* **********************************************************************
2
3 Copyright (c) 2002-2006 Beyond Innovation Technology Co., Ltd
4
5 All rights are reserved. Reproduction in whole or in parts is
6 prohibited without the prior written consent of the copyright owner.
7 ----------------------------------------------------------------------
8
9 Module: YUV.C - Video Decoder.
10
11 Purpose: Implementation of YUV module.
12
13 Version: 0.01 08:33PM 2005/12/27
14
15 Compiler: Keil 8051 C Compiler v8.01
16
17 Reference:
18 [1] BIT1611B Data Sheet Version 1.0, 2005-11-10,
19 Beyond Innovation Technology
20
21 ----------------------------------------------------------------------
22 Modification:
23
24 R0.01 08:32PM 2005/12/27 Jeffrey Chang
25 Reason:
26 1. Original.
27 Solution:
28
29 ----------------------------------------------------------------------
30 [00001] 19:10PM 2006/01/02 Lily Huang
31 Reason:
32 1. Revise the checking conditon to prevent misjudgement.
33 Solution:
34
35 ********************************************************************** */
36
37
38 #define _YUV_C_
39
40 /* ------------------------------------
41 Header Files
42 ------------------------------------ */
43 #include "bitek.h"
44 #include "eeprom.h"
45 #include "led.h"
46 #include "menu.h"
47 #include "mcu.h"
48 #include "osd.h"
49 #include "platform.h"
50 #include "timer.h"
51 #include "yuv.h"
52
53
54
C51 COMPILER V7.50 YUV 02/05/2007 16:33:26 PAGE 2
55 /* ------------------------------------
56 Macro Definitions
57 ------------------------------------ */
58
59 /* ------------------------------------
60 Type Definitions
61 ------------------------------------ */
62
63 /* ------------------------------------
64 Variables Definitions
65 ------------------------------------ */
66 static UB8 bIdx;
67
68 /* ------------------------------------
69 Function Prototypes
70 ------------------------------------ */
71
72 /* -------------------------------------------------------------------
73 Name: YUV_Go - (YUV_01_BIT1611B)
74 Purpose: Polling Video Decoder status.
75 Passed: None.
76 Returns: None.
77 Notes:
78 ------------------------------------------------------------------- */
79 void YUV_Go (void)
80 {
81 1 switch (tsEYD.bYUV_ID)
82 1 {
83 2 case YUV_ID_CVBS_11:
84 2 case YUV_ID_CVBS_21:
85 2 case YUV_ID_YC_Y12C22:
86 2 bYUV_SB = BITEK_RxByte(YUV_MAD, VP_186_DVP_STATUS);
87 2
88 2 // lock no change
89 2 if (bYUV_SB == bLastSB)
90 2 return;
91 2
92 2 break;
93 2 } // switch
94 1
95 1
96 1 if (YUV_Ready())
97 1 {
98 2 // Video signal is ready !
99 2
100 2
101 2 // To check TV color standard !
102 2 tsEYD.bYUV_CS = YUV_GetColorStandard();
103 2
104 2 // To setup VP original Color Standard !
105 2 //VP_SetColorStandard(tsEYD.bYUV_CS);
106 2
107 2 // To stop flashing RED LED !
108 2 LED_RED_BLINK_OFF;
109 2 LED_RED_OFF;
110 2
111 2
112 2 switch (tsEYD.bYUV_ID)
113 2 {
114 3 case YUV_ID_CVBS_11:
115 3 case YUV_ID_CVBS_21:
116 3 case YUV_ID_YC_Y12C22:
C51 COMPILER V7.50 YUV 02/05/2007 16:33:26 PAGE 3
117 3 bColorStd = bYUV_SB & VP_MASK_COLOR_STANDARD;
118 3
119 3 if ((bColorStd == YUV_CS_PAL) &&
120 3 (bYUV_SB & VP_MASK_FIDT) )
121 3 {
122 4 // 60Hz
123 4 bColorStd = YUV_CS_PAL_60;
124 4 }
125 3
126 3 if (bYUV_SB & VP_MASK_FIDT)
127 3 {
128 4 // 60Hz
129 4 BITEK_TxByte(YUV_MAD, VP_12A_ACLAMP_LEVEL, 0x44);
130 4 }
131 3 else
132 3 {
133 4 // 50Hz
134 4 BITEK_TxByte(YUV_MAD, VP_12A_ACLAMP_LEVEL, 0x48);
135 4 }
136 3
137 3
138 3 OSD_ShowMsg(OSD_MESSAGE,
139 3 OSD_X_COLOR_STD,
140 3 OSD_Y_COLOR_STD,
141 3 apbYUV_ColorStd[ bColorStd ]);
142 3 break;
143 3
144 3 } // switch
145 2
146 2
147 2 OSD_EnableWindow(OSD_MESSAGE, ON);
148 2
149 2
150 2 // OSD Auto OFF !
151 2 wMENU_Tick = MENU_AUTO_OFF_TIME;
152 2
153 2 // To disable Backlight !
154 2 MCU_BL_ON;
155 2 }
156 1 else
157 1 {
158 2 // To flash RED LED !
159 2 LED_RED_BLINK_ON;
160 2
161 2
162 2 // Show Message for NO SIGNAL
163 2 OSD_ShowMsg(OSD_MESSAGE,
164 2 OSD_X_COLOR_STD,
165 2 OSD_Y_COLOR_STD,
166 2 abNoSignal );
167 2
168 2 OSD_EnableWindow(OSD_MESSAGE, ON);
169 2
170 2 bLastCS = YUV_CS_NONE;
171 2
172 2 // To disable OSD Auto OFF !
173 2 wMENU_Tick = 0;
174 2 } // bYUV_SB && bYUV_MSTS
175 1
176 1 #ifdef NOT_JUNK
OSD_ShowHex(OSD_MESSAGE, 0, 0, bYUV_SB);
OSD_ShowHex(OSD_MESSAGE, 3, 0, bLastSB);
C51 COMPILER V7.50 YUV 02/05/2007 16:33:26 PAGE 4
#endif
180 1
181 1 // To backup the debounced Status Byte !
182 1 bLastSB = bYUV_SB;
183 1 } // YUV_Go
184
185
186 /* -------------------------------------------------------------------
187 Name: YUV_HardwareReset - (YUV_01_BIT1611B)
188 Purpose: To reset Video Decoder chip before setting any registers.
189 Passed:
190 Returns:
191 Notes: [2]16
192 ------------------------------------------------------------------- */
193 void YUV_HardwareReset (void)
194 {
195 1 } /* YUV_HardwareReset */
196
197
198 /* -------------------------------------------------------------------
199 Name: YUV_Init - (YUV_01_BIT1611B)
200 Purpose: To initialize the YUV module.
201 Passed: None.
202 Returns: None.
203 Notes:
204 ------------------------------------------------------------------- */
205 void YUV_Init (void)
206 {
207 1 //YUV_HardwareReset();
208 1
209 1 bLastSB = YUV_SB_BITEK;
210 1
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -