📄 t103_util.lst
字号:
I2CWriteByte(TW803_P0,0xE1, ScanMode[3]);
#else
UP_DOWN = DigiPanlScanMode[3]>>1;
LEFT_RIGHT = DigiPanlScanMode[3]&0x01;
I2CWriteByte(TW803_P0,0xE1, ScanMode[3]&0xF0);
#endif
break;
}
#ifdef OUT_PIN_CONF
I2CWriteByte(TW803_P0,0xE1, OUT_PIN_CONF);
#endif
return;
}
#endif
168
169 void SourceSelect(void)
170 {
171 1 if(m_cSource==isrccRGB565)
172 1 {
173 2
174 2 SetSignalStd();
175 2 SetOPTiming();
176 2 }
C51 COMPILER V7.50 T103_UTIL 10/30/2006 16:14:42 PAGE 4
177 1 I2CWriteByte(TW803_P0, 0xC2, I2CReadByte(TW803_P0, 0xC2)|(PSYNC_STR|IGNORE_VSYNC));
178 1 I2CWriteByte(TW803_P0, 0x9d, 0x10);
179 1 I2CWriteByte(TW803_P0, 0x9e, 0xff);
180 1 I2CWriteByte(TW803_P0, 0x9f, 0x40);
181 1 I2CWriteByte(TW803_P0, PATTERN_CTRL, 0x87);
182 1 I2CWriteByte(TW803_P0,0x0f,0x70); //2005-03030 for position shift
183 1
184 1 I2CWriteByte(TW803_P0,0x0f,0x00); //2005-03030 for position shift
185 1 I2CWriteByte(TW803_P0,0x31,0x00);
186 1 I2CWriteByte(TW803_P0,0x1a, 0x87);
187 1 I2CWriteByte(TW803_P0,0x18, uiaSrcMux[(m_cSource&0x0F)*2]>>8); // cMux1);
188 1 I2CWriteByte(TW803_P0,0x19, uiaSrcMux[(m_cSource&0x0F)*2]&0xFF); // cMux2);
189 1 if(uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeSVIDEO)
190 1 {
191 2 #ifdef T112
I2CWriteByte(TW803_P0,0x11, 0x22);
#else
194 2 I2CWriteByte(TW803_P0,0x11, 0x05);
195 2 #endif
196 2 I2CWriteByte(TW803_P2,0x07, /*0x24*/0x27);//0x05|0x22); //lucy
197 2 I2CWriteByte(TW803_P2,0x00, I2CReadByte(TW803_P2,0x00)|0x01);
198 2 I2CWriteByte(TW803_P2,0x01, I2CReadByte(TW803_P2,0x01)&~ENYPbPr);
199 2 I2CWriteByte(TW803_P2,0x03, I2CReadByte(TW803_P2,0x03)|0x03);
200 2
201 2 I2CWriteByte(TW803_P0,0x16, 0xD3); //lucy for begin source is SVIDEO
202 2 I2CWriteByte(TW803_P0,0x40, 0xC2); //lucy for begin source is SVIDEO
203 2 I2CWriteByte(TW803_P0,0x17, 0xC8); //lucy for begin source is SVIDEO
204 2 }
205 1 else if (uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeCVBS)
206 1 {
207 2
208 2
209 2 I2CWriteByte(TW803_P0,0x11, 0x00);
210 2 I2CWriteByte(TW803_P2,0x07, 0x20);//0x05|0x22);
211 2 I2CWriteByte(TW803_P2,0x00, I2CReadByte(TW803_P2,0x00)&0xfe);
212 2 // I2CWriteByte(TW803_P2,0x01, I2CReadByte(TW803_P2,0x01)&~ENYPbPr);
213 2 // I2CWriteByte(TW803_P0,0x16, 0xD3);
214 2
215 2 if(m_cChroma==S_NTSC_4) // temporarily add by Sherman 06'01'27
216 2 I2CWriteByte(TW803_P2,0x03, 3);
217 2 else
218 2 I2CWriteByte(TW803_P2,0x03, 0);
219 2
220 2
221 2 //I2CWriteByte(TW803_P0,0x11, 0x00);
222 2 //I2CWriteByte(TW803_P2,0x07, 0x21);//0x05|0x22);
223 2 //I2CWriteByte(TW803_P2,0x00, I2CReadByte(TW803_P2,0x00)&0xfe);
224 2 //I2CWriteByte(TW803_P2,0x01, I2CReadByte(TW803_P2,0x01)&~ENYPbPr);
225 2 //I2CWriteByte(TW803_P0,0x16, 0xD3);
226 2
227 2 //if(m_cChroma==S_NTSC_4) // temporarily add by Sherman 06'01'27
228 2 // I2CWriteByte(TW803_P2,0x03, I2CReadByte(TW803_P2,0x03)&0xf8|0x03);
229 2 //else
230 2 // I2CWriteByte(TW803_P2,0x03, I2CReadByte(TW803_P2,0x03)&0xfc);
231 2 }
232 1 else if (uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeYPBPR)
233 1 {
234 2 I2CWriteByte(TW803_P0,0x11, 0x55);
235 2 I2CWriteByte(TW803_P2,0x07, 0x20);
236 2 I2CWriteByte(TW803_P2,0x01, I2CReadByte(TW803_P2,0x01)|ENYPbPr);
237 2 }
238 1 else if (uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeRGB)
C51 COMPILER V7.50 T103_UTIL 10/30/2006 16:14:42 PAGE 5
239 1 {
240 2 I2CWriteByte(TW803_P0,0x16, 0x00);
241 2 I2CWriteByte(TW803_P0,0x31, 0x40);
242 2 I2CWriteByte(TW803_P0,0x40, 0xC2);
243 2 I2CWriteByte(TW803_P0,0x17, 0xC8);
244 2 I2CWriteByte(TW803_P0,0x1A, I2CReadByte(TW803_P0,0x1A)&0xF8);
245 2 //~ Enable Interrupt ~//
246 2 //I2CWriteByte(TW803_P0,0x33, 0xB0);
247 2 I2CWriteByte(TW803_P0,0x33, 0x0C);
248 2 I2CWriteByte(TW803_P0,0x32, 0xFF);
249 2 I2CWriteByte(TW803_P0,0x37, 0x40);
250 2 I2CWriteByte(TW803_P0,0x39, 0x10);
251 2 }
252 1 else if (uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeRGB565)
253 1 {
254 2 I2CWriteByte(TW803_P0,0x16, 0xD3);
255 2 I2CWriteByte(TW803_P0,0x40, 0xC2);
256 2 I2CWriteByte(TW803_P0,0x17, 0xC8);
257 2 SRC_565();
258 2 }
259 1
260 1 if (uiaSrcMux[(m_cSource&0x0F)*2+1]==itypeITU656)
261 1 {
262 2 I2CWriteByte(TW803_P0,0x31, 0x10);
263 2
264 2 }
265 1
266 1
267 1
268 1
269 1
270 1
271 1
272 1
273 1
274 1 #ifdef T515
if ( (m_cSource&0x0F)< isrc_T515_CVIDEO1){
if(cSVideo)
I2CWriteByte(TW803_P2,0x07, 0x06|0x02);//|0x22
else
I2CWriteByte(TW803_P2,0x07, 0x02);// 930729//|0x20
}else{
DetectSignalStd(); // add by Sherman 06'01'03
SRC_656();
}
if((m_cSource&0x0F)>=isrcSVIDEO){
I2CWriteByte(TW803_P2,0x02, 0x4B);
I2CWriteByte(TW803_P0,0x1a, 0x87);
}
twdDelay(300);
if((m_cSource&0x0F)>=isrc_T515_CVIDEO1){
NoSignal=0;
I2CWriteByte(TW803_P0, 0xC2, I2CReadByte(TW803_P0, 0xC2)&~(PSYNC_STR|IGNORE_VSYNC));
I2CWriteByte(TW803_P0, PATTERN_CTRL, 0x00);
}else{
if(I2CReadByte(TW803_P2, 0x3A)&0x06){
NoSignal=0;
I2CWriteByte(TW803_P0, 0xC2, I2CReadByte(TW803_P0, 0xC2)&~(PSYNC_STR|IGNORE_VSYNC));
I2CWriteByte(TW803_P0, PATTERN_CTRL, 0x00);
}
}
C51 COMPILER V7.50 T103_UTIL 10/30/2006 16:14:42 PAGE 6
#else
302 1 twdDelay(500);
303 1 if((I2CReadByte(TW803_P2, 0x3A)&0x06)){
304 2 NoSignal=0;
305 2 I2CWriteByte(TW803_P0, 0xC2, I2CReadByte(TW803_P0, 0xC2)&~(PSYNC_STR|IGNORE_VSYNC));
306 2 I2CWriteByte(TW803_P0, PATTERN_CTRL, 0x00);
307 2 }
308 1 #endif
309 1 I2CWriteByte(TW803_P0, 0xE2, 0x11);
310 1 }
311
312
313 void DetectSignalStd(void)
314 {
315 1 uCHAR index=0,SlaveAddr,RegAddrShift;//,tmp;
316 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -