亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? m500auc.lst

?? MRF500源碼,讀寫射頻卡!快點下!!絕對精彩
?? LST
?? 第 1 頁 / 共 5 頁
字號:
C51 COMPILER V8.05a   M500AUC                                                              03/18/2008 10:38:22 PAGE 1   


C51 COMPILER V8.05a, COMPILATION OF MODULE M500AUC
OBJECT MODULE PLACED IN M500AuC.OBJ
COMPILER INVOKED BY: d:\Keil2\C51\BIN\C51.EXE M500AuC.c LARGE WARNINGLEVEL(0) BROWSE INCDIR(D:\UsefulDocument\Mifare\MF 
                    -RC500\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          #define DLL_EXPORT      // library source module definition
  15          #include <p89c51rx.h>
  16          #include <Mfreg500.h>
  17          #include <M500A.h>
  18          #include <RdIo.h>
  19          
  20          #include <string.h>
  21          #include <stdio.h>
  22          #include <main.h>
  23          
  24          ////////////////////////////////////////////////////////////////////////////////
  25          //                M O D U L E   D E F I N I T I O N
  26          ////////////////////////////////////////////////////////////////////////////////
  27          // COMMENT: This library module is modified from the original source code for a
  28          //          microcontroller C164 CI, to suit the general purpose 8051 mcu.
  29          //          The source can be ported to other platforms very easily. 
  30          //          The communication channel to the RC500 reader IC is assumed to be 
  31          //          unknown. All data is written with the generic IO functions 
  32          //          of the module ReaderIO.h. In our case the reader module is 
  33          //          connected via memory mapped io at base address 0x7f00.
  34          //          The interrupt pin of the reader IC is assumed to be connected to 
  35          //          the fast external interrupt pin INT0# (active low) and the reset
  36          //          pin of the reader IC should be connected to a dedicated port pin
  37          //          (Port3: Pin: 3).
  38          //          In this configuration, a reset of the reader module is independend
  39          //          from the reset of the microcontroller.
  40          //          In order to generate communication timeouts, 
  41          //          general purpose timer 2 of the microcontroller is used. This 
  42          //          timer need not to be initialised in advance. Before every usage 
  43          //          the timer is completely initialised in each function. 
  44          //          Non of the timers is essential for the functionality of the reader
  45          //          module, but are helpful furing software development. All protocoll 
  46          //          relevant timing constraints are generated
  47          //          by the internal timer of the reader module.
  48          //
  49          //          Some explanations to the programming method of this library.
  50          //          There are three kind of functions coded in this module.
  51          //            a) internal functions, which have no prototypes in a header
  52          //               file and are not intended to be used outside of this file
  53          //            b) commands, which are intended for the reader module itself
  54          //            c) commands, which are intended for any tag in the rf field.
C51 COMPILER V8.05a   M500AUC                                                              03/18/2008 10:38:22 PAGE 2   

  55          //               These commands are send to the reader and the reader module
  56          //               transmitts the data to the rf interface.
  57          //          Commands for the reader and for the tag have the appropriate 
  58          //          prefix (PCD for proximity coupled device or reader module
  59          //                  PICC for proximity integrated circuit card or tag)
  60          //          and their protypes are defined in the header file.
  61          //          Each command for a PICC consists of a PCD command. Therefore
  62          //          the function M500PcdCmd is very important for the understanding
  63          //          of the communication.
  64          //
  65          //          The basic functionality is provided by the interrupt service
  66          //          routine (ISR), which closely works together with the function
  67          //          M500PcdCmd. All kinds of interrupts are serviced by the 
  68          //          same ISR. 
  69          
  70          
  71          // inline structure in order to reset the communication channel between 
  72          // function and ISR
  73          #define ResetInfo(info)    \
  74                      info.cmd            = 0; \
  75                      info.status         = MI_OK;\
  76                      info.irqSource      = 0;   \
  77                      info.nBytesSent     = 0;   \
  78                      info.nBytesToSend   = 0;  \
  79                      info.nBytesReceived = 0;  \
  80                      info.nBitsReceived  = 0;   \
  81                      info.collPos        = 0;
  82          
  83          // struct definition for a communication channel between function and ISR
  84          typedef struct 
  85                   {
  86                      unsigned char  cmd;           //!< command code 
  87                      char           status;        // communication status
  88                      unsigned char  nBytesSent;    // how many bytes already sent
  89                      unsigned char  nBytesToSend;  // how many bytes to send
  90                      unsigned char  nBytesReceived;// how many bytes received
  91                      unsigned short nBitsReceived; // how many bits received
  92                      unsigned char  irqSource;     // which interrupts have occured
  93                      unsigned char  collPos;       // at which position occured a
  94                                                    // collision
  95                   } MfCmdInfo;
  96          
  97          // modul variables 
  98          extern   unsigned char xdata *GpBase;
  99          
 100          static   unsigned char idata MFIFOLength = DEF_FIFO_LENGTH; // actual FIFO length
 101          
 102          static   unsigned char xdata MKeys[16][12]; // storage for authentication keys
 103                                                // in order to provide a calling 
 104                                                // compatible interface to old libraries
 105                                       // Other reader modules keep several sets
 106                                       // of keys in an E2PROM. In this case,
 107                                       // these keys are stored in the uC and
 108                                       // transfered to the reader module 
 109                                       // before authentication
 110          
 111          // Infomation concerning data processing
 112                   // send buffer for general use
 113          static   volatile unsigned char xdata MSndBuffer[SND_BUF_LEN];
 114                   // receive buffer for general use
 115          static   volatile unsigned char xdata MRcvBuffer[RCV_BUF_LEN];
 116                   // info struct for general use
C51 COMPILER V8.05a   M500AUC                                                              03/18/2008 10:38:22 PAGE 3   

 117          static   volatile MfCmdInfo     MInfo;                  
 118          
 119          // Interrupt service routine
 120          // Variable in order to exchange data between function and ISR
 121          static   volatile MfCmdInfo     *MpIsrInfo = 0; 
 122                  // ISR send buffer
 123          static   volatile unsigned char *MpIsrOut  = 0; 
 124                   // ISR receive buffer
 125          static   volatile unsigned char *MpIsrIn   = 0;     
 126          
 127          // storage of the last selected serial number including check byte.
 128          //For multi level serial numbers, only the first 4 bytes are stored.
 129          unsigned char MLastSelectedSnr[5];
 130          
 131          // Timer 2
 132          bit             T2IR            = 0;    // Timer2 timeout flag
 133          unsigned int    CountDown       = 0;    // Timeout counter with 50us resolution
 134          
 135          sbit    RC500RST                = P2^1;
 136          sbit    LED                     = P3^4;
 137          
 138          ///////////////////////////////////////////////////////////////////////////////
 139          //             Prototypes for local functions 
 140          ///////////////////////////////////////////////////////////////////////////////
 141          
 142          void start_timeout(unsigned int _50us);
 143          void stop_timeout(void);
 144          
 145          // _____________________________________________________________________________
 146          //
 147          //  FUNCTION: M500PcdSetTmo
 148          //        IN: tmoLength   1  ... 1.0 ms timeout periode
 149          //                        2  ... 1.5 ms timeout periode
 150          //                        3  ... 6.0 ms timeout periode
 151          //                        4  ... 9.6 ms timeout period
 152          //                        5  ... 38.5 ms timeout period
 153          //                        6  ... 154 ms timeout period
 154          //                        7  ... 616.2 ms timeout period
 155          //       OUT: -
 156          //    RETURN: 
 157          //   COMMENT: Set timeout length of the reader internal timer.
 158          //               
 159          void M500PcdSetTmo(unsigned char tmoLength);
 160          
 161          // _____________________________________________________________________________
 162          //
 163          //  FUNCTION: M500PcdCmd
 164          //        IN: cmd  PCD_IDLE
 165          //                   PCD_WRITEE2
 166          //                   PCD_READE2
 167          //                   PCD_LOADCONFIG
 168          //                   PCD_LOADKEYE2
 169          //                   PCD_AUTHENT1
 170          //                   PCD_CALCCRC
 171          //                   PCD_AUTHENT2
 172          //                   PCD_RECEIVE
 173          //                   PCD_LOADKEY
 174          //                   PCD_TRANSMIT
 175          //                   PCD_TRANSCEIVE
 176          //                   PCD_RESETPHASE
 177          //                   for a detailed description of the parameter values, please
 178          //                   have a look on the header file of the reader register
C51 COMPILER V8.05a   M500AUC                                                              03/18/2008 10:38:22 PAGE 4   

 179          //                   definitions.
 180          //            send      byte stream of variable length, which should be send to
 181          //                      the PICC, the length of stream has to be specified
 182          //                      in the info - structure
 183          //       OUT: rcv    byte stream of variable length, which was received 
 184          //                      from the PICC or PCD
 185          //            info      communication and status structure
 186          //    RETURN: 
 187          //   COMMENT: This function provides the central interface to the reader module.
 188          //            Depending on the "cmd"-value, all necessary interrupts are enabled
 189          //            and the communication is started. While the processing is done by
 190          //            the reader module, this function waits for its completion.
 191          //            It's notable, that the data in the "send byte stream" is written 
 192          //            to the FIFO of the reader module by the ISR. Immediate after 
 193          //            enabling the interrupts, the LoAlert interrupt is activated.
 194          //            The ISR writes the data to the FIFO. This function is not involved
 195          //            in writing or fetching data from FIFO, all work is done by the 
 196          //            ISR.After command completion, the error status is evaluated and 
 197          //            returned to the calling function.
 198          //
 199          char M500PcdCmd(unsigned char cmd,
 200                          volatile unsigned char* send, 
 201                          volatile unsigned char* rcv,
 202                          volatile MfCmdInfo *info);
 203          
 204          // _____________________________________________________________________________
 205          //
 206          //  FUNCTION: SetBitMask
 207          //        IN: reg      register address
 208          //            mask     bit mask to set
 209          //       OUT: -
 210          //    RETURN: 
 211          //   COMMENT:  This function performs a read - modify - write sequence
 212          //             on the specified register. All bits with a 1 in the mask
 213          //             are set - all other bits keep their original value.
 214          //
 215          char SetBitMask(unsigned char reg,unsigned char mask);
 216          
 217          // _____________________________________________________________________________
 218          //
 219          //  FUNCTION: ClearBitMask
 220          //        IN: reg      register address
 221          //            mask     bit mask to clear
 222          //       OUT: -
 223          //    RETURN: 
 224          //   COMMENT:  This function performs a read - modify - write sequence
 225          //             on the specified register. All bits with a 1 in the mask
 226          //             are cleared - all other bits keep their original value.
 227          //
 228          char ClearBitMask(unsigned char reg,unsigned char mask);
 229          
 230          // _____________________________________________________________________________
 231          //

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁一区二区三区| 国产欧美日本一区二区三区| 一区二区三区四区在线播放| 99久久99久久免费精品蜜臀| 亚洲欧美视频在线观看视频| 成人永久看片免费视频天堂| 国产精品三级av在线播放| www.亚洲精品| 亚洲激情在线激情| 欧美疯狂做受xxxx富婆| 日韩成人av影视| 欧美大胆人体bbbb| 国产精品乡下勾搭老头1| 久久精品人人做| 丰满岳乱妇一区二区三区| 国产精品免费视频观看| 成人国产精品免费| 香蕉影视欧美成人| 久久久久国产精品厨房| 91亚洲午夜精品久久久久久| 无码av免费一区二区三区试看| 精品久久人人做人人爱| 91网站在线播放| 日本亚洲欧美天堂免费| 国产精品网站在线| 欧美精品久久一区| 国产99久久精品| 亚洲成人av免费| 日本一区二区三区在线观看| 欧美亚洲综合色| 国内成人精品2018免费看| 亚洲啪啪综合av一区二区三区| 日韩一区二区三区在线观看| 成人激情动漫在线观看| 日韩 欧美一区二区三区| 国产欧美一区二区三区沐欲| 欧美日韩成人一区| 成人性生交大片免费| 日韩专区一卡二卡| 综合色中文字幕| 欧美不卡在线视频| 欧美亚洲动漫制服丝袜| 国产精品一二三四区| 欧美三级视频在线观看| 国产麻豆91精品| 亚洲va中文字幕| 国产精品久久久久一区二区三区| 欧美一区二区视频观看视频 | 欧美亚洲自拍偷拍| 国产精品亚洲人在线观看| 石原莉奈在线亚洲二区| 日韩一区在线播放| 久久精品一二三| 日韩欧美高清dvd碟片| 欧美日韩在线免费视频| 99久久精品国产毛片| 国产一区999| 久久99在线观看| 亚洲一区日韩精品中文字幕| 中文字幕一区二区三区在线不卡| 精品国产一区二区亚洲人成毛片| 在线观看国产91| 欧美一区二区女人| 91美女在线视频| 成人午夜免费视频| 国产乱子伦一区二区三区国色天香| 日韩和欧美一区二区| 亚洲综合成人网| 一区二区三区美女视频| 亚洲视频一二三| 亚洲视频一区在线| 亚洲人成亚洲人成在线观看图片| 国产精品二三区| 国产精品日日摸夜夜摸av| 国产欧美精品日韩区二区麻豆天美| 欧美一区二区三区不卡| 欧美一级生活片| 欧美精品乱码久久久久久| 欧美中文字幕不卡| 在线观看日产精品| 色美美综合视频| 欧洲另类一二三四区| 欧美日韩一区二区三区四区五区| 一本一道久久a久久精品| 亚洲欧美成人一区二区三区| 亚洲黄色小说网站| 亚洲激情一二三区| 舔着乳尖日韩一区| 日韩中文字幕麻豆| 久久国产夜色精品鲁鲁99| 国内精品久久久久影院一蜜桃| 国内一区二区视频| 成人免费的视频| 欧美少妇bbb| 欧美一区二区在线看| 久久久一区二区三区捆绑**| 国产精品萝li| 亚洲精品videosex极品| 亚洲国产一区二区三区| 日韩国产成人精品| 免费国产亚洲视频| 国产自产v一区二区三区c| 成人精品免费网站| 在线观看欧美黄色| 精品电影一区二区三区| 中文字幕欧美日本乱码一线二线| 中文字幕亚洲综合久久菠萝蜜| 一区二区三区在线不卡| 日本成人中文字幕| 岛国一区二区在线观看| 欧美三级午夜理伦三级中视频| 欧美不卡视频一区| 国产精品视频第一区| 亚洲午夜久久久久久久久久久| 日本va欧美va欧美va精品| 国产成人av自拍| 日本乱码高清不卡字幕| www国产精品av| 一区二区三国产精华液| 国内久久婷婷综合| 欧美性生活久久| 国产亚洲综合色| 天天做天天摸天天爽国产一区 | 欧美一区二区三区电影| 国产精品女同一区二区三区| 韩国三级电影一区二区| 欧洲一区在线观看| 国产日韩欧美精品在线| 五月激情综合婷婷| 91丨九色丨国产丨porny| 日韩三级在线观看| 亚洲免费视频成人| 国产美女精品一区二区三区| 欧美日韩在线播放三区四区| 中文一区二区完整视频在线观看 | av成人老司机| 欧美高清精品3d| 亚洲欧洲综合另类| 国产精品一品二品| 日韩精品一区二区三区蜜臀| 亚洲欧美日韩国产成人精品影院 | 亚洲天堂免费在线观看视频| 蜜桃一区二区三区在线| 91亚洲精品乱码久久久久久蜜桃| 日韩午夜av电影| 亚洲精品视频免费观看| 成人不卡免费av| 久久免费视频色| 老司机午夜精品99久久| 欧美日韩一级黄| 亚洲精品综合在线| 丁香一区二区三区| 久久久99久久精品欧美| 麻豆国产精品777777在线| 欧美日韩精品专区| 亚洲国产一区二区三区青草影视| 色婷婷亚洲综合| 亚洲欧美自拍偷拍| 国产精品69毛片高清亚洲| 精品久久99ma| 狠狠狠色丁香婷婷综合激情| 日韩一区二区中文字幕| 午夜免费久久看| 欧美美女一区二区三区| 一区二区三区四区高清精品免费观看 | 狠狠v欧美v日韩v亚洲ⅴ| 欧美老女人第四色| 婷婷一区二区三区| 在线成人午夜影院| 免费观看91视频大全| 欧美日韩电影在线播放| 日韩在线一二三区| 欧美一区二区久久久| 免费久久99精品国产| 久久久久久免费网| 国产精品77777竹菊影视小说| 国产亚洲欧美色| 菠萝蜜视频在线观看一区| 中文字幕一区不卡| 色婷婷久久久亚洲一区二区三区 | 精品国产伦理网| 狠狠色综合日日| 国产精品剧情在线亚洲| 97国产一区二区| 亚洲一区免费观看| 欧美一区二区三区公司| 国产精品一区久久久久| 国产精品久久久久久久岛一牛影视 | 亚洲国产精品一区二区久久| 欧美日韩日日骚| 青娱乐精品视频| 国产亚洲欧美在线| 欧美在线免费视屏| 欧美a级一区二区| 国产农村妇女精品| 欧美日韩在线亚洲一区蜜芽| 极品少妇xxxx偷拍精品少妇| 国产区在线观看成人精品 | 国产日韩精品久久久| 91蝌蚪porny|