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

📄 debug.lst

📁 Maria2 CarTV 20060707 Tony
💻 LST
📖 第 1 页 / 共 5 页
字号:
C51 COMPILER V8.01   DEBUG                                                                 11/28/2006 08:08:03 PAGE 1   


C51 COMPILER V8.01, COMPILATION OF MODULE DEBUG
OBJECT MODULE PLACED IN ..\..\1out\Debug.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\kernal\Debug.c BROWSE INCDIR(..\..\inc;..\..\mslib;..\..\Device;..\..
                    -\kernal;..\..\msFunc;..\..\pc;..\..\tv) DEBUG OBJECTEXTEND PRINT(..\..\1out\Debug.lst) OBJECT(..\..\1out\Debug.obj)

line level    source

   1          /******************************************************************************
   2           Copyright (c) 2003 MStar Semiconductor, Inc.
   3           All rights reserved.
   4          
   5           [Module Name]: Debug.c
   6           [Date]:
   7           [Comment]:
   8             Uart subroutines.
   9           [Reversion History]:
  10          *******************************************************************************/
  11          
  12          #define _DEBUG_C_
  13          
  14          // Common
  15          #include <math.h>
  16          #include "types.h"
  17          #include "global.h"
  18          #include "irFunc.h"
  19          #include "panel.h"
  20          #include "misc.h"
  21          #include "ms_rwreg.h"
  22          #include "Reg52.h"
  23          #include "ms_reg.h"
  24          #include "power.h"
  25          #include "msosd.h"
  26          #include "nvram.h"
  27          #include "i2c.h"
  28          #include "msACE.h"
  29          #include "menu.h"
  30          #include "menufunc.h"
  31          #include "UserPref.h"
  32          #include "tv.h"
  33          #include "devVD.h"
  34          #include "M2_VD_Std_Lib.h"
  35          #include "Maria2_FSC_Lib.h"
  36          #include "Maria2_ACC_Lib.h"
  37          #include "DevTuner.h"
  38          
  39          #if(ENABLE_VD_DSP)
  40          #include "Maria2_dsp_lib.h"
  41          extern BYTE idata g_ucDSP_Ctl;
  42          //#define DSP_MARIA_DEBUG
  43          #ifdef DSP_MARIA_DEBUG
              extern XDATA BYTE g_dspDebugFlag;
              extern XDATA BYTE g_dspDebugInfoIdx;
              extern XDATA BYTE g_dspDebugInfo[64];
              #endif
  48          #endif
  49          
  50          ////////////////////////////////////////////
  51          // Debug FSC lib
  52          extern XDATA WORD g_wFSCBurstMag;
  53          extern XDATA BYTE s_ucFSCBurstOn;
  54          extern XDATA BYTE s_ucFSCBurstOff;
C51 COMPILER V8.01   DEBUG                                                                 11/28/2006 08:08:03 PAGE 2   

  55          extern XDATA BYTE g_ucFSCNoiseMag;
  56          extern XDATA BYTE s_ucFSCNoiseOn;
  57          extern XDATA BYTE s_ucFSCNoiseOff;
  58          extern XDATA BYTE g_ucFSCPhaseErrorAvg;
  59          extern XDATA BYTE s_ucFSCPhaseErrorLevelOn;
  60          extern XDATA BYTE s_ucFSCPhaseErrorLevelOff;
  61          /////////////////////////////////////////////
  62          extern  BYTE OsdFontColor;
  63          
  64          extern BYTE xdata g_ucAgcState;
  65          extern HLdata xdata g_unSyncMagnitude; // average 64 lines Sync magnitude
  66          
  67          // Internal
  68          #include "debug.h"
  69          ///////////////////////////////////////////////////////
  70          // Test command
  71          ///////////////////////////////////////////////////////
  72          #if 0
              void Test_CalClock( BOOL bInterlaceMode )
              {
                  XDATA WORD wInputHPeriod; // horizontal period
                  XDATA WORD wHFreq;
                  XDATA WORD wInputVTotal;
                  XDATA WORD wVFreq;
                  XDATA WORD wOutputHTotal;
                  XDATA WORD wOutputVTotal;
                  XDATA DWORD dwClockFactor; // clock factor
              
                  BYTE ucBank;
              
                  ucBank = msReadByte( BK0_00 );
                  msWriteByte( BK0_00, REG_BANK_SCALER );
              
                  wInputHPeriod = msGetHorizontalPeriod();
                  wHFreq = msCalculateHFreqX10(wInputHPeriod); // Cal H freq
                  wInputVTotal = msGetVerticalTotal();
                  wVFreq = msCalculateVFreqX10( wHFreq, wInputVTotal )*2; // Cal V freq
              
                  printf("\r\nInputHPeriod=%d", wInputHPeriod);
                  printf("\r\nInputVTotal=%d", wInputVTotal);
                  printf("\r\nInputHFreq=%d*10KHz", wHFreq);
                  printf("\r\nInputVFreq=%d*10Hz", wVFreq);
              
                  wOutputHTotal = PANEL_HTOTAL;
                  wOutputVTotal = PANEL_VTOTAL;
                  printf("\r\nClock:OutputHTotal=%d", wOutputHTotal);
                  printf("\r\nClock:OutputVTotal=%d", wOutputVTotal);
              
                  dwClockFactor = ((float)wInputHPeriod*wInputVTotal*524288ul*PANEL_MASTER_PLL_DIVIDER)/
                                  ((float)wOutputHTotal*wOutputVTotal);
                  if( IsSrcUseDigitalPort() || bInterlaceMode )
                      dwClockFactor /= 2;
                  printf("\r\nSET=%x,", (dwClockFactor>>16) );
                  printf("%x", (WORD)dwClockFactor );
              
                  dwClockFactor = ( ((DWORD)wInputVTotal-1) * 1048576ul / (wOutputVTotal-1) + 1 );
                  if( IsSrcUseDigitalPort() || bInterlaceMode )
                      dwClockFactor /= 2;
                  printf("\r\nV ScalingRatio=%x,", (dwClockFactor>>16) );
                  printf("%x", (WORD)dwClockFactor );
              
              //    putstr("\r\n------------------------------------");
C51 COMPILER V8.01   DEBUG                                                                 11/28/2006 08:08:03 PAGE 3   

              //    {
              //        XDATA WORD wImgHeight;
              //        wImgHeight = g_WindowInfo.V_CapSize;
              //        printf("\r\nImgHigh=%d", wImgHeight);
              //
              //        dwClockFactor = ((float)wInputHPeriod*(wImgHeight - 1)*524288ul*PANEL_MASTER_PLL_DIVIDER) /
              //                         ((float)wOutputHTotal * (540 - 1));
              //        if( IsSrcUseDigitalPort() || bInterlaceMode )
              //            dwClockFactor /= 2;
              //        printf("\r\nSET2=%x,", (dwClockFactor>>16) );
              //        printf("%x", (WORD)dwClockFactor );
              //
              //        dwClockFactor = ( ((DWORD)wImgHeight-1) * 1048576ul / (540-1) + 1 );
              //        if( IsSrcUseDigitalPort() || bInterlaceMode )
              //            dwClockFactor /= 2;
              //        printf("\r\nV ScalingRatio2=%x,", (dwClockFactor>>16) );
              //        printf("%x", (WORD)dwClockFactor );
              //    }
              
                  msWriteByte( BK0_00, ucBank );
              }
              #endif
 139          
 140          /*
 141          void PrintModeSetting(void)
 142          {
 143          
 144              printf( "\r\nModeIndex=%d", g_ModeSetting.ModeIndex );
 145              printf( "\r\nHorizontalStart=%d", g_ModeSetting.HorizontalStart );
 146              printf( "\r\nVerticalStart=%d", g_ModeSetting.VerticalStart );
 147              printf( "\r\nHorizontalTotal=%d", g_ModeSetting.HorizontalTotal );
 148              printf( "\r\nPhase=%d", g_ModeSetting.Phase );
 149              printf( "\r\nDefaultHStart=%d", g_ModeSetting.DefaultHStart );
 150              printf( "\r\nAutoSign=%d", g_ModeSetting.AutoSign );
 151              printf( "\r\nModeSettingCS=%d", g_ModeSetting.ModeSettingCS );
 152          }
 153          */
 154          
 155          void ExecTestCommand(void)
 156          {
 157   1          BYTE ucBank = msReadByte(0);
 158   1      
 159   1          switch( g_UartCommand.Buffer[_UART_CMD_INDEX1_] )
 160   1          {
 161   2      #if 0
                      case 1:
                      {
                      #if (DEV_CC_SEL == DEV_CC_ZILOG86129)
                          BYTE acBuf[3];
                          devVBIReadCurrent3( 0x28, acBuf);
                          printf("\r\n[%x,", acBuf[0]);
                          printf("%x,", acBuf[1]);
                          printf("%x]", acBuf[2]);
                      #endif
                      }
                          break;
                      case 2: // Read ADC(SAR0)
                      {
                          BYTE ucADCVal = 0xff;
                          ucADCVal = PKEYADC1;
                          printf( "\r\nADC1=%d", ucADCVal );
                          ucADCVal = 0xff;
C51 COMPILER V8.01   DEBUG                                                                 11/28/2006 08:08:03 PAGE 4   

                          ucADCVal = PKEYADC2;
                          printf( "\r\nADC2=%d", ucADCVal );
                          ucADCVal = 0xff;
                          ucADCVal = PKEYADC3;
                          printf( "\r\nADC3=%d", ucADCVal );
                      }
                          break;
                      case 3: // Test Delay1ms()
                      {
                          BYTE ucTimes = g_UartCommand.Buffer[_UART_CMD_INDEX2_];
                          while(ucTimes--)
                          {
                              i2cSetSCL(_LOW);
                              Delay1ms(1);
                              i2cSetSCL(_HIGH);
                              Delay1ms(1);
                          }
              
              //            ClrPinI2cSCL();
              //            Delay1ms( g_UartCommand.Buffer[_UART_CMD_INDEX2_] );
              //            SetPinI2cSCL();
                      }
                          break;
                      case 4:
                      {
              #ifdef ENABLE_MCU_USE_INTERNAL_CLOCK
                          McuUseInternalClock();
              //            XDATA DWORD dTmp1;
              //            XDATA DWORD dClk;
              //            XDATA WORD wTmp3;
              //            BYTE ucDiv;
              //            BYTE ucEEVal;
              //
              //            ucDiv = g_UartCommand.Buffer[_UART_CMD_INDEX2_];
              //            printf("\r\nDiv=%d", ucDiv );
              //
              //            dClk = 216000000ul/ucDiv;
              //            printf("\r\nClk=%dMHz", dClk/1000000ul );
              //
              //            ucEEVal = 0x80|(((ucDiv-4)/2)<<4);
              //            printf("\r\nEEVal=%x", ucEEVal);
              //
              //            dTmp1 = ((DWORD)UART_BAUD_RATE*(32 * 4)); // 4 clock
              //            wTmp3 = (dClk+(dTmp1/2))/dTmp1;
              //            printf("\r\nnew TIMER1_MODE2_TH1=%d", wTmp3);
              //
              //            msWriteByte( BK0_00, 0x00 );
              //            msWriteByte( BK0_EE, ucEEVal );
              //
              //            ES = 0;
              //            TR1 = 0;
              //            RI = 0;
              //            TI = 0; // clear transfer flag
              //
              //            TH1 = 256 - wTmp3;
              //
              //            TR1 = 1;
              //            ES = 1;
              //
              //            putstr("\r\nMcu clock change!!");
              #endif
                      }
C51 COMPILER V8.01   DEBUG                                                                 11/28/2006 08:08:03 PAGE 5   

⌨️ 快捷键说明

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