📄 timeslot_handle.lst
字号:
C51 COMPILER V7.50 TIMESLOT_HANDLE 03/10/2006 16:35:26 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE TIMESLOT_HANDLE
OBJECT MODULE PLACED IN timeslot_handle.OBJ
COMPILER INVOKED BY: e:\Keil\C51\BIN\C51.EXE timeslot_handle.c LARGE OPTIMIZE(9,SIZE) BROWSE NOAREGS DEBUG OBJECTEXTEND
line level source
1 #include <REG54.H>
2 #include "ep1k50.h"
3 #include "se0111.h"
4 #include "rc7820.h"
5 #include "f2rc7820.h"
6 #include "rc7860.h"
7 #include "f2rc7860.h"
8 #include "cmd_para_save.h"
9 #include "se0121.h"
10
11 extern void se0111_reg_wr(unsigned char Haddr,unsigned char Laddr,unsigned char value,unsigned char slot);
12 extern unsigned char se0111_reg_rd(unsigned char Haddr,unsigned char Laddr,unsigned char slot);
13 extern unsigned char se0121_reg_rd(unsigned char Laddr,unsigned char slot);
14 extern void se0121_reg_wr(unsigned char Laddr,unsigned char value,unsigned char slot);
15 extern void SetResRdyTbl(unsigned char prio) large reentrant;
16 extern unsigned char GetResRdyTbl(unsigned char prio) large reentrant;
17 extern unsigned long int xdata commandid; //表示命令代码的变量
18 extern unsigned char xdata tx_buf[];
19 extern unsigned char xdata tx_buf_pointer;
20 extern bit tx_done;
21 extern unsigned char f2rc7820_rd(unsigned char f2addr) large reentrant;
22 extern unsigned char f2rc7860_rd(unsigned int f2addr) large reentrant;
23 extern unsigned char xdata start_flg[4];
24 extern unsigned char xdata start_flg_EOS[4];
25 extern unsigned char xdata board_type[4][2]; //定义插盘类型数组,第一位表示槽号,第二位表示盘号
26
27 unsigned char xdata timeslot_2M[3][21] = {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0
-,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
28
29 unsigned char timeslot_setup(struct cmd_para_save *timeslot_set){
30 1 //C00建立时隙函数
31 1 unsigned char xdata tsset_Sboard;
32 1 unsigned char xdata tsset_Stype;
33 1 unsigned char xdata tsset_Sslot;
34 1 unsigned char xdata tsset_Sport;
35 1 unsigned char xdata tsset_Dboard;
36 1 unsigned char xdata tsset_Dtype;
37 1 unsigned char xdata tsset_Dslot;
38 1 unsigned char xdata tsset_Dport;
39 1 unsigned char xdata outporth;
40 1 unsigned char xdata outportl;
41 1 unsigned char xdata inporth;
42 1 unsigned char xdata inportl;
43 1 unsigned char xdata outport;
44 1 unsigned char xdata inport;
45 1 unsigned char xdata return_value;
46 1
47 1 commandid=0x00433030; //建立时隙命令代码
48 1 tsset_Sboard=timeslot_set->tsset_Sboard; //源盘盘号
49 1 tsset_Stype=timeslot_set->tsset_Stype;
50 1 tsset_Sslot=timeslot_set->tsset_Sslot; //源盘时隙号
51 1 tsset_Sport=timeslot_set->tsset_Sport; //源盘端口号
52 1 tsset_Dboard=timeslot_set->tsset_Dboard; //目的盘盘号
53 1 tsset_Dtype=timeslot_set->tsset_Dtype;
54 1 tsset_Dslot=timeslot_set->tsset_Dslot; //目的盘时隙号
C51 COMPILER V7.50 TIMESLOT_HANDLE 03/10/2006 16:35:26 PAGE 2
55 1 tsset_Dport=timeslot_set->tsset_Dport; //目的盘端口号
56 1
57 1 if ((tsset_Sslot > 0) & (tsset_Sslot < 64)){
58 2 if ((tsset_Sport < 22) & (tsset_Dport < 22)){
59 3 switch (tsset_Dport){ //得出Mapper中的下行支路号
60 4 case 1: outporth=0;
61 4 outportl=0x4C;
62 4 break;
63 4 case 2: outporth=0;
64 4 outportl=0x7C;
65 4 break;
66 4 case 3: outporth=0;
67 4 outportl=0xAC;
68 4 break;
69 4 case 4: outporth=0;
70 4 outportl=0xDC;
71 4 break;
72 4 case 5: outporth=0x08;
73 4 outportl=0x4C;
74 4 break;
75 4 case 6: outporth=0x08;
76 4 outportl=0x7C;
77 4 break;
78 4 case 7: outporth=0x08;
79 4 outportl=0xAC;
80 4 break;
81 4 case 8: outporth=0x08;
82 4 outportl=0xDC;
83 4 break;
84 4 case 9: outporth=0x10;
85 4 outportl=0x4C;
86 4 break;
87 4 case 10: outporth=0x10;
88 4 outportl=0x7C;
89 4 break;
90 4 case 11: outporth=0x10;
91 4 outportl=0xAC;
92 4 break;
93 4 case 12: outporth=0x10;
94 4 outportl=0xDC;
95 4 break;
96 4 case 13: outporth=0x18;
97 4 outportl=0x4C;
98 4 break;
99 4 case 14: outporth=0x18;
100 4 outportl=0x7C;
101 4 break;
102 4 case 15: outporth=0x18;
103 4 outportl=0xAC;
104 4 break;
105 4 case 16: outporth=0x18;
106 4 outportl=0xDC;
107 4 break;
108 4 case 17: outporth=0x20;
109 4 outportl=0x4C;
110 4 break;
111 4 case 18: outporth=0x20;
112 4 outportl=0x7C;
113 4 break;
114 4 case 19: outporth=0x20;
115 4 outportl=0xAC;
116 4 break;
C51 COMPILER V7.50 TIMESLOT_HANDLE 03/10/2006 16:35:26 PAGE 3
117 4 case 20: outporth=0x20;
118 4 outportl=0xDC;
119 4 break;
120 4 case 21: outporth=0x28;
121 4 outportl=0x4C;
122 4 break;
123 4 default: break;
124 4 }
125 3 switch (tsset_Sport){ //得出Mapper中的上行支路号
126 4 case 1: inporth=0;
127 4 inportl=0x4D;
128 4 break;
129 4 case 2: inporth=0;
130 4 inportl=0x7D;
131 4 break;
132 4 case 3: inporth=0;
133 4 inportl=0xAD;
134 4 break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -