📄 lcd_osd_rel.lst
字号:
520 3 Data[12] = usIPV_ACT_LEN - ((unsigned int)100 * ucTemp);
521 3
522 3 if (10 <= ucTemp)
523 3 {
524 4 Data[8] = _1_;
525 4 Data[9] = ucTemp - 10 + _0_;
526 4 Data[10] = Data[12] / 10;
527 4 Data[11] = Data[12] - (10 * Data[10]) + _0_;
528 4 Data[10] = Data[10] + _0_;
529 4 }
530 3 else
531 3 {
532 4 Data[8] = ucTemp + _0_;
533 4 Data[9] = Data[12] / 10;
534 4 Data[10] = Data[12] - (10 * Data[9]) + _0_;
535 4 Data[9] = Data[9] + _0_;
536 4 Data[11] = 0;
537 4 }
538 3 Data[12] = 0;
539 3 RTDWrite(Data);
540 3
541 3 // Show Refresh Rate
542 3 RTDCodeW(Remark_Rate);
543 3
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 10
544 3 Data[0] = 7;
545 3 Data[1] = N_INC;
546 3 Data[2] = OSD_DATA_92;
547 3 Data[3] = ucRefresh / 10;
548 3 Data[4] = ucRefresh - (Data[3] * 10) + _0_;
549 3 Data[3] = Data[3] + _0_;
550 3 Data[5] = _H_;
551 3 Data[6] = _Z_;
552 3 Data[7] = 0;
553 3 RTDWrite(Data);
554 3 }
555 2 break;
556 2 }
557 1 }
558
559 void Show_Note(void)
560 {
561 1 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
562 1 RTDCodeW(OSD_Reset);
563 1
564 1 Get_OSD_Margin();
565 1
566 1 Data[8] = Data[2];
567 1 Data[9] = Data[0] + 2;
568 1
569 1 Data[0] = 5;
570 1 Data[1] = Y_INC;
571 1 Data[2] = OSD_ROW_90;
572 1 Data[3] = 0xaf;
573 1 Data[4] = 0x0c;
574 1 Data[5] = 5;
575 1 Data[6] = N_INC;
576 1 Data[7] = OSD_DATA_92;
577 1
578 1 Data[10] = 0;
579 1 RTDWrite(Data);
580 1
581 1 // When input format changed, OSD will be cleared by Detect_VGA_Mode() and Detect_AV_Mode()
582 1 switch (stGUD1.INPUT_SOURCE & 0x07)
583 1 {
584 2 #if (VIDEO_CHIP != VDC_NONE || TMDS_ENABLE == 1)
case SOURCE_VGA:
RTDCodeW(OSD_RGB); // OSD RGB note
break;
case SOURCE_DVI:
RTDCodeW(OSD_DVI); // OSD DVI note
break;
#endif
592 2
593 2 #if (VIDEO_CHIP != VDC_NONE)
case SOURCE_AV:
RTDCodeW(OSD_AV); // OSD AV note
break;
case SOURCE_SV:
RTDCodeW(OSD_SV); // OSD S-Video note
break;
case SOURCE_YUV:
RTDCodeW(OSD_YUV); // OSD YUV note
break;
case SOURCE_TV:
RTDCodeW(OSD_TV);
break;
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 11
#endif
607 2 default :
608 2 break;
609 2 }
610 1 RTDCodeW(OSD_Enable);
611 1
612 1 #if(IRPOLLING)
usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT * 34;
#else
615 1 usOSD_Timer = (unsigned int)stGUD1.OSD_TIMEOUT * 51;
616 1 #endif
617 1
618 1 }
619
620 void Show_Hint(void)
621 {
622 1 if (MODE_NOSIGNAL == ucMode_Curr)
623 1 {
624 2 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
625 2 RTDCodeW(OSD_Reset);
626 2
627 2 if ((SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07)) && (VGA_ONLINE != bVGA_CONNECT))
628 2 {
629 3 RTDCodeW((unsigned char *)OSD_HINT_TABLE[0][stGUD1.FUNCTION & 0x07]);
630 3 }
631 2 else
632 2 {
633 3 RTDCodeW((unsigned char *)OSD_HINT_TABLE[1][stGUD1.FUNCTION & 0x07]);
634 3 }
635 2
636 2 RTDCodeW(OSD_Enable);
637 2 }
638 1 else if (MODE_NOSUPPORT == ucMode_Curr)
639 1 {
640 2 RTDSetByte(HOSTCTRL_02, 0x40); // Wake RTD up
641 2 RTDCodeW(OSD_Reset);
642 2
643 2 RTDCodeW((unsigned char *)OSD_HINT_TABLE[2][stGUD1.FUNCTION & 0x07]);
644 2
645 2 RTDCodeW(OSD_Enable);
646 2 }
647 1 }
648
649
650 void Init_Page(unsigned char index)
651 {
652 1 OSD_Position();
653 1 OSD_Clear(2, 10, 2, 24);
654 1
655 1 OSD_Window(3, 0, 11, 2, 25, OSD_WINDOW_ENABLE | OSD_WINDOW_SHADOWING, COLOR_CYAN); // Main OSD window
656 1
657 1 RTDCodeW(OSD_Title_Atb);
658 1
659 1 Data[0] = 5;
660 1 Data[1] = Y_INC;
661 1 Data[2] = OSD_ROW_90;
662 1 Data[3] = 0xa0;
663 1 Data[4] = (index << 2) + 2;
664 1 Data[5] = 7;
665 1 Data[6] = N_INC;
666 1 Data[7] = OSD_DATA_92;
667 1 Data[8] = 0x0f;
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 12
668 1 Data[9] = 0x0f;
669 1 Data[10] = 0x0f;
670 1 Data[11] = 0x0f;
671 1 Data[12] = 0;
672 1 RTDWrite(Data);
673 1
674 1 RTDCodeW(OSD_Title_Icon);
675 1
676 1 RTDCodeW(CHINESE == (stGUD1.FUNCTION & 0x07) ? OSD_Title_C_Atb : OSD_Title_E_Atb);
677 1 }
678
679 //////////////////////////////////////////////////////////////////////////////////////////////////////////
-////
680 // OSD Process Routine
681 //////////////////////////////////////////////////////////////////////////////////////////////////////////
-////
682
683 // In all OSD main page process, you CANNOT call other main page process directly.
684 // You CAN only change ucOSD_Page_Index to indicate other main page.
685 // Main program will detect the change of ucOSD_Page_Index and send NOTIFY_SHOW to the new page.
686 // The only constraint is YOU CANNOT change ucOSD_Page_Index when receive NOTIFY_SHOW.
687 // p.s. You can call sub-page process directly.
688
689 // OSD_Proc0 handles messages when there is no OSD window on screen (ucOSD_Page_Index = 0)
690 void OSD_Proc0(unsigned char action)
691 {
692 1 switch (action)
693 1 {
694 2 case NOTIFY_ENTER_KEY:
695 2 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
696 2 {
697 3 ucMode_Curr = MODE_OSDFORCE;
698 3 return;
699 3 }
700 2 // Change to OSD Main Page 1 and Main Program will show it
701 2 ucOSD_Page_Index = 1;
702 2 ucOSD_Item_Index0 = 0;
703 2 ucOSD_Item_Index1 = 0;
704 2 ucOSD_Item_Index2 = 0;
705 2 fac_timer = 0;
706 2 break;
707 2 case NOTIFY_RIGHT_KEY :
708 2 case NOTIFY_LEFT_KEY :
709 2 case NOTIFY_IR_RIGHT_KEY :
710 2 case NOTIFY_IR_LEFT_KEY :
711 2 case NOTIFY_IR_VOLINC :
712 2 case NOTIFY_IR_VOLDEC :
713 2 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
714 2 {
715 3 ucMode_Curr = MODE_OSDFORCE;
716 3 return;
717 3 }
718 2 #if (AUDIO_TYPE != AUDIO_NONE)
if ( ucOSD_Item_Index1 == 0 )
{
ucOSD_Item_Index1 = 1;
stGUD3.VOLUME &= 0x1f;
RTDCodeW(OSD_Reset);
RTDCodeW(OSD_Enable);
RTDCodeW((unsigned char *)OSD_Volume_TABLE[stGUD1.FUNCTION & 0x07]);
OSD_Slider(3, 1, 20, 0x1f - stGUD3.VOLUME, 0x1f, 0x01);
}
C51 COMPILER V7.50 LCD_OSD_REL 07/28/2008 16:10:58 PAGE 13
else
{
if (NOTIFY_RIGHT_KEY == action || NOTIFY_IR_RIGHT_KEY == action || NOTIFY_IR_VOLINC == action)
{
if (0x00 == stGUD3.VOLUME) break;
stGUD3.VOLUME = stGUD3.VOLUME - 1;
}
else
{
if (0x1f <= stGUD3.VOLUME) break;
stGUD3.VOLUME = stGUD3.VOLUME + 1;
}
OSD_Slider(3, 1, 20, 0x1f - stGUD3.VOLUME, 0x1f, 0x01);
SetVolume();
Save_GUD3();
}
#endif
745 2 fac_timer = 0;
746 2 break;
747 2 case NOTIFY_LR_KEY :
748 2 // Go to Hidden FACTORY Function Page
749 2 if ( fac_timer < 150 ) fac_timer = fac_timer + 1;
750 2 if (SOURCE_VGA == (stGUD1.INPUT_SOURCE & 0x07) && fac_timer >= 150)
751 2 {
752 3 ucOSD_Page_Index = 8;
753 3 ucOSD_Item_Index0 = 1;
754 3 ucOSD_Item_Index1 = 0;
755 3 ucOSD_Item_Index2 = 0;
756 3 fac_timer = 0;
757 3 }
758 2 break;
759 2 case NOTIFY_AUTO_KEY:
760 2 if (MODE_NOSIGNAL == ucMode_Curr || MODE_NOSUPPORT == ucMode_Curr)
761 2 {
762 3 ucMode_Curr = MODE_OSDFORCE;
763 3 return;
764 3 }
765 2 if ( ucOSD_Page_Index == 0 )
766 2 {
767 3 if ( ucOSD_Item_Index1 == 0 )
768 3 {
769 4 RTDCodeW((unsigned char *)OSD_Autocfg_TABLE[stGUD1.FUNCTION & 0x07]);
770 4 RTDCodeW(OSD_Enable);
771 4 if (MODE_0640x0350x70HZ <= ucMode_Curr && MODE_0720x0400x70HZ >= ucMode_Curr)
772 4 {
773 5 unsigned char ucResult;
774 5
775 5 stMUD.CLOCK = 128;
776 5
777 5 Set_H_Position();
778 5 Set_Clock();
779 5 Save_MUD(ucMode_Curr);
780 5
781 5 ucResult = Auto_Phase();
782 5
783 5 if (ERROR_SUCCEED == ucResult) ucResult = Auto_Position();
784 5 if (ERROR_INPUT == ucResult)
785 5 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -