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

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

?? sngks32cend.c

?? 三星公司S3C4510B的VXWORKS操作系統(tǒng)下的BSP
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/* sngks32cEnd.c - Samsung KS32C END network interface driver *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01l,07may02,m_h  Handle PHY auto-negotiation (75464)01k,12feb02,m_h  Fix error rx Handling (74033) and polled mode (72979)01j,24jan02,m_h  frame length for PollSend01i,23jan02,m_h  incorrect frame length for WDB_COMM_END01h,17jan02,m_h  fix build warnings01g,30nov01,m_h  clean up warnings01f,27sep01,m_h  big endian support, volatile registers01e,23jul01,m_h  fix minor DRV_LOG warning01d,16jul01,m_h  fix slow ethernet by enabling DMA while processing rx01c,26apr01,m_h  convert tabs to spaces for readability, fixed warnings01b,25apr01,m_h  improve a few comments01a,12apr01,m_h  created from snds100 template.*//*DESCRIPTIONThis module implements the Enhanced Ethernet driver for Samsung's KS32C50100microcontroller.KS32C50100 is an ARM based processor with several integrated peripherals.It has an interrupt controller, two 32-bit timers, one Ethernet controller,two HDLC controllers, one IIC controller, general purpose I/O ports, and a2-channel DMA controller.The built-in Ethernet controller consists of 10/100 Ethernet MAC with MIIinterface to an external PHY device and a Buffered DMA controller fortransferring data to and from the memory.  The KS32C50100 has a Level OneLXT972 Ethernet PHY device that supports both 10Base-T and 100Base-TEthernet.All the internal registers of the Ethernet MAC and BDMA controller areaccessible as 32-bit integers at the internal system register addresses asdefined in the KS32C50100 Microcontroller User's Manual.  The registeraddresses are defined in sngks32cEnd.h include file.The driver requires several target-specific values provided as an inputstring to the load routine.  These target-specific values and the externalsupport routines are described below.This network interface driver does not include support for trailer protocolsor data chaining.This driver maintains cache coherency by setting the Address bit 26 (A26) ofdescriptor and buffer addresses.  KS32C50100 accesses all memory locationswith A26 set in a non-cached mode.  However, A26 is not used for accessingthe memory.  See the KS32C50100 Microcontroller User's Manual for details.BOARD LAYOUTThis device is on-chip with the CPU.  No jumpering diagram is necessary.EXTERNAL INTERFACEThis driver provides the standard END external interface.  The only externalinterface is the sngks32cEndLoad() routine.  The parameters are passedinto the sngks32cEndLoad() function as a single colon-delimited string.The sngks32cEndLoad() function uses strtok() to parse the string, which itexpects to be of the following format:<unit>:<speed>:<duplex>:<autoneg>TARGET-SPECIFIC PARAMETERS\ml\m <unit>A convenient holdover from similar END drivers.  This parameter is used onlyin the string name for the driver.  Value must be 0\m <speed>Indicates the desired network speed.  Valid values are 10 and 100.  Thisparameter is ignored if auto-negotiation is enabled.  See below.\m <duplex>Indicates the desired duplex mode of operation.  A value 1 indicates full-duplex and a value 0 indicated half duplex.  This parameter is ignored ifauto-negotiation is enabled.\m <auto-neg>Indicates whether auto-negotiation has to be enabled or not.  A value of 1indicates that auto-negotiation should be enabled.  A value of 0 indicatesthat it should be disabled.  If auto-negotiation is enabled, the speed andduplex values are ignored.\meSYSTEM RESOURCE USAGEThis driver requires the following system resources:\ml\m 1.one mutual exclusion semaphore\m 2.four interrupt vectors\meThe driver allocates the memory to share with the Ethernet device unit.It does so by calling the calloc() routine.  As a default, 64 transmitdescriptors (size=16 bytes), 64 transmit buffers (size=END_BUFSIZ), and64 receive descriptors (size=16 bytes) are allocated.  TX_FD_NUM and RX_FD_NUMmacros define the number of descriptors allocated.As a default, 128 MBLK structures, 128 CLBLK structures and 128 clusters(size=2048) are allocated in the net pool.  END_MBLK_NUM and END_CL_NUMmacros define the number of structures allocated.The macros SYS_INT_CONNECT, SYS_INT_DISCONNECT, and SYS_INT_ENABLE allowthe driver to be customized for BSPs that use special versions of theseroutines.The macro SYS_INT_CONNECT is used to connect the interrupt handler tothe appropriate vector.  By default it is the routine intConnect().The macro SYS_INT_DISCONNECT is used to disconnect the interrupt handler priorto unloading the module.  By default this is a dummy routine thatreturns OK.The macro SYS_INT_ENABLE is used to enable the interrupt level for theend device.  It is called once during initialization.  By default this isthe routine intEnable().The macro SYS_ENET_ADDR_GET is used to get the ethernet address (MAC)for the device.  The single argument to this routine is the END_DEVICEpointer.  By default this routine copies the ethernet address stored inthe global variable sysSngks32cMacAddr defined by the BSP into the END_DEVICE structure.  The global variable has to be changed for changingthe MAC address of the Ethernet port.SPECIAL CONSIDERATIONThe MAC address of Ethernet port is hard-coded in the global array namedsysSngks32cMacAddr defined by the BSP.The internal registers of MAC and BDMA controllers in the KS32C50100microcontroller are accessible as 32-bit integers at pre-defined addresslocations.  Hence separate macros are not provided for register accesses.All through the driver code, these registers are accessed directly.INCLUDES:end.h endLib.h etherMultiLib.h sngks32cEnd.hSEE ALSO: muxLib, endLib<Writing an Enhanced Network Driver><Samsung KS32C50100 User's Manual>*//* includes */#include "vxWorks.h"#include "etherMultiLib.h"     /* multicast stuff. */#include "end.h"               /* Common END structures. */#include "endLib.h"#include "lstLib.h"            /* Needed to maintain protocol list. */#include "cacheLib.h"#include "stdlib.h"#include "stdio.h"#include "intLib.h"#include "sysLib.h"#include "logLib.h"#include "iv.h"#include "netLib.h"#include "wdLib.h"#include "private/funcBindP.h"#include "sngks32cEnd.h"            /* defines *//* Define this for better handling of auto-negotiation of the PHY */#define DYNAMIC_PHY/* define if you want to disable rx DMA while this driver is processing data */#undef NO_DMA_WHILE_PROCESSING/* debugging: Input is hooked up to the output.  Data never goes out to the* cable*/#undef LOOPBACK_DEBUG/* Driver debug control */#undef DRV_DEBUG_SNGKS32C/* Driver debug control */#ifdef DRV_DEBUG_SNGKS32C#define DRV_DEBUG_OFF       0x0000#define DRV_DEBUG_RX        0x0001#define DRV_DEBUG_TX        0x0002#define DRV_DEBUG_POLL_RX   0x0004#define DRV_DEBUG_POLL_TX   0x0008#define DRV_DEBUG_POLL      (DRV_DEBUG_POLL_RX | DRV_DEBUG_POLL_TX)#define DRV_DEBUG_LOAD      0x0010#define DRV_DEBUG_IOCTL     0x0020#define DRV_DEBUG_INT       0x0040#define DRV_DEBUG_START     0x0080#define DRV_DEBUG_DUMP      0x0100#define DRV_DEBUG_RX_ALL    0x0200#define DRV_DEBUG_ALL       0xffffint    sngks32cDebug = DRV_DEBUG_IOCTL | DRV_DEBUG_INT | DRV_DEBUG_RX | \            DRV_DEBUG_LOAD | DRV_DEBUG_START | DRV_DEBUG_RX | DRV_DEBUG_POLL;#define DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6)                   \    do {                                                           \      if (sngks32cDebug & FLG)                                     \        if (_func_logMsg != NULL)                                  \          _func_logMsg (X0, (int)X1, (int)X2, (int)X3, (int)X4,    \                (int)X5, (int)X6);                                 \    } while (0)#define DRV_PRINT(FLG, X)               \    do {                                \      if (sngks32cDebug & FLG)          \        printf X;                       \    } while (0)#else /* DRV_DEBUG_SNGKS32C */#define DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6)#define DRV_PRINT(FLG, X)#endif /* DRV_DEBUGSNGKS32C */#define END_SPEED            10000000#define SNGKS32C_CL_SIZE     2048#define RX_FD_NUM            64#define TX_FD_NUM            64#define LS_POLLING           0x20/* You must define BUG_KS32C5000 to support original KS32C5000 version* of the chip.  This original version had a couple of bugs in the silicon.* Software workarounds will be implemented if this define is enabled.* Note: The workaround has not been tested.  See Samsung application notes* for more information.*/#undef BUG_KS32C5000/* avoid compilation warnings -- I implemented functions which may be useful* for future versions of this driver.  But, to avoid compiler warnings,* I've commented out the function definition (with #ifdef) since I don't* actually use them now.*/#undef NOT_USED_HERE/** Default macro definitions for BSP interface.* These macros can be redefined in a wrapper file, to generate* a new module with an optimized interface.*//* Cache macros */#define SNGKS32C_NON_CACHE_REGION    0x4000000#define END_CACHE_INVALIDATE(address, len) \        CACHE_DRV_INVALIDATE (pDrvCtrl->cacheFuncs, (UINT32)(address), (len))#define END_CACHE_PHYS_TO_VIRT(address) \        (void *)((UINT32)(address) & ~SNGKS32C_NON_CACHE_REGION)#define END_CACHE_VIRT_TO_PHYS(address) \        (void *)((UINT32)(address) | SNGKS32C_NON_CACHE_REGION)/* Macro to connect interrupt handler to vector */#ifndef SYS_INT_CONNECT#   define SYS_INT_CONNECT(pDrvCtrl,rtn,arg,pResult) \    { \    IMPORT STATUS sysIntConnect(); \    *pResult = intConnect ((VOIDFUNCPTR *)INUM_TO_IVEC (pDrvCtrl->ivec), \                 rtn, (int)arg); \    }#endif/* Macro to disconnect interrupt handler from vector */#ifndef SYS_INT_DISCONNECT#   define SYS_INT_DISCONNECT(pDrvCtrl,rtn,arg,pResult) \    { \    *pResult = OK; /* HELP: need a real routine */ \    }#endif/* Macro to enable the appropriate interrupt level */#ifndef SYS_INT_ENABLE#define SYS_INT_ENABLE(pDrvCtrl) \    { \    IMPORT void sysLanIntEnable(); \    sysLanIntEnable (pDrvCtrl->ilevel); \    }#endif/* Macro to get the ethernet address from the BSP */#ifndef SYS_ENET_ADDR_GET#   define SYS_ENET_ADDR_GET(pDevice) \    { \    IMPORT unsigned char sysSngks32cMacAddr[]; \    bcopy ((char *)sysSngks32cMacAddr, (char *)(&pDevice->enetAddr), 6); \    }#endif/* * Macros to do a short (UINT16) access to the chip. Default * assumes a normal memory mapped device. */#ifndef SNGKS32C_OUT_SHORT#   define SNGKS32C_OUT_SHORT(pDrvCtrl,addr,value) \    (*(USHORT *)addr = value)#endif#ifndef SNGKS32C_IN_SHORT#   define SNGKS32C_IN_SHORT(pDrvCtrl,addr,pData) \    (*pData = *addr)#endif#ifndef SNGKS32C_OUT_LONG#   define SNGKS32C_OUT_LONG(pDrvCtrl,addr,value) \    (*(UINT32 *)addr = value)#endif#ifndef SNGKS32C_IN_LONG#   define SNGKS32C_IN_LONG(pDrvCtrl,addr,pData) \    (*pData = *addr)#endif/*A shortcut for getting the hardware address from the MIB II stuff. */#define END_HADDR(pEnd)    \        ((pEnd)->mib2Tbl.ifPhysAddress.phyAddress)#define END_HADDR_LEN(pEnd) \        ((pEnd)->mib2Tbl.ifPhysAddress.addrLength)/* globals*//* * This will only work if there is only a single unit, for multiple * unit device drivers these should be integrated into the END_DEVICE * structure. */M_CL_CONFIG endMclConfig =     /* network mbuf configuration table */    {    /*    no. mBlks        no. clBlks        memArea        memSize    -----------      ----------        -------        -------    */    0,               0,                 NULL,         0    };CL_DESC endClDescTbl [] =     /* network cluster pool configuration table */    {    /*    clusterSize          num        memArea      memSize    -----------          ----       -------      -------    */    {SNGKS32C_CL_SIZE,    0,        NULL,        0}    };int endClDescTblNumEnt = (NELEMENTS(endClDescTbl));/* new additions */#ifdef BUG_KS32C5000UINT32                   gStatusLengthPrevious;            /* For bug fix */BOOL                     gBugFixDone = FALSE;#endif /*BUG_KS32C5000*//* Definitions for the flags field */#define END_PROMISCUOUS_FLAG    0x1#define END_RCV_HANDLING_FLAG   0x2#define END_MBLK_NUM            128#define END_CL_NUM              128#define SNGKS32C_DATA_OFFSET      2#define SNGKS32C_MAX_MULTI       20#ifdef DYNAMIC_PHY/* PHY STATUS2 register definitions */#define PHY_STATUS2_REG  17#define PHYSTAT2_100MB   0x4000#define PHYSTAT2_FULLDUP 0x0200#define PHYSTAT2_AUTONEG 0x0100/* This WDOG is used to poll the PHY for any changes since the FULL_DUPLEX   bit in MACCON must be synched with the full fuplex status of the PHY.   (This was found after very long and tedious investigations (<-understatement))   */#define PHY_WDOG_PERIOD (sysClkRateGet()*30) /* 30 secs period */WDOG_ID              phyPollWdog=NULL;LOCAL void           phyPoll(int dummy);#endif /*DYNAMIC_PHY*//* DEBUG MACROS */#undef DEBUG#ifdef DEBUG#include "nvLogLib.h"            /* Needed to debug polled mode.  */int endDebug = 1;#define ENDLOGMSG(x) \    if (endDebug) \        { \        logMsg x; \        }#else#define ENDLOGMSG(x)#endif /* ENDDEBUG *//* LOCALS */extern CACHE_FUNCS   sngks32cCacheFuncs;/* IMPORTS */IMPORT int endMultiLstCnt (END_OBJ *);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
热久久久久久久| 五月激情丁香一区二区三区| 欧美视频完全免费看| 视频一区视频二区中文| 国产精品天美传媒沈樵| 欧美蜜桃一区二区三区| 国产成人综合网| 日本美女一区二区| 亚洲黄色性网站| 国产欧美日本一区二区三区| 欧美精品18+| 91丨九色丨黑人外教| 精品一区二区在线观看| 亚洲国产日韩a在线播放| 国产精品视频在线看| 日韩欧美的一区二区| 在线日韩国产精品| av资源站一区| 国产成人精品aa毛片| 日本成人在线一区| 亚洲国产精品久久人人爱蜜臀| 国产视频一区二区在线| 日韩亚洲欧美成人一区| 在线观看亚洲精品视频| 91女厕偷拍女厕偷拍高清| 国产精品夜夜爽| 久久电影网电视剧免费观看| 视频一区二区不卡| 亚洲国产日韩一级| 亚洲自拍偷拍麻豆| 亚洲欧美偷拍三级| 亚洲三级理论片| 国产精品久久久久婷婷| 久久精品免视看| 精品国产一区二区三区不卡| 欧美一二三区精品| 欧美一区二区成人6969| 777亚洲妇女| 欧美精品国产精品| 欧美精品一二三| 这里只有精品电影| 91精品啪在线观看国产60岁| 欧美二区三区91| 91精品婷婷国产综合久久竹菊| 69久久99精品久久久久婷婷 | 亚洲免费av网站| 国产精品久99| 亚洲视频综合在线| 一区二区在线观看免费| 一区二区三区不卡在线观看 | 欧美一二区视频| 日韩美女视频一区二区在线观看| 91精品国产综合久久久久久久| 制服视频三区第一页精品| 7777精品伊人久久久大香线蕉 | 韩国成人在线视频| 国产伦精品一区二区三区免费| 国产毛片精品国产一区二区三区| 国产福利一区二区三区| 成人午夜视频在线| 色欧美日韩亚洲| 欧美老肥妇做.爰bbww视频| 日韩一区二区免费视频| 久久久久久麻豆| 综合久久久久久久| 午夜av一区二区| 毛片一区二区三区| 国产不卡视频一区| 在线看日韩精品电影| 日韩一区二区三区三四区视频在线观看| 欧美mv日韩mv国产| 国产精品污www在线观看| 亚洲一区精品在线| 蜜桃视频免费观看一区| 丁香婷婷综合五月| 欧美三级电影网站| 亚洲精品一区二区精华| 国产精品福利电影一区二区三区四区| 亚洲嫩草精品久久| 日本特黄久久久高潮| 国产suv一区二区三区88区| 色综合天天天天做夜夜夜夜做| 欧美日韩精品二区第二页| 精品伦理精品一区| 中文字幕制服丝袜一区二区三区| 亚洲午夜视频在线| 国产精品一二三四区| 欧美在线一二三| 久久婷婷国产综合精品青草| 1000精品久久久久久久久| 视频一区二区欧美| 91小视频在线观看| 日韩一级大片在线| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲精品伦理在线| 九九国产精品视频| 在线观看亚洲a| 国产日产欧美一区二区视频| 午夜欧美2019年伦理| 福利电影一区二区| 欧美另类z0zxhd电影| 亚洲欧美日韩国产综合在线| 久久精品理论片| 欧美亚洲国产一区在线观看网站| 欧美tk丨vk视频| 丝袜美腿亚洲综合| 91麻豆国产香蕉久久精品| 精品国产一区二区在线观看| 亚洲国产精品影院| 99国产精品久| 久久这里只有精品视频网| 五月天激情综合| 色悠悠久久综合| 国产精品初高中害羞小美女文| 老司机精品视频在线| 欧美丝袜自拍制服另类| 中文字幕制服丝袜成人av| 久久99精品国产91久久来源| 欧美日韩一区二区在线观看视频| 自拍偷拍亚洲激情| www.久久久久久久久| 久久精品人人做人人爽人人| 美女看a上一区| 在线不卡的av| 视频在线观看国产精品| 欧美三级电影网| 一区二区在线观看不卡| www.亚洲激情.com| 中文字幕在线不卡一区二区三区| 国产麻豆91精品| 国产视频不卡一区| 国产福利精品一区| 国产亚洲午夜高清国产拍精品| 久久国产婷婷国产香蕉| 日韩一级欧美一级| 激情文学综合丁香| 精品欧美久久久| 精一区二区三区| 精品999在线播放| 精品午夜久久福利影院| 精品久久久久久久久久久久包黑料| 男女视频一区二区| 欧美大黄免费观看| 激情综合网激情| 久久嫩草精品久久久精品| 国产99久久久久久免费看农村| 久久久精品国产免大香伊| 国产成人在线观看| 中文字幕不卡一区| 92精品国产成人观看免费| 亚洲美女免费视频| 欧美亚洲国产bt| 免播放器亚洲一区| 久久综合色婷婷| 国产二区国产一区在线观看| 欧美国产日韩亚洲一区| 色综合久久99| 日韩国产精品91| 精品国产99国产精品| 国产福利一区二区三区| 国产精品久久久久久亚洲毛片| 成人动漫av在线| 亚洲欧美aⅴ...| 777奇米四色成人影色区| 国产乱子伦视频一区二区三区| 中文在线一区二区| 色老综合老女人久久久| 亚洲电影视频在线| 26uuu久久天堂性欧美| 9人人澡人人爽人人精品| 一区二区三区在线免费| 在线播放/欧美激情| 激情成人午夜视频| 1区2区3区精品视频| 欧美三级中文字幕| 国精产品一区一区三区mba视频| 国产精品美女www爽爽爽| 在线观看一区日韩| 国产美女久久久久| 亚洲一区二区三区在线看| 精品久久久久久久久久久久久久久久久| 成人午夜视频在线观看| 午夜精品久久久久影视| 久久综合色之久久综合| 在线欧美日韩国产| 国产一区二区三区最好精华液| 国产精品久久久久久久久动漫| 欧美日韩久久一区| 国产成人精品1024| 日韩国产在线一| 国产精品久久久久久久岛一牛影视 | 五月婷婷另类国产| 中文字幕第一区| 欧美一区二区三区啪啪| 不卡av电影在线播放| 男男视频亚洲欧美| 国产精品成人免费| 精品欧美久久久| 欧美老肥妇做.爰bbww视频| 99re在线精品|