⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 misc.lst

📁 MST720-DEMO程序
💻 LST
字号:
C51 COMPILER V7.50   MISC                                                                  03/18/2008 22:29:07 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE MISC
OBJECT MODULE PLACED IN ..\1out\Misc.obj
COMPILER INVOKED BY: D:\设计软件\Keil\C51\BIN\C51.EXE ..\KERNEL\Misc.c BROWSE INCDIR(..\INC\;..\PANEL\;..\UI\;..\OPTION\
                    -;..\SCALER\DSP\) DEFINE(MCU_TYPE_SEL=0) DEBUG OBJECTEXTEND PRINT(..\1out\Misc.lst) OBJECT(..\1out\Misc.obj)

line level    source

   1          /******************************************************************************
   2           Copyright (c) 2005 MStar Semiconductor, Inc.
   3           All rights reserved.
   4          
   5           [Module Name]: Misc.c
   6           [Date]:        04-Jan-2005
   7           [Comment]:
   8             Misc subroutines.
   9           [Reversion History]:
  10          *******************************************************************************/
  11          #define _MISC_C_
  12          
  13          /********************
  14          * INCLUDE FILES     *
  15          *********************/
  16          #include "Project.h"
  17          #include "Global.h"
  18          #include "Misc.h"
  19          #include "Ms7X_reg.h"
  20          #include "Mcu_reg.h"
  21          #include "Ms_Rwreg.h"
  22          #include "Ms_Func.h"
  23          #include "Timer0.h"
  24          #include "Debug.h"
  25          #include "PANEL.h"
  26          
  27          /**********************
  28          * FUNCTION PROTOTYPES *
  29          ***********************/
  30          void miscGetDelayHandle(void)
  31          {
  32   1              g_ucDelayTimerHandle = sysTimer0Register();
  33   1              g_ucOSDTimerHandle = sysTimer0Register();
  34   1              //sysWriteUartOneByte(g_ucDelayTimerHandle);
  35   1      }
  36          
  37          void miscDelay1ms(WORD mstime)
  38          {
  39   1              sysTimer0Set(g_ucDelayTimerHandle, mstime);
  40   1              while(!(sysTimer0Expired(g_ucDelayTimerHandle) == TIMER_EXPIRED));
  41   1      
  42   1      }
  43          
  44          void miscTurnOffPanel(void)
  45          {
  46   1              PANEL_BLIGHT_OFF();                                     // Turn off backlight
  47   1      
  48   1              mstWriteByte(BK0_5C_FRAME_COLOR_1, 0xFF);               // Send white pattern
  49   1              mstWriteByte(BK0_5D_FRAME_COLOR_2, 0xFF);
  50   1              mstWriteByte(BK0_02_ISELECT, mstReadByte(BK0_02_ISELECT)|NIS_B); // Mute display
  51   1              miscDelay1ms(50);                                       // Wait 50ms  for panel discharge
  52   1              
  53   1      #if PANEL_OFF_TIMING1 != 0      
  54   1              miscDelay1ms(PANEL_OFF_TIMING1);
C51 COMPILER V7.50   MISC                                                                  03/18/2008 22:29:07 PAGE 2   

  55   1      #endif
  56   1              
  57   1      #if (PANEL_TCON + PANEL_ANALOG_TCON)
  58   1              mstWriteByte(GEN_00_REGBK, REGBANKADC);         // Switch to Bank 1 for TCON control
  59   1              mstWriteByte(BK1_D1_PTC_MODE2, (SET_PTC_MODE2&0xBC));   // Set L/R and U/D to low
  60   1              mstWriteByte(BK1_D0_PTC_MODE1, (SET_PTC_MODE1&0x7F));   // Disable TCON
  61   1      #endif
  62   1              
  63   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);              // Switch to Bank 0 for data output control
  64   1              mstWriteByte(BK0_F4_TRISTATE, 0x1F);                    // Disable data output
  65   1      
  66   1      #if PANEL_OFF_TIMING2 != 0
  67   1              miscDelay1ms(PANEL_OFF_TIMING2);
  68   1      #endif
  69   1      
  70   1      #if PANEL_ANALOG_TCON
  71   1              mstWriteByte(GEN_00_REGBK, REGBANKADC);         // Switch to Bank 1 for TCON control
  72   1              mstWriteByte(BK1_4A, 0x0F);                             // Turn off VGL and VGH
  73   1              mstWriteByte(BK1_4B, 0x4C);
  74   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);              // Switch to Bank 0
  75   1      #endif
  76   1      
  77   1      #if (ENABLE_CCFL_FUNCTION)
  78   1              mstWriteByte(GEN_00_REGBK,REGBANKLVDS_CCFL);    
  79   1              mstWriteByte(BK4_6B, 0x80);     
  80   1              mstWriteByte(BK4_6D, 0x00);     //0x00-->0x02
  81   1              mstWriteByte(BK4_6E, 0x05);
  82   1              mstWriteByte(BK4_6B, 0x00);
  83   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);
  84   1      #else
                      PANEL_VCC_OFF();                                        // Turn off panel VDD
              #endif
  87   1      
  88   1      }
  89          
  90          void miscTurnOnPanel(void)
  91          {
  92   1              PANEL_VCC_ON();                                 // Turn on panel VDD
  93   1      
  94   1      #if PANEL_ANALOG_TCON
  95   1              mstWriteByte(GEN_00_REGBK, REGBANKADC);         // Switch to Bank 1 for TCON control
  96   1              mstWriteByte(BK1_4A, 0x00);                             // Turn on VGL and VGH
  97   1              mstWriteByte(BK1_4B, 0x40);
  98   1              mstWriteByte(BK1_45, 0x00);
  99   1      #endif
 100   1      
 101   1      #if PANEL_ON_TIMING1 != 0
 102   1              miscDelay1ms(PANEL_ON_TIMING1);
 103   1      #endif
 104   1      
 105   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);              // Switch to Bank 0 for data output control
 106   1              mstWriteByte(BK0_F4_TRISTATE, 0x00);                    // Enable data output
 107   1              
 108   1      #if (PANEL_TCON + PANEL_ANALOG_TCON)
 109   1              mstWriteByte(GEN_00_REGBK, REGBANKADC);         // Switch to Bank 1 for TCON control
 110   1              mstWriteByte(BK1_D1_PTC_MODE2, SET_PTC_MODE2);          // Reload PTC_MODE2 value
 111   1              mstWriteByte(BK1_D0_PTC_MODE1, SET_PTC_MODE1);          // Enable TCON
 112   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);              // Switch to Bank 0
 113   1      #endif
 114   1      
 115   1      #if USE_ROTATE_OSD
                      if((Display.ucSystemStauts & ROTATE_STATUS_FLAG) != 0)
C51 COMPILER V7.50   MISC                                                                  03/18/2008 22:29:07 PAGE 3   

                              mstSetDisplayRotate(1);
              #endif  // USE_ROTATE_OSD
 119   1      
 120   1      #if PANEL_ON_TIMING2 != 0
 121   1              miscDelay1ms(PANEL_ON_TIMING2);
 122   1      #endif
 123   1      
 124   1      #if (ENABLE_CCFL_FUNCTION)
 125   1              mstWriteByte(GEN_00_REGBK,REGBANKLVDS_CCFL);    
 126   1              mstWriteByte(BK4_6B, 0x80);     
 127   1              mstWriteByte(BK4_6E, 0x0D);
 128   1              mstWriteByte(BK4_6D, 0x03);     
 129   1              mstWriteByte(BK4_6B, 0x00);
 130   1              mstWriteByte(GEN_00_REGBK, REGBANKSCALER);
 131   1      #else
                      PANEL_BLIGHT_ON();                                      // Turn on backlight
              #endif
 134   1      
 135   1      }
 136          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    313    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      2    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -