📄 osd.lst
字号:
257 1 WriteIIC_HW(Scaler_Addr,0xcf,0x01);
258 1
259 1 // Wait for Clear Ready....
260 1 while((ReadIIC_HW(Scaler_Addr,0xcf) & BIT_0) != 0){
261 2 CheckModeChange();
262 2 }
263 1 }
264 /*==========================================
265 ==========================================*/
266 void MainMenu(void)
267 {
268 1 if(MuteFlag)
269 1 {
270 2 MuteFlag = 0;
271 2 OSD_OFF();
272 2 }
273 1 if((flag1 & BIT_1) == 0)
274 1 {
275 2 switch(OSD_Type)
276 2 {
277 3 case 0x00:
278 3 SavePointer = 0;
279 3 OsdInit();
280 3 /* if(PowerStatus == 0x80)
281 3 {
282 3 ShowResolution();
283 3 ShowFreq();
284 3 }
285 3 ShowVersion();
286 3 */ OSD_Type = 1;
287 3 //osd on
288 3 OSD_Control |= BIT_0;
289 3 WriteIIC_HW(Scaler_Addr,0x95,OSD_Control);
290 3 if((flag3 & BIT_2) != 0x00)
291 3 printf("OSD ON\r\n");
292 3 break;
293 3 default:
294 3 if(SavePointer != 0x00)
295 3 SaveData();
296 3 OSD_Type = 1;
297 3
298 3 if(PowerStatus == 0x80)
299 3 {
300 4 OsdInit();
301 4 // ShowFreq();
302 4 // ShowResolution();
C51 COMPILER V7.50 OSD 03/18/2008 22:04:55 PAGE 6
303 4 }
304 3 // ShowVersion();
305 3 //osd on
306 3 OSD_Control |= BIT_0;
307 3 WriteIIC_HW(Scaler_Addr,0x95,OSD_Control);
308 3 break;
309 3 }
310 2 }
311 1 KeyBuffer = 0xff;
312 1 }
313
314 void OSD_OFF(void)
315 {
316 1 if(SavePointer != 0x00)
317 1 SaveData();
318 1 if((flag3 & BIT_4) == 0){ //no mute
319 2 if(OSD_Type != 0){
320 3 OSD_Control &= ~BIT_0;
321 3 WriteIIC_HW(Scaler_Addr,0x95,OSD_Control);
322 3 OSD_Type = 0;
323 3 if((flag3 & BIT_2) != 0x00)
324 3 printf("OSD OFF\r\n");
325 3 }
326 2 }
327 1 else{
328 2 OSD_Point1 = 0;
329 2 OSD_Point2 = 0;
330 2 }
331 1 }
332
333 void ShowMainMenu(void)
334 {
335 1 code unsigned char MainIcon[][5]=
336 1 {
337 1 4,3,0,0x00,0x01,
338 1 4,7,0,0x18,0x19,
339 1 4,11,0,0x02,0x03,
340 1 4,15,0,0x04,0x05,
341 1 4,19,0,0x06,0x07,
342 1
343 1 4,22,2,0x08,0x09,
344 1 4,22,4,0x0a,0x0b,
345 1
346 1 4,19,6,0x0c,0x0d,
347 1 4,15,6,0x09,0x2c,
348 1 4,11,6,0x0a,0x2c,
349 1 4,7,6,0x0b,0x2c,
350 1 4,3,6,0x10,0x11,
351 1
352 1 4,0,4,0x12,0x13,
353 1 4,0,2,0x20,0x20,
354 1 };
355 1 unsigned char i;
356 1 for(i=0; i<14; i++)
357 1 {
358 2 if(MainIconColor[i] == 1)
359 2 {
360 3 if((SyncMode == 3)&&(i > 1)&&(i < 6)){
361 4 WriteWordIIC_HW(Scaler_Addr,0xcc,DisIconColor);
362 4 }
363 3 else{
364 4 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameColor);
C51 COMPILER V7.50 OSD 03/18/2008 22:04:55 PAGE 7
365 4 }
366 3 if(((flag2 & BIT_5) != 0)&&(i > 7)&&(i < 11)){
367 4 WriteWordIIC_HW(Scaler_Addr,0xcc,DisIconColor);
368 4 }
369 3 else if(i == 8){
370 4 WriteWordIIC_HW(Scaler_Addr,0xcc,RedColor);
371 4 }
372 3 else if(i == 9){
373 4 WriteWordIIC_HW(Scaler_Addr,0xcc,GreenColor);
374 4 }
375 3 else if(i == 10){
376 4 WriteWordIIC_HW(Scaler_Addr,0xcc,BlueColor);
377 4 }
378 3 }
379 2 else
380 2 {
381 3 if((SyncMode == 3)&&(i > 1)&&(i < 6)){
382 4 WriteWordIIC_HW(Scaler_Addr,0xcc,DisIconMColor);
383 4 }
384 3 else{
385 4 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameMColor);
386 4 }
387 3 if(((flag2 & BIT_5) != 0)&&(i > 7)&&(i < 11)){
388 4 WriteWordIIC_HW(Scaler_Addr,0xcc,DisIconMColor);
389 4 }
390 3 else{
391 4 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameMColor);
392 4 }
393 3 }
394 2 WriteStringScaler(1,MainIcon[i]);
395 2 }
396 1 }
397
398 void CheckRGB(void)
399 {
400 1 if((flag2 & BIT_5) != 0){
401 2 FillLineAttr(15,6,2,DisIconColor);
402 2 FillLineAttr(11,6,2,DisIconColor);
403 2 FillLineAttr(7,6,2,DisIconColor);
404 2 }
405 1 else{
406 2 FillLineAttr(15,6,2,RedColor);
407 2 FillLineAttr(11,6,2,GreenColor);
408 2 FillLineAttr(7,6,2,BlueColor);
409 2 }
410 1 }
411
412 void ShowMisceMenu(void)
413 {
414 1 code unsigned char MainIcon1[][5]={
415 1
416 1 4,3,0,0x12,0x13,
417 1 4,7,0,0x16,0x17,
418 1 4,11,0,0x18,0x19,
419 1 4,15,0,0x1a,0x1b,
420 1 4,19,0,0x1c,0x1d,
421 1
422 1 4,22,2,0x1e,0x1f,
423 1 4,22,4,0x20,0x21,
424 1
425 1 4,19,6,0x22,0x23,
426 1 4,15,6,0x24,0x25,
C51 COMPILER V7.50 OSD 03/18/2008 22:04:55 PAGE 8
427 1 4,11,6,0x26,0x27,
428 1 4,7,6,0x28,0x29,
429 1 4,3,6,0x20,0x20,
430 1
431 1 4,0,4,0x20,0x20,
432 1 4,0,2,0x20,0x20,
433 1 };
434 1 code unsigned char MainIcon2[][5]={
435 1 4,7,6,0x20,0x20,
436 1 4,3,6,0x20,0x20,
437 1 4,0,4,0x20,0x20,
438 1 4,0,2,0x20,0x20,
439 1 };
440 1
441 1 unsigned char i;
442 1 for(i=0; i<10; i++){
443 2 if(MainIconColor[i+14] == 1){
444 3 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameColor);
445 3 }
446 2 else{
447 3 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameMColor);
448 3 }
449 2 WriteStringScaler(1,MainIcon1[i]);
450 2 }
451 1 if((flag3 & BIT_0) == 0){
452 2 for(i=0; i<4; i++){
453 3 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameColor);
454 3 WriteStringScaler(1,MainIcon2[i]);
455 3 }
456 2 }
457 1 else{
458 2 for(i=10; i<14; i++){
459 3 if(MainIconColor[i+14] == 1){
460 4 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameColor);
461 4 }
462 3 else{
463 4 WriteWordIIC_HW(Scaler_Addr,0xcc,FrameMColor);
464 4 }
465 3 WriteStringScaler(1,MainIcon1[i]);
466 3 }
467 2 }
468 1 }
469
470 void ShowSubMenu(void)
471 {
472 1 unsigned char k;
473 1 //Icon
474 1 if(OSD_Point1 == 0){
475 2 k = OSD_Point2 << 1;
476 2 }
477 1 else{
478 2 k = (OSD_Point2-13) << 1; //gan 14 to 13
479 2 }
480 1 if(MainIconColor[OSD_Point2] == 1){
481 2 if(OSD_Point2 == 8){
482 3 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconRedColor);
483 3 }
484 2 else if(OSD_Point2 == 9){
485 3 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconGreenColor);
486 3 }
487 2 else if(OSD_Point2 == 10){
488 3 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconBlueColor);
C51 COMPILER V7.50 OSD 03/18/2008 22:04:55 PAGE 9
489 3 }
490 2 else if(OSD_Point2 == 13){
491 3 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconMColor);
492 3 }
493 2 else{
494 3 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconColor);
495 3 }
496 2 }
497 1 else{
498 2 FillLineAttr(IconPosition[k],IconPosition[k+1],2,IconMColor);
499 2 }
500 1 // Show Titel
501 1 k = Language * 25 + OSD_Point2;
502 1 // WriteXY_CStrScaler(0,7,3,23,Tab1J[k]); //display every function char
503 1 WriteXY_CStrScaler(0,2,2,20,Tab1J[k]);
504 1 //Show Value
505 1 switch(OSD_Point2){
506 2 case 0:
507 2 // if((flag3 & BIT_0) == 0){ //gan
508 2 // ShowInverter();
509 2 // }
510 2 // else{
511 2 ClearText1();
512 2 ShowBrightness();
513 2 // }
514 2 break;
515 2 case 1:
516 2 ShowContrast();
517 2 break;
518 2 case 2:
519 2 ShowPhase();
520 2 break;
521 2 case 3:
522 2 ShowClock();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -