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

📄 monitor.lst

📁 显示屏驱动源代码
💻 LST
📖 第 1 页 / 共 4 页
字号:
 850   3                              DisplayLogo();
 851   3                      }
 852   2                      else if( !stricmp( argv[1], "input" ) ) {
 853   3                              DisplayInput();
 854   3                      }
 855   2                      else if( !stricmp( argv[1], "off" ) ) {
 856   3                              ShowOSDWindowAll(OFF);
 857   3                      }
 858   2              }
 859   1              
 860   1              //---------------- serial tx test with some number -----------------------------------
C51 COMPILER V7.06   MONITOR                                                               02/21/2008 14:00:27 PAGE 15  

 861   1              else if( !stricmp( argv[0], "TX" ) ) {
 862   2                      MonTxDump();
 863   2              }
 864   1              //---------------- OSD FONTtest for parallel -----------------------------------
 865   1              else if( !stricmp( argv[0], "FONT" ) ) {
 866   2                      if ( !stricmp( argv[1], "RAM" ) ) {
 867   3                              DisplayRAMFont( Asc2Bin(argv[2]) );
 868   3                      }
 869   2                      else if ( !stricmp( argv[1], "ROM" ) ) {
 870   3                              DisplayROMFont(Asc2Bin(argv[2]));
 871   3                      }
 872   2                      else {
 873   3                              Puts("\r\n Font ROM # or Font RAM # for testing");
 874   3                      }
 875   2              }
 876   1      #ifdef INTERNAL_MCU
                      //---------------- interrrupt control for MCU -----------------------------------
                      else if( !stricmp( argv[0], "IRQ" ) ) {
                              if ( !stricmp( argv[1], "TW" ) ) {
                                      if ( Asc2Bin(argv[2]) == 1 )
                                              EIE |= 0x02;    // set interrupt Enable
                                      else
                                              EIE &= 0xFD;    // set interrupt Disable
                              }
                              else if ( !stricmp( argv[1], "PDN" ) ) {
                                      if ( Asc2Bin(argv[2]) == 1 )
                                              EIE |= 0x08;    // set interrupt Enable
                                      else
                                              EIE &= 0xF7;    // set interrupt Disable
                              }
                              else {
                                      Printf("\r\n EIE register value: %2x", (WORD)EIE);
                              }
                      }
                      //---------------- I2c port test for MCU -----------------------------------
                      else if( !stricmp( argv[0], "I2C" ) ) {
                              if ( !stricmp( argv[1], "SCL" ) ) {
                                      if ( Asc2Bin(argv[2]) == 1 )
                                              I2C_SCL = 1;    
                                      else
                                              I2C_SCL = 0;    
                              }
                              else if ( !stricmp( argv[1], "SDA" ) ) {
                                      if ( Asc2Bin(argv[2]) == 1 )
                                              I2C_SDA = 1;    
                                      else
                                              I2C_SDA = 0;    
                              }
                              else {
                                      Printf("\r\n SCL:%1d, SDA:%1d", (WORD)I2C_SCL, (WORD)I2C_SDA);
                              }
                      }
                      //---------------- LED port test for MCU -----------------------------------
                      else if( !stricmp( argv[0], "LED" ) ) {
                              #define GREEN_LED       P1_7
                              #define RED_LED         P1_6
                              if ( argc == 3 ) {
                                      if ( !stricmp( argv[1], "RED" ) ) {
                                              if ( Asc2Bin(argv[2]) == 1 )
                                                      RED_LED = 1;    
                                              else
                                                      RED_LED = 0;    
C51 COMPILER V7.06   MONITOR                                                               02/21/2008 14:00:27 PAGE 16  

                                      }
                                      else if ( !stricmp( argv[1], "GREEN" ) ) {
                                              if ( Asc2Bin(argv[2]) == 1 )
                                                      GREEN_LED = 1;  
                                              else
                                                      GREEN_LED = 0;  
                                      }
                              }
                              else {
                                      Printf("\r\n RED:%1d, GREEN:%1d", (WORD)RED_LED, (WORD)GREEN_LED);
                              }
                      }
                      //---------------- LED port test for MCU -----------------------------------
                      else if( !stricmp( argv[0], "REMOTE" ) ) {
                              if ( argc == 2 ) {
                                      if ( Asc2Bin(argv[1]) == 1 )
                                              P3_2 = 1;       
                                      else
                                              P3_2 = 0;       
                              }
                              else {
                                      Printf("\r\n IR:%1d", (WORD)P3_2);
                              }
                      }
                      //---------------- Access direct memory space -----------------------------------
                      else if( !stricmp( argv[0], "MEMR" ) ) {
                              BYTE    xdata * xDataPtr;
              
                              if ( argc == 2 ) {
                                      xDataPtr = Asc2Bin(argv[1]);
                                      Printf("\r\n %04x:%02x", (WORD)xDataPtr, (WORD)*xDataPtr);
                              }
                      }
                      
                      //---------------- Access direct memory space -----------------------------------
                      else if( !stricmp( argv[0], "MEMW" ) ) {
                              WORD    val;
                              BYTE    xdata * xDataPtr;
              
                              if ( argc == 3 ) {
                                      val = Asc2Bin(argv[2]);
                                      xDataPtr = Asc2Bin(argv[1]);
                                      *xDataPtr = val;
                              }
                      }
                      
                      //---------------- Access direct register space -----------------------------------
                      else if( !stricmp( argv[0], "REGR" ) ) {
                              BYTE    xdata * xDataPtr;
              
                              if ( argc == 2 ) {
                                      xDataPtr = Asc2Bin(argv[1]) + 0xc000;
                                      Printf("\r\n %04x:%02x", (WORD)xDataPtr, (WORD)*xDataPtr);
                              }
                      }
                      
                      //---------------- Access direct register space -----------------------------------
                      else if( !stricmp( argv[0], "REGW" ) ) {
                              WORD    val;
                              BYTE    xdata * xDataPtr;
              
                              if ( argc == 3 ) {
C51 COMPILER V7.06   MONITOR                                                               02/21/2008 14:00:27 PAGE 17  

                                      val = Asc2Bin(argv[2]);
                                      xDataPtr = Asc2Bin(argv[1]) + 0xc000;
                                      *xDataPtr = val;
                              }
                      }
                      
                      //---------------- Direct entering STOP mode -----------------------------------
                      else if( !stricmp( argv[0], "STOP" ) ) {
                              PowerDown();    // enter stop mode
                      }
                      
                      //---------------- Timer divider for MCU CORE -----------------------------------
                      else if( !stricmp( argv[0], "TIMER0" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
                                      val = T0HIGH;
                                      val <<= 8;
                                      val |= T0LOW;
                                      Printf( "\r\n divide number for Timer 0: %4x ", val );
                              }
                              else {
                                      val = (WORD)a2i(argv[1]);
                                      T0LOW = val;
                                      T0HIGH = (val >> 8);
                              }                       
                      }
                      
                      //---------------- Timer divider for MCU CORE -----------------------------------
                      else if( !stricmp( argv[0], "TIMER1" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
                                      val = T1HIGH;
                                      val <<= 8;
                                      val |= T1LOW;
                                      Printf( "\r\n divide number for Timer 1: %4x ", val );
                              }
                              else {
                                      val = (WORD)a2i(argv[1]);
                                      T1LOW = val;
                                      T1HIGH = (val >> 8);
                              }                       
                      }
                      
                      //---------------- Timer divider for MCU CORE -----------------------------------
                      else if( !stricmp( argv[0], "TIMER2" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
                                      val = T2HIGH;
                                      val <<= 8;
                                      val |= T2LOW;
                                      Printf( "\r\n divide number for Timer 2: %4x ", val );
                              }
                              else {
                                      val = (WORD)a2i(argv[1]);
                                      T2LOW = val;
                                      T2HIGH = (val >> 8);
                              }                       
                      }
                      //---------------- SPI flash control -----------------------------------
                      else if( !stricmp( argv[0], "SPI" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
C51 COMPILER V7.06   MONITOR                                                               02/21/2008 14:00:27 PAGE 18  

                                      val = SPICONTROL;
                                      Printf( "\r\n SPI control Register: %2x", val );
                              }
                              else {
                                      val = Asc2Bin(argv[1]);
                                      SPICONTROL = val;
                              }                       
                      }
                      //---------------- SPI flash control -----------------------------------
                      else if( !stricmp( argv[0], "PORT" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
                                      val = P2;
                                      Printf( "\r\n MCU PORT(2) value: %2x", val );
                              }
                              else {
                                      val = Asc2Bin(argv[1]);
                                      P2 = val;
                              }                       
                      }
                      //---------------- BANK control -----------------------------------
                      else if( !stricmp( argv[0], "BANK" ) ) {
                              WORD    val;
                              if ( argc == 1 ) {
                                      val = BANKREG;
                                      Printf( "\r\n BANK(0x9a) value: %2x", val );
                              }
                              else {
                                      val = Asc2Bin(argv[1]);
                                      BANKREG = val;
                              }                       
                      }
              #endif //INTERNAL_MCU
1080   1              
1081   1              //---------------- Delta RGB Panel Test -------------------------
1082   1              #ifdef SUPPORT_DELTA_RGB
1083   1      
1084   1              else if( !stricmp( argv[0], "delta" ) ) {
1085   2                      if( argc==1 )   DeltaRGBPanelInit();
1086   2                      else {
1087   3                              
1088   3                              if( !stricmp( argv[1], "w" ) ) {
1089   4      
1090   4                                      WORD val;
1091   4                                      val= Asc2Bin(argv[3])<<8 | Asc2Bin(argv[4]);
1092   4                                      Printf("\r\n SPI Write: Addr:%2x  Data:%4x", (WORD)Asc2Bin(argv[2]), val);
1093   4                                      WriteSPI(Asc2Bin(argv[2]), val );
1094   4                              }
1095   3                              else if( !stricmp( argv[1], "r" ) ) {
1096   4                                      WORD val;
1097   4                                      val = ReadSPI(Asc2Bin(argv[2]));
1098   4                                      Printf("\r\n SPI Read: Addr:%2x  Data:%4x", (WORD)Asc2Bin(argv[2]), val);
1099   4                              }
1100   3                      }
1101   2              }
1102   1              #endif
1103   1              //----------------------------------------------------
1104   1              else {
1105   2                      Printf("\r\nInvalid command...");
1106   2              }
1107   1      
1108   1      
C51 COMPILER V7.06   MONITOR                                                               02/21/2008 14:00:27 PAGE 19  

1109   1              Prompt();
1110   1      
1111   1      
1112   1      }
1113          
1114          
1115          //-------------------------------------------------------------------------
1116          
1117          
1118          #endif


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   3443    ----
   CONSTANT SIZE    =   1341    ----
   XDATA SIZE       =     30    ----
   PDATA SIZE       =     28      41
   DATA SIZE        =      1    ----
   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 + -