📄 cs_drv.lst
字号:
C51 COMPILER V7.50 CS_DRV 10/12/2006 15:31:40 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE CS_DRV
OBJECT MODULE PLACED IN .\Release\Cs_drv.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\lib\Cs_drv.c LARGE OPTIMIZE(9,SIZE) BROWSE ORDER MODDP2 INCDIR(..\..\
-inc\) DEBUG OBJECTEXTEND PRINT(.\Release\Cs_drv.lst) OBJECT(.\Release\Cs_drv.obj)
line level source
1 /*
2 *
3 * cs_drv.c
4 *
5 * Part of the Myson Century CS620X demo program.
6 *
7 * Authors: LY Lin, WM Wang, IJ Chen, WH Lee
8 *
9 * cs_drv.c contains Network Interface upper layer routines.
10 *
11 * This program was developed using the Keil 8051 C uVision 2 system.
12 * The Keil compiler MUST be used if working with Myson Century supplied
13 * firmware.
14 *
15 *
16 *
17 */
18
19 #include <stdio.h>
20 #include "hpserver.h"
21 #include "620xenet.h"
22 #include "netutil.h"
23 #include "ether.h"
24 #include "net.h"
25 #include "ip.h"
26 #include "tcp.h"
27 #include "config.h"
28
29 /************************************************************************
30 /* Function Name : init_ethernet *
31 /* *
32 /* Arguments : *
33 /* None *
34 /* Return : *
35 /* None *
36 /* *
37 /* Comment : *
38 /* This function initialize CS620X NIC. *
39 /* *
40 /************************************************************************/
41 void init_ethernet (void)
42 {
43 1 NIC_Info *ptr_nic_info, nic_info;
44 1 int i;
45 1
46 1 ptr_nic_info = &nic_info;
47 1
48 1 ptr_nic_info-> NIC_PHY_Control = 1; /* internal PHY*/
49 1
50 1 for (i = 0; i < ETHERNET_ADDRESS_LENGTH; i++)
51 1 {
52 2 ptr_nic_info-> NIC_MAC_Address [i] = my_mac_addr [i];
53 2 }
54 1
C51 COMPILER V7.50 CS_DRV 10/12/2006 15:31:40 PAGE 2
55 1 ptr_nic_info-> NIC_RPageSTART = RXSTART; /* Receive Page Start*/
56 1
57 1 ptr_nic_info-> NIC_RPageSTOP = RXSTOP; /* Receive page stop*/
58 1
59 1 /* Receive Configuration Register: accept broadcast and physical address*/
60 1 ptr_nic_info-> NIC_RConfigR = RCR_AB + RCR_AP ;
61 1
62 1 /* interrupt mask register*/
63 1 ptr_nic_info->NIC_IntMaskR = IMR_RcvOKEn+IMR_RcvErrorEn+IMR_RcvBufOverFlowEn ;
64 1
65 1 Ethernet_Init (ptr_nic_info);
66 1
67 1 return ;
68 1 }
69
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 112 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- 14
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 + -