亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dec21143.h

?? 嵌入式操作系統(tǒng)Nucleus Plus下的以太網(wǎng)驅(qū)動模板
?? H
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************/
/*                                                                          */
/*      Copyright (c) 1999 by Accelerated Technology, Inc.                  */
/*                                                                          */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the subject */
/* matter of this material.  All manufacturing, reproduction, use and sales */
/* rights pertaining to this subject matter are governed by the license     */
/* agreement.  The recipient of this software implicity accepts the terms   */
/* of the license.                                                          */
/*                                                                          */
/****************************************************************************/
/****************************************************************************/
/*                                                                          */
/* FILENAME                                                                 */
/*                                                                          */
/*    DEC21143.H                                                            */
/*                                                                          */
/* DESCRIPTION                                                              */
/*                                                                          */
/*    This file contains the definitions and macros necessary for the       */
/*    DEC21143 driver.                                                      */
/*                                                                          */
/* AUTHOR                                                                   */
/*                                                                          */
/*    Uriah T. Pollock                                                      */
/*                                                                          */
/* DATA STRUCTURES                                                          */
/*                                                                          */
/*    DEC21143_XDATA                                                        */
/*    DEC21143_DESCRIPTOR                                                   */
/*                                                                          */
/* FUNCTIONS                                                                */
/*                                                                          */
/*    NONE                                                                  */
/*                                                                          */
/* DEPENDENCIES                                                             */
/*                                                                          */
/*    "dev.h"                                                               */
/*                                                                          */
/* HISTORY                                                                  */
/*                                                                          */
/*       NAME                 DATE            REMARKS                       */
/*                                                                          */
/*  Uriah T. Pollock        01/12/99      Created initial version 1.0       */
/*                                                                          */
/****************************************************************************/
#include "net\inc\dev.h"


/* This macro defines the number of buffer descriptors to allocate. Note
   that the one for RX will also allocate the same number of net buffers
   for storing the incoming packets. */
#define DEC21143_MAX_RX_DESCRIPTORS         32

/* We compute the value by determining how many buffers are needed to send
   a max sized ethernet packet. Then just to be safe we double it. */
#define DEC21143_MAX_TX_DESCRIPTORS         ((((DEC21143_ETHERNET_MTU +         \
                                            DEC21143_ETHERNET_ADDRESS_SIZE)     \
                                            / NET_MAX_BUFFER_SIZE) + 1) * 2)

/* Define the length of time we will wait for autonegotiation to
   complete. */
#define DEC21143_NEOGITATION_TIMEOUT        (5 * TICKS_PER_SECOND);

/* Define basic ethernet sizes. */
#define DEC21143_ETHERNET_CRC_SIZE          4
#define DEC21143_ETHERNET_ADDRESS_SIZE      6
#define DEC21143_ETHERNET_HEADER_SIZE       14
#define DEC21143_ETHERNET_MTU               1500

/* This macro defines which interrupts will be enabled on the
   DEC chip. Since the same bits positions are used for enabling
   interrupts and for getting status of interrupts this macro
   is used in both places in the driver. */
#define DEC21143_INTERRUPTS     (CSR5_TX_INTERRUPT                  |   \
                                 CSR5_TX_JABBER_TIMEOUT             |   \
                                 CSR5_TX_UNDERFLOW                  |   \
                                 CSR5_RX_INTERRUPT                  |   \
                                 CSR5_RX_PROCESS_STOPPED            |   \
                                 CSR5_RX_BUFFER_UNAVAIL             |   \
                                 CSR5_FATAL_BUS_ERROR               |   \
                                 CSR5_ABNORMAL_INTERRUPT_SUMMARY    |   \
                                 CSR5_NORMAL_INTERRUPT_SUMMARY      |   \
                                 CSR5_AUTONEGOTIATION_COMPLETE      |   \
                                 CSR5_LINK_FAIL                     |   \
                                 CSR5_LINK_CHANGED)

/* Define the buffer descriptor structure used for sending and receiving
   packets.
*/

typedef struct _dec21143_descriptor DEC21143_DESCRIPTOR;

struct _dec21143_descriptor
{
    UINT32              status;             /* own bit and status bits              */
    UINT32              control_count;      /* buffer byte count and control bits   */
    NET_BUFFER          *buffer;            /* buffer address                       */
    DEC21143_DESCRIPTOR *next_descriptor;   /* next descriptor address              */
};

/* Define values for the descriptor control and status fields. Some are
   common between both RX and TX descriptor, DESx, some are only for
   RX, RDESx, and some are only for TX, TDESx.

    0 coorresponds to the status field
    1 coorresponds to the control_count field
    2 coorresponds to the buffer field
    3 coorresponds to the next_descriptor field

*/

/* Common values. */
#define DES0_OWN_BIT                    (1 << 31)
#define DEC21143_SETUP_FRAME_LENGTH     192

#define DES1_END_OF_RING                (1 << 25)
#define DES1_SECOND_ADDRESS_CHAINED     (1 << 24)

/* RX Values. */
#define RDES0_CRC_ERROR                 (1 << 1)
#define RDES0_DRIBBLING_BIT             (1 << 2)
#define RDES0_REPORT_ON_MII_ERROR       (1 << 3)
#define RDES0_RECEIVE_WATCHDOG          (1 << 4)
#define RDES0_FRAME_TYPE                (1 << 5)
#define RDES0_COLLISION_SEEN            (1 << 6)
#define RDES0_FRAME_TOO_LONG            (1 << 7)
#define RDES0_LAST_DESCRIPTOR           (1 << 8)
#define RDES0_FIRST_DESCRIPTOR          (1 << 9)
#define RDES0_MULTICAST_FRAME           (1 << 10)
#define RDES0_RUNT_FRAME                (1 << 11)
#define RDES0_DATA_TYPE_MASK            0x00003000UL        /* bits 13:12 */
#define RDES0_DESCRIPTOR_ERROR          (1 << 14)
#define RDES0_ERROR_SUMMARY             (1 << 15)
#define RDES0_FRAME_LENGTH_ISOLATE      0x3FFF0000Ul        /* bits 29:16 */
#define RDES0_FILTERING_FAIL            (1 << 30)
#define RDES0_OWN_BIT                   (1 << 31)

#define RDES1_END_OF_RING               (1 << 25)
#define RDES1_SECOND_ADDRESS_CHAINED    (1 << 24)


/* TX Values. */
#define TDES0_DEFERRED                  (1 << 0)
#define TDES0_UNDERFLOW_ERROR           (1 << 1)
#define TDES0_LINK_FAIL_REPORT          (1 << 2)
#define TDES0_COLLISION_COUNT_MASK      0x00000078UL        /* bits 6:3   */
#define TDES0_HEARTBEAT_FAIL            (1 << 7)
#define TDES0_EXCESSIVE_COLLISIONS      (1 << 8)
#define TDES0_LATE_COLLISION            (1 << 9)
#define TDES0_NO_CARRIER                (1 << 10)
#define TDES0_LOSS_OF_CARRIER           (1 << 11)
#define TDES0_TX_JABBER_TIMEOUT         (1 << 14)
#define TDES0_ERROR_SUMMARY             (1 << 15)
#define TDES0_OWN_BIT                   (1 << 31)

#define TDES1_BUFFER_1_SIZE_MASK        0x000003FFUL        /* bits 10:0  */
#define TDES1_DISABLED_PADDING          (1 << 23)
#define TDES1_SECOND_ADDRESS_CHAINED    (1 << 24)
#define TDES1_TRANSMIT_END_OF_RING      (1 << 25)
#define TDES1_ADD_CRC_DISABLE           (1 << 26)
#define TDES1_SETUP_PACKET              (1 << 27)
#define TDES1_FIRST_SEGMENT             (1 << 29)
#define TDES1_LAST_SEGMENT              (1 << 30)
#define TDES1_INTERRUPT_ON_COMPLETION   (1 << 31)
#define TDES1_PERFECT_FILTERING         0x00000000UL        /* bits 22 and 28 */
#define TDES1_HASH_FILTERING            (1 << 22)           /* bits 22 and 28 */
#define TDES1_INVERSE_FILTERING         (1 << 28)           /* bits 22 and 28 */
#define TDES1_HASH_ONLY_FILTERING       ((1 << 22) | (1 << 28)) /* bits 22 and 28 */
#define TDES1_FILTERING_CLEAR           (~((1 << 22) | (1 << 28))) /* bits 22 and 28 */
#define TDES1_COLLISIONS_ISOLATE        ((1 << 3) | (1 << 4) | \
                                        (1 << 5) | (1 << 6))


/* This structure is used to keep track of extended data that is required for
   each registered DEC21143 device. */
typedef struct _dec21143_xdata
{
    /* Declare the pointers to the TX and RX buffer descriptors. */
    DEC21143_DESCRIPTOR     *DEC21143_First_RX_Descriptor;
    DEC21143_DESCRIPTOR     *DEC21143_First_TX_Descriptor;

    DEC21143_DESCRIPTOR     *DEC21143_Current_RX_Descriptor;
    DEC21143_DESCRIPTOR     *DEC21143_Current_TX_Descriptor;

    DEC21143_DESCRIPTOR     *DEC21143_Previous_TX_Descriptor;

    /* Declare the pointers used during packet reception. */
    NET_BUFFER              *DEC21143_Buffer_Ptr;
    NET_BUFFER              *DEC21143_Work_Ptr;

    /* PCI Card ID. Used for accessing the card through the PCI
       config registers. */
    UINT32                  DEC21143_PCI_ID;

    /* Chip revision and a saved copy of CSR6 . */
    UINT32                  DEC21143_Saved_CSR6;
    UINT16                  DEC21143_Revision;

    /* Data size counters used during packet reception. */
    INT16                   DEC21143_Total_Data_Size;
    INT16                   DEC21143_Current_Data_Size;

    /* Receive errors. */
    UINT16                  DEC21143_CRC_Errors;
    UINT16                  DEC21143_Collisions_Seen;
    UINT16                  DEC21143_Frames_Too_Long;
    UINT16                  DEC21143_Runt_Frames;
    UINT16                  DEC21143_Descriptor_Errors;

    /* Transmit errors. */
    UINT16                  DEC21143_Underflows;
    UINT16                  DEC21143_Collisions;
    UINT16                  DEC21143_Excessive_Collisions;
    UINT16                  DEC21143_Late_Collisions;
    UINT16                  DEC21143_No_Carriers;
    UINT16                  DEC21143_Loss_Of_Carriers;
    UINT16                  DEC21143_TX_Jabber_Timeouts;

    /* Has the card been completly initialized? This is used when
       the link changes speed after initialization is done. */
    UINT8                   DEC21143_Init_Completed;

    /* Padding to keep everything word aligned. */
    UINT8                   pad0;


} DEC21143_XDATA;


/* Define the new macros for reading data from your Ethernet chip, and
   writing data to the Ethernet chip.
*/
UINT32  DEC_IO_Read_Reg(INT);
void    DEC_IO_Write_Reg(INT, UINT32);

#define OUTDW   DEC_IO_Write_Reg
#define INDW    DEC_IO_Read_Reg

#if defined(PROTECTED_MODE) && !defined(__BORLANDC__)
/*
 * Define the new macros for reading data from your Ethernet chip, and
 * writing data to the Ethernet chip.
 */

  extern UINT8 inp(INT);
  extern void outp(INT, UINT8);
  extern INT inport(INT);
  extern void outport(INT, INT);

  #define OUTB(offset, value)    outp ((INT16)offset, (UINT8)value)
  #define OUTW(offset, value)    outport ((INT16)offset, (INT16)value)
  #define INB(offset)            (UINT8)inp ((sshort)offset)
  #define INW(offset)            (ushort)inport ((ushort)offset)

#elif defined(PROTECTED_MODE) && defined(__BORLANDC__)
/*
 * Define the new macros for reading data from your Ethernet chip, and
 * writing data to the Ethernet chip.
 */
  #define OUTB(offset, value)    outp ((unsigned)offset, (INT)value)
  #define OUTW(offset, value)    outport ((INT)offset, (INT)value)
  #define INB(offset)            (UINT8)inp ((unsigned)offset)
  #define INW(offset)            (ushort)inport ((INT)offset)

  #define ASM   asm  /* Used for some inline assembly. */

#elif !defined(PROTECTED_MODE) && defined(__BORLANDC__)
/*
 * Define the new macros for reading data from your Ethernet chip, and
 * writing data to the Ethernet chip.
 */

  #define OUTB(offset, value)    outportb ((INT16)offset, (UINT8)value)
  #define OUTW(offset, value)    outport ((INT16)offset, (INT16)value)
  #define INB(offset)            (UINT8)inportb ((sshort)offset)
  #define INW(offset)            (ushort)inpw ((ushort)offset)

  #define ASM   asm  /* Used for some inline assembly. */

#elif defined (_MSC_VER) /* If Microsoft C is being used. */
/*
 * Define the new macros for reading data from your Ethernet chip, and
 * writing data to the Ethernet chip.
 */
  #define OUTW(offset, value)     (ushort)_outpw ((ushort)offset, (ushort)value)
  #define INW(offset)             (ushort)_inpw ((ushort)offset)
  #define OUTB(offset, value)     (sshort)_outp ((ushort)offset, (sshort)value)
  #define INB(offset)             (sshort)_inp ((ushort)offset)

  #define ASM    __asm   /* used for inline assembly. */

#endif /* Port macros */


/* -------------------- DEC21143 registers -------------------------- */

/* Define the offsets for all the configuration registers
   on the DEC21143 chip
*/
#define CFID    0x00
#define CFCS    0x04
#define CFRV    0x08
#define CFLT    0x0C
#define CBIO    0x10
#define CBMA    0x14
#define CCIS    0x28
#define CSID    0x2C
#define CBER    0x30
#define CCAP    0x34
#define CFIT    0x3C
#define CFDD    0x40
#define CWUA0   0x44
#define CWUA1   0x48
#define SOP0    0x4C
#define SOP1    0x50
#define CWUC    0x54
#define CCID    0xDC
#define CPMC    0xE0

/* Define the offsets for all the control and status registers
   on the DEC21143 chip
*/
#define CSR0    0x00

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕亚洲一区二区av在线 | 日本美女一区二区三区视频| 99re热视频这里只精品| 国产精品高潮呻吟| 不卡av电影在线播放| ㊣最新国产の精品bt伙计久久| 99国产精品一区| 一区二区三区免费| 欧美精品在线视频| 极品美女销魂一区二区三区| 久久久影视传媒| 99久久国产综合精品色伊| 亚洲女人小视频在线观看| 日本精品一区二区三区高清| 亚洲成人av免费| 中文字幕制服丝袜成人av| av一区二区久久| 亚洲午夜精品17c| 欧美xxxxxxxx| 成人aa视频在线观看| 亚洲图片欧美一区| 久久综合久色欧美综合狠狠| 99国产精品久| 视频一区视频二区在线观看| 久久久国产综合精品女国产盗摄| av亚洲产国偷v产偷v自拍| 视频一区视频二区在线观看| 国产校园另类小说区| 在线免费av一区| 国产麻豆午夜三级精品| 中文字幕av资源一区| 欧美在线free| 国产成人亚洲综合色影视| 又紧又大又爽精品一区二区| 日韩精品专区在线| 色哟哟一区二区| 国产一区久久久| 五月婷婷欧美视频| 国产精品国产三级国产三级人妇| 欧美巨大另类极品videosbest| 国产成人综合自拍| 日韩1区2区3区| 亚洲视频免费观看| 2020国产精品自拍| 欧美精品丝袜中出| 91亚洲永久精品| 国产一本一道久久香蕉| 日韩国产欧美三级| 亚洲图片另类小说| 久久久精品欧美丰满| 欧美一级高清大全免费观看| 色综合天天综合网国产成人综合天| 久久er精品视频| 午夜亚洲福利老司机| 亚洲欧美日韩国产手机在线| www国产成人| 日韩精品一区二区三区在线播放| 在线观看国产一区二区| www.av亚洲| 国产精品99久久久久久宅男| 久久99久久99小草精品免视看| 亚洲成人av一区| 亚洲一区二区在线观看视频| 日韩久久一区二区| 国产精品毛片久久久久久| 国产亚洲婷婷免费| 欧美电影免费观看完整版| 欧美精品视频www在线观看 | 蜜桃视频一区二区| 性久久久久久久久久久久| 亚洲少妇30p| 日韩一区欧美小说| 成人免费小视频| 中文字幕永久在线不卡| 国产精品色呦呦| 国产精品麻豆网站| 国产精品久久99| 国产精品麻豆欧美日韩ww| 国产精品视频九色porn| 中文字幕亚洲区| 自拍偷拍国产亚洲| 亚洲精品老司机| 亚洲妇熟xx妇色黄| 婷婷一区二区三区| 日本免费新一区视频| 九色综合狠狠综合久久| 久久国产成人午夜av影院| 经典三级视频一区| 成人午夜免费av| 亚洲1区2区3区视频| 午夜精品久久久久久久蜜桃app| 午夜精品久久久| 久久国产福利国产秒拍| 国产精品一区二区不卡| 不卡的电影网站| 91国产成人在线| 91精品国产手机| 久久久午夜精品| 自拍偷拍欧美激情| 亚洲国产日韩在线一区模特| 日韩高清欧美激情| 97成人超碰视| 欧美在线观看视频在线| 91精品国产色综合久久ai换脸| 精品国产乱码久久久久久蜜臀| 久久精品视频网| 洋洋av久久久久久久一区| 天天操天天综合网| 国产一区999| 在线免费观看日本欧美| 欧美一级夜夜爽| 国产精品高潮呻吟| 日本亚洲电影天堂| 成人av影院在线| 欧美日本在线看| 久久蜜桃一区二区| 亚洲精品一二三| 精东粉嫩av免费一区二区三区| av在线不卡观看免费观看| 69堂亚洲精品首页| 国产精品免费网站在线观看| 天涯成人国产亚洲精品一区av| 国产精品一区二区在线观看网站| 91蝌蚪porny成人天涯| 日韩欧美一卡二卡| 亚洲另类在线视频| 国产一区二区在线影院| 欧美中文字幕亚洲一区二区va在线 | 不卡一二三区首页| 欧美久久久久中文字幕| 欧美国产日产图区| 天天影视色香欲综合网老头| a美女胸又www黄视频久久| 欧美一级高清大全免费观看| 亚洲男女毛片无遮挡| 国产一区美女在线| 91精品国产91热久久久做人人| 日韩毛片在线免费观看| 经典三级视频一区| 欧美精品日韩一本| 亚洲欧美日韩一区二区三区在线观看 | 国产成人8x视频一区二区| 欧美日本在线一区| 樱桃视频在线观看一区| 国产99久久久国产精品免费看| 欧美肥胖老妇做爰| 亚洲激情中文1区| 成人免费高清在线观看| 久久伊人蜜桃av一区二区| 日韩精品一二区| 欧美视频三区在线播放| 亚洲人一二三区| 99国产精品久久久久| 亚洲国产精品传媒在线观看| 国产一区二区三区四区五区入口| 91精品国产手机| 日韩av网站免费在线| 欧美美女激情18p| 亚洲r级在线视频| 欧美三级三级三级| 一区二区三区四区精品在线视频 | kk眼镜猥琐国模调教系列一区二区 | av一区二区三区| 国产精品看片你懂得| 丁香婷婷综合色啪| 国产欧美一区二区精品仙草咪| 国产一区二区三区黄视频 | 国产麻豆精品95视频| 欧美va亚洲va| 经典三级一区二区| 久久一夜天堂av一区二区三区| 美女爽到高潮91| 日韩欧美国产高清| 国内精品国产成人国产三级粉色 | 欧美婷婷六月丁香综合色| 亚洲欧洲国产日本综合| 91浏览器入口在线观看| 亚洲男人电影天堂| 欧美私模裸体表演在线观看| 亚洲电影视频在线| 88在线观看91蜜桃国自产| 日本成人中文字幕在线视频| 日韩三级视频在线看| 国内精品免费在线观看| 中文av一区二区| 色视频欧美一区二区三区| 一区二区三区资源| 欧美精品免费视频| 黄色日韩网站视频| 国产精品女主播av| 欧美性videosxxxxx| 毛片av一区二区| 国产欧美一区二区三区沐欲| 色综合久久88色综合天天| 亚洲一区成人在线| 精品久久久久av影院| 成人aa视频在线观看| 视频在线在亚洲| 国产香蕉久久精品综合网| 色婷婷激情久久|