timer.lst

来自「非常全的nrf2401设计资料」· LST 代码 · 共 84 行

LST
84
字号
C51 COMPILER V7.50   TIMER                                                                 04/09/2009 10:12:50 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE TIMER
OBJECT MODULE PLACED IN .\build\timer.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\common\timer.c LARGE OMF2 OPTIMIZE(9,SPEED) BROWSE INCDIR(..\common;..\.
                    -.\..\..\comp\protocol\wdp\common\;..\..\..\..\comp\protocol\wdp\host\;..\..\..\..\arch\hal\include;..\..\..\..\arch\hal\
                    -nrf24lu1;..\..\..\..\arch\nrf24lu1;..\common;..\..\..\..\comp\protocol\fap) DEBUG PRINT(.\lst\timer.lst) OBJECT(.\build\
                    -timer.obj)

line level    source

   1          /* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
   2           *
   3           * The information contained herein is confidential property of 
   4           * Nordic Semiconductor. The use, copying, transfer or disclosure of such
   5           * information is prohibited except by express written agreement with 
   6           * Nordic Semiconductor.
   7           */
   8          
   9          /** @file
  10           * Timer for the Wireless Desktop Protocol.
  11           * Sets up Timer2 to call WDP and FAP functions at the correct timing 
  12           * intervals.
  13           */
  14          
  15          #include <Nordic\reg24lu1.h>
  16          #include <stdint.h>
  17          
  18          #include "nordic_common.h"
  19          #include "wdp_common.h"
  20          
  21          volatile uint16_t timer_cnt = 0;
  22          
  23          void t2_init(uint16_t val)
  24          {
  25   1        // Setup Timer2:
  26   1        // 1/12 prescaler, reload Mode 0, Stopped
  27   1        T2CON = BIT_4;
  28   1      
  29   1        T2 = CRC = ~((val * 4) / 3);
  30   1        T2I0 = 1; // Start Timer2
  31   1      }
  32          
  33          static void t2_interrupt(void) interrupt 5
  34          {
  35   1        TF2 = 0;
  36   1      
  37   1        wdp_timer_isr_function();
  38   1        fap_timer_isr_function();
  39   1        
  40   1        if(timer_cnt < 0xffff)
  41   1        {
  42   2          timer_cnt++;
  43   2        }
  44   1      }
  45          
  46          void fap_modify_timer_period(void)
  47          {
  48   1        T2 = ~((FAP_TIMER_MODIFY_PERIOD*4) / 3);
  49   1        TF2 = 0;
  50   1      }
  51          

C51 COMPILER V7.50   TIMER                                                                 04/09/2009 10:12:50 PAGE 2   


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    140    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =      2    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
   EDATA SIZE       =   ----    ----
   HDATA SIZE       =   ----    ----
   XDATA CONST SIZE =   ----    ----
   FAR CONST SIZE   =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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