📄 mcu.lst
字号:
761 1 PortC = port;
762 1 }
763 #else
void PanelPowerOff(void)
{
unsigned char port;
port = PortC;
port |= RDPC_REG;
// port |= BIT_7;
port |= 0x82;
PortC = port;
}
void PanelPowerOn(void)
{
unsigned char port;
port = PortC;
port |= RDPC_REG;
// port &= ~BIT_7;
port &= 0x7d;
PortC = port;
}
#endif
784
785 void ResetOff(void)
786 {
787 1 unsigned char port;
788 1 port = PortC;
789 1 port |= RDPC_REG;
790 1 port |= BIT_4;
791 1 PortC = port;
792 1 }
793
794 void ResetOn(void)
C51 COMPILER V7.50 MCU 03/18/2008 22:04:55 PAGE 14
795 {
796 1 unsigned char port;
797 1 port = PortC;
798 1 port |= RDPC_REG;
799 1 port &= ~BIT_4;
800 1 PortC = port;
801 1 }
802
803 void AUDIO_MUTE(void)
804 {
805 1 unsigned char port;
806 1 PWM_REG[11] = 0;
807 1 port = PortC;
808 1 port |= RDPC_REG;
809 1 port |= BIT_3;
810 1 PortC = port;
811 1 }
812
813 void AUDIO_On(void)
814 {
815 1 unsigned char port;
816 1 PWM_REG[11] = Volume * 2 + Volume / 2;
817 1 port = PortC;
818 1 port |= RDPC_REG;
819 1 port &= ~BIT_3;
820 1 PortC = port;
821 1 }
822
823 void AMP_STBY(void)
824 {
825 1 unsigned char port;
826 1 port = PortC;
827 1 port |= RDPC_REG;
828 1 port |= BIT_5;
829 1 PortC = port;
830 1 }
831
832 void AMP_On(void)
833 {
834 1 unsigned char port;
835 1 port = PortC;
836 1 port |= RDPC_REG;
837 1 port &= ~BIT_5;
838 1 PortC = port;
839 1 }
840
841 void DIG_SEL(void)
842 {
843 1 }
844
845 void DIG_Off(void)
846 {
847 1 }
848
849 void DVI_On(void)
850 {
851 1 }
852
853 void DIV_PWND(void)
854 {
855 1 }
856
C51 COMPILER V7.50 MCU 03/18/2008 22:04:55 PAGE 15
857 void VideoEnable(void)
858 {
859 1 unsigned char port;
860 1 port = PortB;
861 1 port |= RDPB_REG;
862 1 port |= BIT_3;
863 1 PortB = port;
864 1 }
865
866 void VideoDisable(void)
867 {
868 1 unsigned char port;
869 1 port = PortB;
870 1 port |= RDPB_REG;
871 1 port &= ~BIT_3;
872 1 PortB = port;
873 1 }
874 /*
875 void IntGroup1(void) interrupt 2 using 3
876 {
877 unsigned char intcase,DataBuf;
878 // P2 = 0xF0;
879 if((INT_SRC & INTIIC0_IRQ) != 0){
880 intcase = INTIIC0_FLG;
881 if(intcase & INTA){
882 DataBuf = IIC0_DATA;
883 INTIIC0_FLG = (INTA | INTRX);
884 if((DataBuf & 0xFE) == NOVATEK_Addr){
885 if(IIC0_CON & SRW){ // Slave Addr || 0x01 ==> Read
886 IIC0_DATA = CmdTxBuffer[0];
887
888 // IIC0_DATA = CmdTxBuffer[CmdTxPtr1++];
889 // if(CmdTxPtr1 > 63)
890 // CmdTxPtr1 = 0;
891
892 }
893 else{ // Slave Addr ==> Write
894 // CmdPtr1 = 0;
895 // CmdPtr2 = 0;
896 }
897 }
898 flag3 |= BIT_6;
899 }
900 else if(intcase & INTTX){
901 INTIIC0_FLG = INTTX;
902 IIC0_DATA = CmdTxBuffer[0];
903
904 // IIC0_DATA = CmdTxBuffer[CmdTxPtr1++];
905 // if(CmdTxPtr1 > 63)
906 // CmdTxPtr1 = 0;
907
908 }
909 else if(intcase & INTRX){
910 INTIIC0_FLG = INTRX;
911 CmdRxBuffer[CmdRxPtr1++] = IIC0_DATA;
912 if(CmdRxPtr1 > 63)
913 CmdRxPtr1 = 0;
914 }
915 else if(intcase & INTNAK){
916 INTIIC0_FLG = INTNAK;
917 }
918 else if(intcase & INTSTOP){
C51 COMPILER V7.50 MCU 03/18/2008 22:04:55 PAGE 16
919 INTIIC0_FLG = INTSTOP;
920 flag3 |= BIT_7;
921 flag3 &= ~BIT_6;
922 }
923 }
924 else{
925 if((PortA & BIT_7) == 0){
926 if(KeyPad2 < 0x02){
927 KeyPad2++;
928 }
929 else if(KeyPad2 == 0x80){
930 KeyPad2 = 0x01;
931 }
932 else if(KeyPad2 > 0x81){
933 KeyPad2--;
934 }
935 }
936 else{
937 if((KeyPad2 > 0x7f)&&(KeyPad2 < 0x82)){
938 KeyPad2++;
939 }
940 else if(KeyPad2 == 0x00){
941 KeyPad2 = 0x81;
942 }
943 else if(KeyPad2 > 0x01){
944 KeyPad2--;
945 }
946 }
947 INTEXT_FLG = INTE0;
948 }
949 }
950 */
951 void CheckDDC2Bi(void)
952 {
953 1 unsigned char cmd;//,i,j;
954 1 if((flag3 & BIT_7) != 0){
955 2 CmdTxBuffer[0] = 0;
956 2 while(CmdRxPtr1 != CmdRxPtr2){
957 3 cmd = CmdRxBuffer[CmdRxPtr2++];
958 3 if(CmdRxPtr2 > 63)
959 3 CmdRxPtr2 = 0;
960 3 CheckCmd(cmd);
961 3 }
962 2 flag3 &= ~BIT_7;
963 2 }
964 1 }
965
966 void ShowMute(void)
967 {
968 1 code unsigned char MuteString[]={ 2,0x22,0x23 };
969 1 OSD_Type = 6;
970 1 Osd3Init();
971 1 WriteWordIIC_HW(Scaler_Addr,0xcc,ChannelColor);
972 1 WriteXY_StrScaler(1,0,0,MuteString);
973 1 WriteXY_StrScaler(1,2,0,SourceTab[5]); //clear red icon
974 1 WriteXY_StrScaler(1,8,0,SourceTab[4]);
975 1 OSD_Control |= BIT_0;
976 1 WriteIIC_HW(Scaler_Addr,0x95,OSD_Control);
977 1 }
978
979 void DirectMute(void)
980 {
C51 COMPILER V7.50 MCU 03/18/2008 22:04:55 PAGE 17
981 1 // if(PowerStatus != 0x80)
982 1 // {
983 1 if((flag3 & BIT_4) == 0)//bit 4 : Mute
984 1 {
985 2 AUDIO_MUTE();
986 2 MuteFlag = 1;
987 2 ShowMute();
988 2 flag3 |= BIT_4;
989 2 }
990 1 else
991 1 {
992 2 if(Volume != 0)
993 2 AUDIO_On(); //CANCEL AUDIO MUTE
994 2 MuteFlag = 0;
995 2 flag3 &= ~BIT_4;
996 2 OSD_OFF();
997 2 }
998 1 // }
999 1 }
1000
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2666 ----
CONSTANT SIZE = 227 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 8 10
IDATA SIZE = ---- ----
BIT SIZE = 2 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -