📄 rdio.lst
字号:
C51 COMPILER V7.06 RDIO 02/25/2005 08:31:59 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE RDIO
OBJECT MODULE PLACED IN RDIO.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE RDIO.C LARGE OPTIMIZE(2,SPEED) BROWSE DEBUG OBJECTEXTEND
stmt level source
1
2 #pragma large
3 #include <rdio.h>
4 #include <main.h>
5
6 #include "w77e58.h"
7 ///////////////////////////////////////////////////////////////////////////////
8 // Module Definitions
9 ///////////////////////////////////////////////////////////////////////////////
10 #define GetRegPage(adr) (0x80 | (adr>>3))
11
12 unsigned char xdata ini _at_ 0x7000; // move base address to 0x7000
13 unsigned char xdata *GpBase = &ini; // redirect pointer to base address
14 //GpBase: RC500 的基地址定义,在其他文件中使用时必须用extern 进行定义
15
16 ///////////////////////////////////////////////////////////////////////////////
17 // Enable On-Chip 1K SRAM //
18 ///////////////////////////////////////////////////////////////////////////////
19 /*
20 void EnOnChipSram()
21 {
22 DME0 = 1;
23 }
24 */
25 ///////////////////////////////////////////////////////////////////////////////
26 // Open Reader Communication
27 ///////////////////////////////////////////////////////////////////////////////
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 ///////////////////////////////////////////////////////////////////////////////
55 // G E N E R I C R E A D
C51 COMPILER V7.06 RDIO 02/25/2005 08:31:59 PAGE 2
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 = 436 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 7 13
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 + -