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

📄 rdio.lst

📁 MF RC500的一个设计的源代码
💻 LST
字号:
C51 COMPILER V7.50   RDIO                                                                  04/18/2006 12:04:30 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE RDIO
OBJECT MODULE PLACED IN RDIO.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE RDIO.C LARGE WARNINGLEVEL(0) BROWSE INCDIR(D:\UsefulDocument\Mifare\MF RC50
                    -0\MFRC500 Demo Reader\RC500\For Test) DEBUG OBJECTEXTEND

line level    source

   1          ///////////////////////////////////////////////////////////////////////////////
   2          //    Copyright (c), Philips Semiconductors Gratkorn
   3          //
   4          //                  (C)PHILIPS Electronics N.V.2000
   5          //       All rights are reserved. Reproduction in whole or in part is 
   6          //      prohibited without the written consent of the copyright owner.
   7          //  Philips reserves the right to make changes without notice at any time.
   8          // Philips makes no warranty, expressed, implied or statutory, including but
   9          // not limited to any implied warranty of merchantibility or fitness for any
  10          //particular purpose, or that the use will not infringe any third party patent,
  11          // copyright or trademark. Philips must not be liable for any loss or damage
  12          //                          arising from its use.
  13          ///////////////////////////////////////////////////////////////////////////////
  14          #include <rdio.h>
  15          #include <main.h>
  16          #include <p89c51rx.h>
  17          
  18          ///////////////////////////////////////////////////////////////////////////////
  19          //                 Module Definitions
  20          ///////////////////////////////////////////////////////////////////////////////
  21          #define GetRegPage(adr) (0x80 | (adr>>3))
  22          
  23          unsigned char xdata ini _at_ 0x7f00;    // move base address to 0x7f00
  24          unsigned char xdata *GpBase = &ini;   // redirect pointer to base address
  25          
  26          ///////////////////////////////////////////////////////////////////////////////
  27          //                 Open Reader Communication
  28          ///////////////////////////////////////////////////////////////////////////////
  29          char OpenIO(void)
  30          {
  31   1         GpBase = &ini;
  32   1         P2_7 = 0;    // Enable the CS for RC500
  33   1         return 0x00;
  34   1      }
  35          
  36          ///////////////////////////////////////////////////////////////////////////////
  37          //                 Close Reader Communication
  38          ///////////////////////////////////////////////////////////////////////////////
  39          void CloseIO(void)
  40          {
  41   1         GpBase = 0xff00;
  42   1         P2_7 = 1;    // disable the CS for RC500
  43   1      }
  44          
  45          ///////////////////////////////////////////////////////////////////////////////
  46          //          G E N E R I C    W R I T E
  47          ///////////////////////////////////////////////////////////////////////////////
  48          void WriteIO(unsigned char Address, unsigned char value)
  49          {
  50   1         WriteRawIO(Address,value);                 // write value at the specified 
  51   1                                                    // address
  52   1      }
  53          
  54          ///////////////////////////////////////////////////////////////////////////////
C51 COMPILER V7.50   RDIO                                                                  04/18/2006 12:04:30 PAGE 2   

  55          //          G E N E R I C    R E A D
  56          ///////////////////////////////////////////////////////////////////////////////
  57          unsigned char ReadIO(unsigned char Address)
  58          {
  59   1         static unsigned char c;
  60   1         c = ReadRawIO(Address);                    // read value at the specified 
  61   1                                                 // address
  62   1         return c;
  63   1      }  
  64          
  65          #ifndef SEC_NO_MICORE
  66          ///////////////////////////////////////////////////////////////////////////////
  67          //     W R I T E   S E V E R A L   M E M O R Y   L O C A T I O N S 
  68          ///////////////////////////////////////////////////////////////////////////////
  69          void WriteIOBlock(unsigned char *Addr_Data, unsigned short len)
  70          {
  71   1         static unsigned short cnt;
  72   1      
  73   1         for (cnt = 0; cnt < len; cnt++)
  74   1         {
  75   2              // write value at the specified address
  76   2             WriteRawIO(Addr_Data[cnt*2],Addr_Data[cnt * 2 + 1]); 
  77   2         }
  78   1      }
  79          
  80          ///////////////////////////////////////////////////////////////////////////////
  81          //     R E A D   S E V E R A L   M E M O R Y   L O C A T I O N S 
  82          ///////////////////////////////////////////////////////////////////////////////
  83          void ReadIOBlock(unsigned char* Addr_Data, unsigned short len)
  84          {
  85   1         static unsigned short cnt;
  86   1      
  87   1         for (cnt = 0; cnt < len; cnt)
  88   1         {
  89   2             Addr_Data[cnt*2 + 1] = ReadRawIO(Addr_Data[cnt*2]);// read value at the 
  90   2                                                            // specified address
  91   2         }
  92   1      }  
  93          #endif


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