?? mcu.lst
字號:
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 13
PTC_REG = port;
}
}
void PanelPowerOn(void)
{
unsigned char port;
port = PTC_REG;
port |= RDPC_REG;
port &= ~PC7;
PTC_REG = port;
if(PanelInterface == TCON_TO_RSDS || PanelInterface == TCON_TO_TTL)
{
port = PTC_REG;
port |= RDPC_REG;
port &= ~PC3;
PTC_REG = port;
}
}
#endif
757 #if PANEL == CMO_M170ES05
void DC2DCPowerOn(void)
{
unsigned char port;
port = PTE_REG;
port |= RDPE_REG;
port &= ~PE0;
PTE_REG = port;
}
void DC2DCPowerOff(void)
{
unsigned char port;
port = PTE_REG;
port |= RDPE_REG;
port |= PE0;
PTE_REG = port;
}
void XAO_On(void)
{
Byte Port;
Port = PTC_REG;
Port |= RDPC_REG;
Port |= PC3;
PTC_REG = Port;
}
void XAO_Off(void)
{
Byte Port;
Port = PTC_REG;
Port |= RDPC_REG;
Port &= ~PC3;
PTC_REG = Port;
}
#endif
796 void ResetOff(void)
797 {
798 1 unsigned char port;
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 14
799 1 port = PTC_REG;
800 1 port |= RDPC_REG;
801 1 port |= PC4;
802 1 PTC_REG = port;
803 1 }
804
805 void ResetOn(void)
806 {
807 1 unsigned char port;
808 1 port = PTC_REG;
809 1 port |= RDPC_REG;
810 1 port &= ~PC4;
811 1 PTC_REG = port;
812 1 }
813 /*
814 void FastMuteOn()
815 {
816 Byte Port;
817 WaitVblank();
818 Port = PTD_REG;
819 Port |= RDPD_REG;
820 Port |= PD4;
821 PTD_REG = Port;
822 }
823
824 void FastMuteOff()
825 {
826 Byte Port;
827 WaitVblank();
828 Port = PTD_REG;
829 Port |= RDPD_REG;
830 Port &= ~PD4;
831 PTD_REG = Port;
832 }
833 */
834 /*
835 void SAA7114Off()
836 {
837 Byte Port;
838 Port = PTD_REG;
839 Port |= RDPD_REG;
840 Port &= ~PD1;
841 PTD_REG = Port;
842 }
843
844 void SAA7114On()
845 {
846 Byte Port;
847 Port = PTD_REG;
848 Port |= RDPD_REG;
849 Port |= PD1;
850 PTD_REG = Port;
851 }
852 */
853 void AUDIO_MUTE(void)
854 {
855 1 /*
856 1 Byte Port;
857 1 Port = PTD_REG;
858 1 Port |= RDPD_REG;
859 1 Port |= PD1;
860 1 PTD_REG = Port;
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 15
861 1 */
862 1 }
863
864 void AUDIO_On(void)
865 {
866 1 /*
867 1 Byte Port;
868 1 Port = PTD_REG;
869 1 Port |= RDPD_REG;
870 1 Port &= ~PD1;
871 1 PTD_REG = Port;
872 1 */
873 1 }
874 /*
875 bit Saa7114Status()
876 {
877
878 if(PTD_REG & PD1)
879 return 1;
880 else
881 return 0;
882
883 // return 0;
884 }
885 */
886 bit DetectDVI()
887 {
888 1 /*
889 1 if(PTD_REG & PD3)
890 1 return 0;
891 1 else
892 1 return 1;
893 1 */
894 1 return 1;
895 1 }
896
897 /*
898 bit DetectDsub()
899 {
900 if(PTD_REG & PD5)
901 return 0;
902 else
903 return 1;
904 }
905 */
906
907 bit DetectIRQ()
908 {
909 1 if(PTB_REG & PB2)
910 1 return 0;
911 1 else
912 1 return 1;
913 1 }
914 /*
915 bit DetectPower()
916 {
917 if(PTB_REG & PB3)
918 return 1;
919 else
920 return 0;
921 }
922 */
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 16
923
924 bit VsyncValide()
925 {
926 1 Word VsyncWidth;
927 1 LocalTimer = 2; //20ms
928 1 while(!(PTD_REG & BIT_6)) //Vsync Lo
929 1 {
930 2 if(LocalTimer == 0)
931 2 return 0;
932 2 }
933 1 LocalTimer = 10; //100ms
934 1 while(PTD_REG & BIT_6) //Vsync Hi
935 1 {
936 2 if(LocalTimer == 0)
937 2 return 0;
938 2 }
939 1 VsyncWidth = 0;
940 1 while(!(PTD_REG & BIT_6)) //Vsync Hi 1:7us
941 1 {
942 2 VsyncWidth ++;
943 2 if(VsyncWidth > 50) //over 350us
944 2 return 0;
945 2 }
946 1 VsyncWidth = 0;
947 1 while(PTD_REG & BIT_6) //Vsync Hi 1:7us
948 1 {
949 2 VsyncWidth ++;
950 2 if(VsyncWidth > 714) //over 5ms
951 2 return 1;
952 2 }
953 1 return 0;
954 1 }
955
956 void WaitVblank()
957 {
958 1 LocalTimer = 3; //30ms
959 1 while(!(PTD_REG & BIT_6)) //Vsync Lo
960 1 {
961 2 if(LocalTimer == 0)
962 2 return;
963 2 }
964 1 LocalTimer = 5; //50ms
965 1 while(PTD_REG & BIT_6) //Vsync Hi
966 1 {
967 2 if(LocalTimer == 0)
968 2 return;
969 2 }
970 1 }
971 void IntGroup1(void) interrupt 2 using 1
972 {
973 1 Byte Port;
974 1 if(INT_SRC & INT_EXT)
975 1 if(INTEXT_FLG & INTE0)
976 1 {
977 2 if(FastMuteEnable)
978 2 {
979 3 Port = PTC_REG; //backlight off
980 3 Port |= RDPC_REG;
981 3 Port &= ~PC0;
982 3 PTC_REG = Port;
983 3 //Port = PTD_REG; //fastmute on
984 3 //Port |= RDPD_REG;
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 17
985 3 //Port &= ~PD4;
986 3 //PTD_REG = Port;
987 3 }
988 2 Abort = 1; //abort autotune
989 2 if(ChangeMode<10)
990 2 ChangeMode++;
991 2 INTEXT_FLG = INTE0;
992 2 }
993 1 }
994
995 void SetInverter(void)
996 {
997 1 Byte value;
998 1 // if(FuncBuf[pCOLORTEMP] < 4)
999 1 #if PANEL == CMO_M170E4_L01 || PANEL == LP_LM170E01
value = FuncBuf[pBACKLIGHT];
#else
1002 1 value = 0x7f - FuncBuf[pBACKLIGHT];
1003 1 #endif
1004 1 // else
1005 1 // value = FuncMax - FuncBuf[pBACKLIGHT2];
1006 1 PWM9_REG = value * 2;
1007 1 #if PRINT_MESSAGE
printf("FuncBuf[pBACKLIGHT] = %x\r\n",(unsigned short)value);
#endif
1010 1 }
1011
1012 #define AUDIO_PWM_MAX 208
1013 void SetAudioVolume(void)
1014 {
1015 1 unsigned char value;
1016 1 value = (((FuncBuf[pVOLUME] * AUDIO_PWM_MAX) + 50) / 100);
1017 1 //value = FuncBuf[pVOLUME];
1018 1 PWM8_REG = value;
1019 1 #if PRINT_MESSAGE
printf("FuncBuf[pVOLUME] = %x\r\n",(unsigned short)value);
#endif
1022 1 }
1023
1024 void SetVCM_Vol(void)
1025 {
1026 1 unsigned char value;
1027 1 value = FuncBuf[pVCMVOL];
1028 1 PWM7_REG = value;
1029 1 #if PRINT_MESSAGE
printf("FuncBuf[pVCMVOL] = %x\r\n",(unsigned short)value);
#endif
1032 1 }
1033
1034 void SetAudioMute(void)
1035 {
1036 1 if(AudioMute)
1037 1 AUDIO_MUTE();
1038 1 else
1039 1 AUDIO_On();
1040 1 #if PRINT_MESSAGE
printf("AudioMute = %x\r\n",(unsigned short)AudioMute);
#endif
1043 1 }
1044
1045 void PowerOffProcess()
1046 {
C51 COMPILER V6.12 MCU 03/05/2008 14:34:52 PAGE 18
1047 1 Osd_Off();
1048 1 PowerStatus = 0; //power off
1049 1 Write24C16(ep_Status,StatusFlag);
1050 1 PowerSaving();
1051 1 LED_RedOff();
1052 1 LED_GrnOff();
1053 1 if((FactMode)&&(!BurnInMode))//jacky0316 Item41 BurnInMode
1054 1 {
1055 2 FactMode = 0;
1056 2 FuncBuf[pCOLORTEMP] = 3; //Colortemp user
1057 2 Write24C16(ep_Status,StatusFlag);
1058 2 Write24C16(ep_Color_Ptr,2);
1059 2 Write24C16(ep_Color4_R,Read24C16(ep_Color6_R)); //R Gain
1060 2 Write24C16(ep_Color4_G,Read24C16(ep_Color6_G)); //G Gain
1061 2 Write24C16(ep_Color4_B,Read24C16(ep_Color6_B)); //B Gain
1062 2 //Write24C16(ep_Color5_R,Read24C16(ep_Color1_R)); //R Gain
1063 2 //Write24C16(ep_Color5_G,Read24C16(ep_Color1_G)); //G Gain
1064 2 //Write24C16(ep_Color5_B,Read24C16(ep_Color1_B)); //B Gain
1065 2 #if PRINT_MESSAGE
printf("Release Factory mode\r\n");
#endif
1068 2 while(GetKey() == 0);
1069 2 Osd_Off();
1070 2 }
1071 1 while(1)
1072 1 {
1073 2 ScanKeyPad();
1074 2 //KeyScan();
1075 2 //KeyBuffer &= 0x7F;
1076 2 if((KeyBuffer&vkPOWER) && !KeyLock)
1077 2 {
1078 3 PowerStatus = 1; //power on
1079 3 BurnInMode = 0;
1080 3 Write24C16(ep_Status,StatusFlag);
1081 3 WarmUp();
1082 3 }
1083 2 }
1084 1 }
1085
1086 void CheckAnyKey()
1087 {
1088 1 if(Abort)
1089 1 return;
1090 1 if(GetKey() == vkPOWER)
1091 1 Abort = 1;
1092 1 }
1093
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2562 ----
CONSTANT SIZE = 8 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 2
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -