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

📄 root.lst

📁 dvr
💻 LST
字号:
C51 COMPILER V7.50   ROOT                                                                  12/14/2005 10:05:35 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE ROOT
OBJECT MODULE PLACED IN .\OBJ\root.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE root.c LARGE OPTIMIZE(9,SIZE) BROWSE PRINT(.\LST\root.lst) OBJECT(.\OBJ\roo
                    -t.obj)

line level    source

   1          //==============================================================
   2          // ROOT.C
   3          // Common rom code for back switching.
   4          //==============================================================
   5          
   6          #include "types.h"
   7          
   8          #include <absacc.h>
   9          #include "gio.h"
  10          #include "audio.h"
  11          #include "socket.h"
  12          #include "sio.h"
  13          #ifdef TMP_DEL
              #include "lan.h"
              #include "bfpga.h"
              #endif
  17          
  18          xdata   u16     timeout_counter;                                // Variable used for delay routines
  19          xdata   u8      time_read_flag1 = 0;
  20          xdata   u8      time_read_flag2 = 0;
  21          xdata   u8      time_read_flag3 = 0;
  22          xdata   u8      gv_connection_closing = FALSE;
  23          xdata   u8      gv_int0_flag = LOW;
  24          #ifdef LANIF
  25          xdata   u8      gv_int1_flag = 0;
  26          #endif
  27          xdata   u8      gv_bfpga_move_done = 0;
  28          xdata   u8      gv_bfpga_move_start = 0;
  29          
  30          #ifdef RECORD_STOP_PASSWORD
              xdata   u8      blink_time = 0;
              #endif
  33          
  34          extern void gmain(void);
  35          extern void hdd_pre_write(u8 aud_rec_intr);
  36          
  37          #ifdef ROM128K
              sfr ROMCON = 0xAB;
              #endif
  40          
  41          //==============================================================
  42          //
  43          //==============================================================
  44          void main(void)
  45          {
  46   1      #ifdef ROM128K
                      ROMCON = 0x0E;
              #endif
  49   1              gmain();
  50   1      }
  51          
  52          
  53          //================================================================
  54          //
C51 COMPILER V7.50   ROOT                                                                  12/14/2005 10:05:35 PAGE 2   

  55          //================================================================
  56          timer0() interrupt 1 using 1
  57          {
  58   1              //if(gv_int0_flag == LOW) // 2002.11.02
  59   1              {
  60   2                      timeout_counter++;
  61   2                      if(timeout_counter > 49)    // 1SEC TIMER : 40Mhz
  62   2                      {
  63   3                              time_read_flag2 = 1;
  64   3                              timeout_counter = 0;
  65   3                      }
  66   2                      else if((timeout_counter % 5) == 0)   // 100msec
  67   2                      {
  68   3                              time_read_flag1 = 1;
  69   3      #ifdef RECORD_STOP_PASSWORD
                                      if(blink_time)
                                             blink_time--;
              #endif
  73   3                      }
  74   2                      else if((timeout_counter % 2) == 0)     // 40msec
  75   2                              time_read_flag3 = 1;
  76   2      #ifdef DISPLAY_IP_ADDRESS
                              if(r_timeout != 0)
                                      r_timeout++;
                              if(t_timeout != 0)
                                      t_timeout++;
              #endif
  82   2      
  83   2                      TH0 = TIMER0_50_HI;
  84   2                      TL0 = TIMER0_50_LOW;
  85   2      
  86   2              }
  87   1      }
  88          
  89          //================================================================
  90          //
  91          //================================================================
  92          idata u8 int0_gpio_g1;
  93          idata u8 int0_gpio_lan;
  94          idata u8 int0_gpio_aud;
  95          idata u8 int0_flag = 0;
  96          
  97          void int0(void) interrupt 0
  98          {
  99   1      
 100   1              EX0 = 0;        // In external interrupt-0 service routine
 101   1      
 102   1              if(gv_connection_closing){
 103   2      
 104   2                      // save current GPIO port
 105   2                      int0_gpio_g1 = SEL_GENESIS;
 106   2                      int0_gpio_lan = SEL_LAN;
 107   2                      if(gv_audif) int0_gpio_aud = SEL_AUDIO;
 108   2      
 109   2                      gv_audio_reg_play = audioif_get_regPLAY();
 110   2                      if(gv_audio_reg_play&0x02)// interrupt happen just when recording mode
 111   2                      {
 112   3                              audioif_clear_internal_flag(0x00);
 113   3                              audioif_clear_interrupt();
 114   3                              _audioif_clear_IDE_request();
 115   3                              int0_flag = 1;
 116   3                      }
C51 COMPILER V7.50   ROOT                                                                  12/14/2005 10:05:35 PAGE 3   

 117   2      
 118   2                      // restore gpio selection
 119   2                      SEL_GENESIS = int0_gpio_g1;
 120   2                      SEL_LAN = int0_gpio_lan;
 121   2                      if(gv_audif) SEL_AUDIO = int0_gpio_aud;
 122   2      
 123   2              }
 124   1      
 125   1              if(int0_flag==0)
 126   1              {
 127   2                      gv_int0_flag = HIGH;
 128   2              }
 129   1              else
 130   1              {
 131   2                      EX0 = 1; // In external interrupt-0 service routine -- audio int0 service done.
 132   2              }
 133   1      
 134   1      
 135   1      }
 136          
 137          
 138          
 139          //====================================================================
 140          // Interrupt service routine for external interrupt 1
 141          // External interrupt 1 is from FPGA and W3100A.
 142          // We will save current GPIO value for chip select (GENESIS,OSD,W3100A+FPGA)
 143          // and set the GPIO to access W3100A and FPGA.
 144          // After finishing interrupt service routine, restore the GPIO value.
 145          //====================================================================
 146          idata u8 int1_status;
 147          idata int1_gpio_g1;
 148          idata int1_gpio_lan;
 149          idata int1_gpio_aud;            // bdata bit
 150          
 151          void int1(void) interrupt 2//   using 3// External Interrupt number 1
 152          {
 153   1      
 154   1      
 155   1      #ifdef DEBUG_GPIO
                      P11_INT1 = HIGH;
              #endif
 158   1              //==============================================================
 159   1              // disable interrupt
 160   1              EX1 = 0;
 161   1              
 162   1              // save current GPIO port
 163   1      
 164   1              int1_gpio_g1 = SEL_GENESIS;
 165   1              int1_gpio_lan = SEL_LAN;
 166   1              if(gv_audif) int1_gpio_aud = SEL_AUDIO;
 167   1      
 168   1      
 169   1              //##################################################################### 
 170   1          #ifdef TMP_DEL
                      lan_enable();
              
                      // save idm address value
                      idm_save();
              
                      // check interrupt source
                      int1_status = BFREG_STATUS;
              
C51 COMPILER V7.50   ROOT                                                                  12/14/2005 10:05:35 PAGE 4   

                      if (int1_status & TXINT) {
              
                              //BFREG_STATUS = status | TXINT;                                                // Clear interrupt(TXINT)
                              BFREG_STATUS = TXINT;                                           // Clear interrupt(TXINT)
                              gv_bfpga_move_done = 1;
                              gv_bfpga_move_start = 0;
                      }
              
                      if (int1_status & WNINT) {
              #ifdef DEBUG_GPIO
                              P15_INTWZ = HIGH;
              #endif
                              SOCK_ISR_W3100A(&gv_lan_interrupt_flag);        // check W3100A interrupt
              #ifdef DEBUG_GPIO
                              P15_INTWZ = LOW;
              #endif
                      }
              
                      lan_enable();
                      // restore idm address value
              
                      idm_restore();
                  #endif
 202   1              gv_int1_flag = HIGH;
 203   1      
 204   1              //#####################################################################
 205   1              // restore GPIO port
 206   1              
 207   1              SEL_GENESIS = int1_gpio_g1;
 208   1              SEL_LAN = int1_gpio_lan;
 209   1              if(gv_audif) SEL_AUDIO = int1_gpio_aud;
 210   1      
 211   1              // enable interrupt
 212   1              EX1 = 1;
 213   1      #ifdef DEBUG_GPIO
                      P11_INT1 = LOW;
              #endif
 216   1      }
 217          
 218          
 219          //====================================================================
 220          //
 221          //====================================================================
 222          //extern void osd_showhexdword(u32 bData, u8 bXPos, u8 bYPos, u8 bType);
 223          static void sio_isr (void) interrupt 4 using 2
 224          {
 225   1              if(RI != 0) // If receive a byte,
 226   1              {
 227   2                      RI = 0;
 228   2                      if(((r_in + 1)%RBUF_SIZE) != r_out)     // If rx buffer is not full
 229   2                      {
 230   3                              rbuf[r_in] = SBUF;
 231   3                              if((r_in+1)==RBUF_SIZE)
 232   3                                      r_in = 0;
 233   3                              else
 234   3                                      r_in++;
 235   3                      }
 236   2              }
 237   1      
 238   1              if(TI != 0) // Tx interrupt happnes
 239   1              {
 240   2                      if(t_in != t_out) // If tx buffer is not empty
C51 COMPILER V7.50   ROOT                                                                  12/14/2005 10:05:35 PAGE 5   

 241   2                      {
 242   3                              SBUF = tbuf[t_out];
 243   3                              if((t_out+1)==TBUF_SIZE)
 244   3                                      t_out = 0;
 245   3                              else 
 246   3                                      t_out++;
 247   3      #ifdef RS232_TO_PC_TRANSFER
              //                      num00++;
              #endif
 250   3                      }
 251   2                      //else//20051103 remove by paul
 252   2                      //      t_disable = 1;
 253   2                      TI = 0;
 254   2              }
 255   1      }
 256          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    554    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =     10    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =     11    ----
   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 + -