📄 iso14443b.lst
字号:
C51 COMPILER V7.50 ISO14443B 07/25/2008 17:05:20 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE ISO14443B
OBJECT MODULE PLACED IN iso14443b.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE iso14443b.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include <REGX52.H>
2 #include <main.h>
3 #include <iso14443b.h>
4 #include <src632.h>
5 #include <string.h>
6 #include <intrins.h>
7
8 extern unsigned char g_cFWI;
9 extern struct TranSciveBuffer{unsigned char MfCommand;
10 unsigned int MfLength;
11 unsigned char MfData[64];
12 };
13
14 //////////////////////////////////////////////////////////////////////
15 //REQUEST B
16 //////////////////////////////////////////////////////////////////////
17 char M531PiccRequestB(unsigned char req_code,
18 unsigned char AFI,
19 unsigned char N,
20 unsigned char *ATQB)
21 {
22 1 char status;
23 1 struct TranSciveBuffer MfComData;
24 1 struct TranSciveBuffer *pi;
25 1 pi=&MfComData;
26 1
27 1 ClearBitMask(RegControl,0x08); // disable crypto 1 unit
28 1
29 1 SetBitMask(RegTxControl,0x03); // Tx2RF-En, Tx1RF-En enable
30 1
31 1 PcdSetTmo(5);
32 1 MfComData.MfCommand = PCD_TRANSCEIVE;
33 1 MfComData.MfLength = 3;
34 1 MfComData.MfData[0] = ISO14443B_ANTICOLLISION; // APf code
35 1 MfComData.MfData[1] = AFI; //
36 1 MfComData.MfData[2] = ((req_code<<3)&0x08) | (N&0x07); // PARAM
37 1
38 1 status = PcdComTransceive(pi);
39 1
40 1 if (status!=MI_OK && status!=MI_NOTAGERR)
41 1 { status = MI_COLLERR; }
42 1
43 1 if (MfComData.MfLength != 96)
44 1 { status = MI_COM_ERR; }
45 1
46 1 if (status == MI_OK)
47 1 {
48 2 memcpy(ATQB, &MfComData.MfData[0], 16);
49 2 PcdSetTmo(ATQB[11]>>4);
50 2 }
51 1 return status;
52 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
C51 COMPILER V7.50 ISO14443B 07/25/2008 17:05:20 PAGE 2
CODE SIZE = 139 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 77
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 + -