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

📄 timer_drv.lst

📁 atmel at89c51snd1c mp3芯片方案源码
💻 LST
字号:
C51 COMPILER V7.50   TIMER_DRV                                                             02/16/2009 09:59:53 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE TIMER_DRV
OBJECT MODULE PLACED IN timer_drv.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE lib_mcu\timer\timer_drv.c LARGE BROWSE DEBUG OBJECTEXTEND PRINT(.\timer_drv
                    -.lst) OBJECT(timer_drv.obj)

line level    source

   1          
   2          #include "config.h"                         /* lib configuration header */
   3          #include "timer_drv.h"                      /* timer driver definition */
   4          #include "lib_mcu\kbd\key_drv.h" 
   5          #include "modules\display\disp_task.h"              /* display task definition */
   6          #include "lib_mcu\remote\remote_drv.h"
   7          
   8          
   9          
  10          INT8U   key_times = 0;
  11          
  12          extern  bit  led_flush;
  13          extern  Byte    key_int;
  14          
  15          extern  bdata   bit     disp_clock_on;      /* set to TRUE to start clock */
  16          extern  data    Byte    disp_sec_cpt;       /* second counter */
  17          extern  data    Byte    disp_min_cpt;       /* minute counter */
  18          extern  data    Byte    gl_cpt_tick;        /* general tick counter */
  19          /*F***************************************************************************
  20          * NAME: t0_set_prio
  21          *-----------------------------------------------------------------------------
  22          * PARAMS:
  23          *
  24          * return:
  25          *----------------------------------------------------------------------------
  26          * PURPOSE: 
  27          *   Set the Timer 0 priority interrupt
  28          *----------------------------------------------------------------------------
  29          * EXAMPLE:
  30          *----------------------------------------------------------------------------
  31          * NOTE:
  32          *----------------------------------------------------------------------------
  33          * REQUIREMENTS:
  34          ******************************************************************************/
  35          void t0_set_prio (Byte priority)
  36          {
  37   1        if ((priority == 1) || (priority == 3))     /* set LSB priority bit */
  38   1        {
  39   2          IPL0 |=  MSK_ET0;
  40   2        }
  41   1        if ((priority == 2) || (priority == 3))     /* set MSB priority bit */
  42   1        {
  43   2          IPH0 |= MSK_ET0;
  44   2        }
  45   1      }
  46          
  47          
  48          /*F***************************************************************************
  49          * NAME: t1_set_prio
  50          *-----------------------------------------------------------------------------
  51          * PARAMS:
  52          *
  53          * return:
  54          *----------------------------------------------------------------------------
C51 COMPILER V7.50   TIMER_DRV                                                             02/16/2009 09:59:53 PAGE 2   

  55          * PURPOSE: 
  56          *   Set the Timer 1 priority interrupt
  57          *----------------------------------------------------------------------------
  58          * EXAMPLE:
  59          *----------------------------------------------------------------------------
  60          * NOTE:
  61          *----------------------------------------------------------------------------
  62          * REQUIREMENTS:
  63          ******************************************************************************/
  64          void t1_set_prio (Byte priority)
  65          {
  66   1        if ((priority == 1) || (priority == 3))     /* set LSB priority bit */
  67   1        {
  68   2          IPL0 |=  MSK_ET1;
  69   2        }
  70   1        if ((priority == 2) || (priority == 3))     /* set MSB priority bit */
  71   1        {
  72   2          IPH0 |= MSK_ET1;
  73   2        }
  74   1      }
  75          
  76          
  77          ////////////////////////////////////////////////////////////////////////////////////////
  78          void t0_init(void)
  79          {
  80   1        T0_init(0,0,1);      //T0 Mode set
  81   1        T0_enable_int();     //T0 int enable
  82   1        T0_set_low(0x01);
  83   1        T0_set_high(0x00);
  84   1        T0_start();
  85   1      }
  86          
  87          ////////////////////////////////////////////////////////////////////////////////////////
  88          Interrupt(t0_int (void), IRQ_T0)
  89          { 
  90   1        T0_disable_int();
  91   1        T0_set_low(TIM_LOW);
  92   1        T0_set_high(TIM_HIGH);
  93   1        
  94   1        key_times ++;
  95   1        gl_cpt_tick ++;
  96   1      
  97   1        if (70 == key_times)   //conside as 1 second
  98   1        {  
  99   2           remote_enable();
 100   2           key_times = 0;
 101   2           led_flush = 1;
 102   2           key_int = KBSTA;
 103   2           //T0_stop();
 104   2           // Kbd_enable_int();
 105   2        }
 106   1      
 107   1        T0_enable_int();
 108   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    164    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =      1    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
C51 COMPILER V7.50   TIMER_DRV                                                             02/16/2009 09:59:53 PAGE 3   

   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 + -