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

📄 if_elt.h

📁 IXP425的BSP代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* if_elt.h - 3Com EtherLink III network interface header*/ /* Copyright 2002 Wind River Systems, Inc. *//*modification history--------------------01h,19apr02,rcs  added obsolescence warning SPR# 76010 01g,06mar96,hdn  added ELT_CTRL.01f,13oct95,hdn  changed reset to elt-reset.01e,07feb94,bcs  added net job queue statistics01d,23jan94,bcs  added timing statistics01c,16jan94,bcs  added rxearly to statistics01b,08jan94,bcs  added statistics structure01a,09dec93,bcs  written. */#ifndef __INCif_elth#define __INCif_elth#ifdef __cplusplusextern "C" {#endif#warning "if_elt driver is obsolete, please use elt3c509End driver"#ifndef _ASMLANGUAGE#define EA_SIZE         6               /* one Ethernet address */#define EH_SIZE         14              /* avoid structure padding issues */#define MAX_FRAME_SIZE  (EH_SIZE + ETHERMTU)    /* capacity of buffer *//* Typedefs for external structures that are not typedef'd in their .h files */typedef struct mbuf	MBUF;typedef struct arpcom	IDR;		/* Interface Data Record wrapper */typedef struct ifnet	IFNET;		/* real Interface Data Record */typedef struct sockaddr	SOCK;/* ELT driver data structures */typedef struct elt_frame                /* frame buffer, list element */    {    struct elt_frame *  lNext;          /* linked list pointer */    u_char              refCnt;         /* reference count when loaned out */    UINT16              count;          /* bytes left to transmit or */                                        /* received so far; initially */                                        /* length rounded up to dword */                                        /* plus size of "preamble" */    char *              nextByte;       /* next byte to transmit or */                                        /* next byte to receive into */                                        /* Following fields map to FIFO */                                        /* transmit packet structure; */                                        /* used same way for receive */    UINT16              length;         /* length of contained frame */                                        /* received frame includes error */    UINT16              unassigned;     /* pad "preamble" to dword size */    char                header [EH_SIZE];    char                data [ETHERMTU];    char                padToDword [MAX_FRAME_SIZE % sizeof (long)];    } ELT_FRAME;/* statistics block */typedef struct     {#define collisions      stat[0]#define crcs            stat[1]#define aligns          stat[2]#define rxnobuffers     stat[3]#define rxoverruns      stat[4]#define disabled        stat[5]#define deferring       stat[6]#define txunderruns     stat[7]#define aborts          stat[8]#define outofwindow     stat[9]#define heartbeats      stat[10]#define badPacket       stat[11]#define shortPacket     stat[12]#define txnoerror       stat[13]#define rxnoerror       stat[14]#define txerror         stat[15]#define rxerror         stat[16]#define overwrite       stat[17]#define wrapped         stat[18]#define interrupts      stat[19]#define elt_reset       stat[20]#define strayint        stat[21]#define multcollisions  stat[22]#define latecollisions  stat[23]#define nocarriers      stat[24]#define jabbers         stat[25]#define txoverruns      stat[26]#define rxunderruns     stat[27]#define rxearly         stat[28]#ifdef ELT_TIMING#define timerUpdates    stat[29]#define timerOverflow   stat[30]#define timerInvalid    stat[31]#define maxRxLatency    stat[32]#define minRxLatency    stat[33]#define maxIntLatency   stat[34]#define taskQRxOuts     stat[35]#define maxRxTaskQ      stat[36]#define taskQTxOuts     stat[37]#define maxTxTaskQ      stat[38]    UINT stat[40];#else    UINT stat[30];#endif /* ELT_TIMING */    } ELT_STAT;/* The definition of the driver control structure */typedef struct elt_ctrl    {    IDR                 idr;        /* interface data record */    BOOL                attached;   /* indicates attach() called */    volatile BOOL       rxHandling; /* flag, indicates netTask active/queued */    volatile BOOL       txHandling; /* flag, indicates netTask active/queued */    int                 nRxFrames;  /* how many receive frames to create */    ELT_FRAME *         pFrameArea; /* whole clump of rcv and transmit frames */    ELT_FRAME *         pTxFrame;   /* transmit frame buffer (only one) */    volatile ELT_FRAME *pRxHead;    /* head of received frame list */    ELT_FRAME *         pRxTail;    /* tail of received frame list */    volatile ELT_FRAME *pRxCurrent; /* frame currently being received */    int                 nLoanFrames;/* count of loanable frame buffers */    int                 rxFilter;   /* current receive address filter bits */    int                 port;       /* base I/O port of this board */    int                 ivec;       /* interrupt vector */    int                 intLevel;   /* interrupt level */    int                 attachment; /* board connector to use (AUI,BNC,TPE) */    int                 intMask;    /* current board interrupt mask */    ELT_STAT            eltStat;    /* statistics */#ifdef ELT_TIMING    int                 interruptTime; /* timer value at ISR, -1 if invalid */    int                 maxRxLatency; /* max time to service receive buffer */#endif /* ELT_TIMING */    } ELT_CTRL;/* ELT register offsets, grouped by window number *//* all windows */#define ELT_COMMAND     0x0e            /* command register */#define ELT_STATUS      0x0e            /* status register *//* window number symbols for selection command */#define WIN_CONFIG      0x0000#define WIN_OPERATING   0x0001#define WIN_ADDRESS     0x0002#define WIN_FIFO        0x0003#define WIN_DIAGNOSTIC  0x0004#define WIN_RESULTS     0x0005#define WIN_STATISTICS  0x0006/* window 0, configuration and EEPROM */#define MANUF_ID        0x00            /* manufacturer ID */#define PRODUCT_ID      0x02            /* product ID/MCA adapter ID */#define CONFIG_CONTROL  0x04            /* configuration control */#define ADDRESS_CONFIG  0x06            /* address configuration */#define RESOURCE_CONFIG 0x08            /* resource configuration */#define EEPROM_CONTROL  0x0a            /* EEPROM control */#define EEPROM_DATA     0x0c            /* EEPROM data in/out *//* window 1, operating set */#define DATA_REGISTER   0x00            /* data (low word) in/out */#define DATA_HIGH       0x02            /* data (high word) in/out */#define RX_STATUS       0x08            /* received packet status */#define TIMER           0x0a            /* (byte) interrupt latency timer */#define TX_STATUS       0x0b            /* (byte) transmit status */#define TX_FREE_BYTES   0x0c            /* free bytes available in tx FIFO */                                        /* also appears in window 3 *//* window 2, station address setup/read */#define ADDRESS_0       0x00            /* (byte) station address 0 */#define ADDRESS_1       0x01            /* (byte) station address 1 */#define ADDRESS_2       0x02            /* (byte) station address 2 */#define ADDRESS_3       0x03            /* (byte) station address 3 */#define ADDRESS_4       0x04            /* (byte) station address 4 */#define ADDRESS_5       0x05            /* (byte) station address 5 *//* window 3, FIFO management */#define TX_RECLAIM      0x08            /* MCA tx reclaim threshold */#define RX_FREE_BYTES   0x0a            /* free bytes available in rx FIFO */#define TX_FREE_BYTES_3 0x0c            /* free bytes available in tx FIFO */                                        /* also appears in window 1 */                                        /* same offset so can use same macro *//* window 4, diagnostics */#define TX_DIAGNOSTIC   0x00            /* tx diagnostic */#define HOST_DIAGNOSTIC 0x02            /* host diagnostic */#define FIFO_DIAGNOSTIC 0x04            /* FIFO diagnostic */#define NET_DIAGNOSTIC  0x06            /* net diagnostic */#define ETHERNET_STATUS 0x08            /* ethernet controller status */#define MEDIA_STATUS    0x0a            /* media type and status *//* window 5, command results and internal state (read only) */#define TX_START_THRESH 0x00            /* tx start threshold + 4 */#define TX_AVAIL_THRESH 0x02            /* tx available threshold */#define RX_EARLY_THRESH 0x06            /* rx early threshold */#define RX_FILTER       0x08            /* rx filter lower 4 bits */#define INTERRUPT_MASK  0x0a            /* interrupt mask */#define READ_ZERO_MASK  0x0c            /* read zero mask *//* window 6, statistics registers (byte regs. MUST be read/written as bytes) */

⌨️ 快捷键说明

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