⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lan91c111end.h

📁 VxWorks 下 ne2000End Lan9111 和 CS8900 网卡驱动程序源码
💻 H
📖 第 1 页 / 共 3 页
字号:

#define 	MODEM_AUDIO         0x08

/* OSITECH-- */

/* Media Connect and Disconnect Vars */

#define 	MEDIA_CONNECT		0x01
#define 	MEDIA_DISCONNECT	0x02
#define		ETH_LENGTH_OF_ADDRESS 	6

/* Multicast Table Entry Structure */
 
typedef struct {
	UINT  MulticastTableEntryCount;
	UCHAR MulticastTableEntry[MAX_MULTICAST_ADDRESS * ETH_LENGTH_OF_ADDRESS];
	} MULTICAST_TABLE;
 

/* Add feature function variable here. By Shawn X.D. Meng March 24, 1997. */

#define 	ETxThresholdDefault      0x04
#define 	ETxThresholdDefault100   0x50

#define		ERxThresholdDefault		 31	  /* Increament is 64 Byte Multiple */

#define 	FC_RETRY_COUNTER         10
#define 	ThresholdIncreament      1        /* Increament is 16Byte multiple */
#define 	AUTO_NEGOTIATION         0xFF
#define 	DEFAULT_VALUE            0xFE
#define 	FULL_DUPLEX              0x01
#define 	HALF_DUPLEX              0x00
#define 	SPEED10                  0
#define 	SPEED100                 100
#define 	National_PHY_ID          0x3500

/* National PHY register address. */

#define 	BMCR                     0x00
#define 	BMSR                     0x01
#define 	PHY_ID1					 0x02
#define 	PHY_ID2					 0x03 
#define 	ANAR                     0x04
#define 	ANLPAR                   0x05

/* OSITECH++ */

#define 	ANEXPN                   0x06

/* OSITECH-- */

/* PG 07/21/00 83C183++ */

#define 	PHY_STATUS_OUTPUT		 0x12
#define 	PHY_INT_MASK		   	 0x13
#define 	PHY_MASK_BASE			 0xFFC0
#define 	PHY_MASK_INT			 ~0x8000
#define 	PHY_MASK_LINK			 ~0x4000

/* PG 07/21/00 83C183-- */

#define 	CTL_TEST				 0x18 	
#define 	PAR						 0x19

/* National PHY BMCR register mask bit */

#define 	BMCR_100                 0x2000
#define 	BMCR_FULL_DUPLEX         0x0100

/*OSITECH++ */

#define 	BMCR_RESET               0x8000
#define 	BMCR_LOOPBACK            0x4000
#define 	BMCR_RESTART_NEGOTIATION 0x0200

/* OSITECH-- */

#define BMCR_AUTO_NEGOTIATION    0x1000

/*OSITECH++ */

/*
 * National PHY BMSR register mask bit
 */
#define BMSR_ANEGC               0x0020
#define BMSR_LINK                0x0004

 /*
  *  National PHY TEST register mask bit
  */
#define TEST_CRS_CTL            0x0020

/* OSITECH-- */

/* National PHY ANAR & ANLPAR registers mask bit */

#define 	ANAR_TX100_FD       0x0100
#define 	ANAR_TX100          0x0080
#define 	ANAR_TX10_FD        0x0040
#define 	ANAR_TX10           0x0020

/* supported PHYs */

#define 	NATIONAL		0x1
#define 	LAN83C180		0x2
#define		LAN83C183		0x3

/* driver related macros starts here */

/* The network address structure.  Two per adapter. */

#define  MAC_ADDRESS_SIZE   6
typedef struct  _NETWORK_ADDRESS
{
    UCHAR           Address[MAC_ADDRESS_SIZE];     /*  Network address */
} NETWORK_ADDRESS;

#define NETWORK_ADDRESS_SIZE    sizeof(NETWORK_ADDRESS)

/* Defines possible states for MAC structures. */

typedef enum    _STATE_TYPE
{
     VOID_STATE,                        /* Illegal value. */
     ERROR_STATE,                       /* Initialization has failed. */
     INITIALIZING_STATE,                /* Structure is being built. */
     NORMAL_STATE,                      /* Operational state. */
     RESET_STATE,                       /* Reset in progress. */
     RESET_PEND_STATE,                  /* Reset when can. */
     RESET_TRANSMITTING_STATE,          /* Complete reset after transmit. */
     CLOSED_STATE,                      /* Close in progress. */
     CLOSE_PEND_STATE,                  /* Close when can. */
     CLOSE_TRANSMITTING_STATE,          /* Complete close after transmit. */
     STATUS_PEND_STATE,                 /* Still busy, don't do nuttin */
     RESET_COMPLETE_STATE,              /* Clean up after reset. */
     OPEN_PEND_STATE                    /* Wait for open to complete. */
} STATE_TYPE;


/* Values for severity of trace message */

#define 	DEBUG_LEVEL_ALL         0
#define 	DEBUG_LEVEL_TRACE       1
#define 	DEBUG_LEVEL_INFORMATION 2
#define 	DEBUG_LEVEL_WARN        3
#define 	DEBUG_LEVEL_ERROR       4
#define 	DEBUG_LEVEL_NONE        256

/* Dummy entry for TraceMsg macro */

#ifdef  TRACE
#define TraceMsg(DebugValue, DebugText) {\
UINT __x = \
(DebugValue >= DebugLevel) ? DbgPrint("Smc9000.Sys:  %s\n", DebugText) : 0; \
}
#else
#define TraceMsg(DebugValue, DebugText)
#endif

/* Debug breakpoint macro. */

#ifdef  BREAKPOINT
/* #define BreakPoint  _asm int 3 */
#else
#define BreakPoint
#endif


/* Version Information. */

#ifdef NDIS40_MINIPORT
	#define DRIVER_NDIS_MAJOR_VERSION  4       /* ndis level */
	#define DRIVER_NDIS_MINOR_VERSION  0       /* ndis level */
#else
	#define DRIVER_NDIS_MAJOR_VERSION  3       /* ndis level */
	#define DRIVER_NDIS_MINOR_VERSION  0       /* ndis level */

#endif

#define DRIVER_NDIS_VERSION        ((DRIVER_NDIS_MAJOR_VERSION << 8) + DRIVER_NDIS_MINOR_VERSION)

/* environment variabls starts here */

/* Definitions for the SMC 9000 Evaluation Board driver. */

#ifdef SMC

/* Common definitions for all modules. */

#undef   VER_COMPANYNAME_STR
#define  VER_LEGALCOPYRIGHT_YEARS     "1993-2000"
#define  VER_LEGALCOPYRIGHT_STR       "Copyright \251 SMSC " VER_LEGALCOPYRIGHT_YEARS
#define  VER_COMPANYNAME_STR          "Standard Microsystems Corp."
#define  VER_FILEVERSION_STR          "3.12"

/* Definitions for the driver. */

#ifdef DEBUG
#define  DRV_VER_FILEDESCRIPTION_STR      "LAN9000 Adapter Driver (Debug Version)"
#else
#define  DRV_VER_FILEDESCRIPTION_STR      "LAN9000 Adapter Driver"
#endif

#ifdef NDIS_WIN
#define  DRV_VER_ORIGINALFILENAME_STR     "LAN9000.VXD"
#else
#define  DRV_VER_ORIGINALFILENAME_STR     "LAN9000.SYS"
#endif

#define  DRV_VER_INTERNALNAME_STR         "LAN9000"

/* OID Query return strings. */

#define 	DRV_VENDOR_NAME     "LAN 9000 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_92  "LAN 91C92 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_94  "LAN 91C94 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_100 "LAN 91C1XX Ethernet Adapter"
#define 	DRV_VENDOR_NAME_MF  "SMC PCMCIA Multifunction Ethernet Adapter"

/* Byte count of description strings. */

#define 	SIZE_DRV_VENDOR_NAME        26
#define 	SIZE_DRV_VENDOR_NAME_92     27
#define 	SIZE_DRV_VENDOR_NAME_94     27
#define 	SIZE_DRV_VENDOR_NAME_100    28
#define 	SIZE_DRV_VENDOR_NAME_MF     50

#endif /* SMC */

/* Definitions for the ALTNAME Adapter. */

#ifdef ALTNAME

/* Common definitions for all modules. */

#undef   VER_COMPANYNAME_STR
#define  VER_LEGALCOPYRIGHT_YEARS     "1995"
#define  VER_LEGALCOPYRIGHT_STR       "Copyright \251 ALTNAME " VER_LEGALCOPYRIGHT_YEARS
#define  VER_COMPANYNAME_STR          "ALTNAME Corp."
#define  VER_FILEVERSION_STR          "1.02"

/* Definitions for the driver. */

#ifdef DEBUG
#define  DRV_VER_FILEDESCRIPTION_STR      "ALTNAME Adapter Driver (Debug Version)"
#else
#define  DRV_VER_FILEDESCRIPTION_STR      "ALTNAME Adapter Driver"
#endif

#ifdef NDIS_WIN
#define  DRV_VER_ORIGINALFILENAME_STR     "SMC9000.VXD"
#else
#define  DRV_VER_ORIGINALFILENAME_STR     "SMC9000.SYS"
#endif

#define  DRV_VER_INTERNALNAME_STR         "SMC9000"

/* OID Query return strings. */

#define 	DRV_VENDOR_NAME     "ALTNAME 9000 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_92  "ALTNAME 91C92 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_94  "ALTNAME 91C94 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_100 "ALTNAME 91C100 Ethernet Adapter"
#define 	DRV_VENDOR_NAME_MF  "ALTNAME PCMCIA Multifunction Ethernet Adapter"

/* Byte count of description strings. */

#define 	SIZE_DRV_VENDOR_NAME        30
#define 	SIZE_DRV_VENDOR_NAME_92     31
#define 	SIZE_DRV_VENDOR_NAME_94     31
#define 	SIZE_DRV_VENDOR_NAME_100    32
#define 	SIZE_DRV_VENDOR_NAME_MF     46

#endif /* ALTNAME */

#ifdef __cplusplus
}
#endif

#endif /* __INClan91c111Endh */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -