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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sngks32cend.c

?? Vxworks下BSP源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* sngks32cEnd.c - Samsung KS32C END network interface driver *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01a,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"            #include "vmLib.h"LOCAL void at91cEndPIOConfig();/* defines *//* Define this for better handling of auto-negotiation of the PHY */#undef 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_AT91C#undef DRV_DEBUG_AT91C/* Driver debug control */#ifdef DRV_DEBUG_AT91C#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    at91cDebug = DRV_DEBUG_IOCTL | DRV_DEBUG_INT | DRV_DEBUG_RX | \            DRV_DEBUG_LOAD | DRV_DEBUG_START | DRV_DEBUG_RX | DRV_DEBUG_POLL;#undef DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6)                   \    do {                                                           \      if (at91cDebug & FLG)                                     \         logMsg (X0, (int)X1, (int)X2, (int)X3, (int)X4,    \                (int)X5, (int)X6);                                 \    } while (0)#define DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6)                   \    do {                                                           \      if (at91cDebug & 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 (at91cDebug & FLG)          \        printf X;                       \    } while (0)#else /* DRV_DEBUG_AT91C */#define DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6)#define DRV_PRINT(FLG, X)#endif /* DRV_DEBUGAT91C */#define END_SPEED            10000000#define AT91C_CL_SIZE     2048#define RX_FD_NUM            64#define TX_FD_NUM            64#define LS_POLLING           0x20/* 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.*/#if 0/* Cache macros */#define AT91C_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) & ~AT91C_NON_CACHE_REGION)#define END_CACHE_VIRT_TO_PHYS(address) \        (void *)((UINT32)(address) | AT91C_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#endif/* Macro to get the ethernet address from the BSP */#ifndef SYS_ENET_ADDR_GET#   define SYS_ENET_ADDR_GET(pDevice) \    { \    IMPORT unsigned char sysAt91cMacAddr[]; \    bcopy ((char *)sysAt91cMacAddr, (char *)(&pDevice->enetAddr[0]), 6); \    }#endif#if 0/* * Macros to do a short (UINT16) access to the chip. Default * assumes a normal memory mapped device. */#ifndef AT91C_OUT_SHORT#   define AT91C_OUT_SHORT(pDrvCtrl,addr,value) \    (*(USHORT *)addr = value)#endif#ifndef AT91C_IN_SHORT#   define AT91C_IN_SHORT(pDrvCtrl,addr,pData) \    (*pData = *addr)#endif#ifndef AT91C_OUT_LONG#   define AT91C_OUT_LONG(pDrvCtrl,addr,value) \    (*(UINT32 *)addr = value)#endif#ifndef AT91C_IN_LONG#   define AT91C_IN_LONG(pDrvCtrl,addr,pData) \    (*pData = *addr)#endif#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    -----------          ----       -------      -------    */    {AT91C_CL_SIZE,    0,        NULL,        0}    };int endClDescTblNumEnt = (NELEMENTS(endClDescTbl));/* new additions *//* 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 AT91C_DATA_OFFSET      2/*#define AT91C_MAX_MULTI       20*/#define AT91C_MAX_MULTI       3#undef DYNAMIC_PHY/* PHY DSCSR register definitions */#define PHY_DSCSR_REG  17/*#define PHYSTAT2_100MB   0x4000#define PHYSTAT2_FULLDUP 0x0200#define PHYSTAT2_AUTONEG 0x0100*/#define FDX_100MB		0x8000#define HDX_100MB		0x4000#define FDX_10MB		0x2000#define HDX_10MB		0x1000#define FDX	(FDX_100MB + FDX_10MB)/* 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); /*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   at91cCacheFuncs;/* IMPORTS */IMPORT int endMultiLstCnt (END_OBJ *);/* forward static functions */LOCAL void      at91cEndReset         (END_DEVICE *pDrvCtrl);LOCAL STATUS    at91cEndStart         (END_DEVICE *pDrvCtrl);#if 0LOCAL void      at91cEndBdmaRxInt     (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndBdmaTxInt     (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndMacRxInt      (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndMacTxInt      (END_DEVICE *pDrvCtrl);#endifLOCAL void 	  at91cEndInt	(END_DEVICE *pDrvCtrl);LOCAL void      at91cEndMacRxInt      (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndMacTxInt      (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndHandleRcvInt  (END_DEVICE *pDrvCtrl);/*, UINT32 stat);*/LOCAL STATUS    at91cEndRecv          (END_DEVICE *pDrvCtrl,                                                    RECEIVE_BUF_DESC *pRxD);LOCAL void      at91cEndConfig        (END_DEVICE *pDrvCtrl);#undef DYNAMIC_PHYLOCAL UINT32    at91cEndPhyRead       (UINT32 phyRegAddr, UINT32 phyAddr); /* DYNAMIC_PHY */LOCAL void      at91cEndPhyWrite      (UINT32 phyRegAddr, UINT32 phyAddr,                                                   UINT32 phyData);LOCAL void      at91cEndMacInitialize (END_DEVICE *pDevice);LOCAL STATUS    at91cEndFdInitialize  (END_DEVICE *pDrvCrtl);LOCAL void      at91cEndFdFree        (END_DEVICE *pDrvCtrl);LOCAL void      at91cEndAddrFilterSet (END_DEVICE *pDrvCtrl);/* END Specific interfaces. *//* This is the only externally visible interface. */END_OBJ*     at91cEndLoad (char* initString);LOCAL STATUS    at91cEndStart        (END_DEVICE* pDrvCtrl);LOCAL STATUS    at91cEndStop         (END_DEVICE* pDrvCtrl);LOCAL STATUS    at91cEndUnload       ();LOCAL int       at91cEndIoctl        (END_DEVICE* pDrvCtrl, int cmd,                                             caddr_t data);LOCAL STATUS    at91cEndSend         (END_DEVICE* pDrvCtrl, M_BLK_ID pBuf);              LOCAL STATUS    at91cEndMCastAdd     (END_DEVICE* pDrvCtrl, char* pAddress);LOCAL STATUS    at91cEndMCastDel     (END_DEVICE* pDrvCtrl, char* pAddress);LOCAL STATUS    at91cEndMCastGet     (END_DEVICE* pDrvCtrl,                                                MULTI_TABLE* pTable);LOCAL STATUS    at91cEndPollSend     (END_DEVICE* pDrvCtrl, M_BLK_ID pBuf);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本中文字幕不卡| 成人一级片在线观看| 国产精品一区在线观看乱码 | 久久久久久亚洲综合影院红桃| 国产精品少妇自拍| 另类小说欧美激情| 91网址在线看| 国产婷婷色一区二区三区| 午夜电影网一区| 91在线视频播放地址| 久久品道一品道久久精品| 午夜精品视频一区| 成人av资源下载| 精品粉嫩aⅴ一区二区三区四区 | 欧美日韩高清在线播放| 国产精品久久久久永久免费观看| 蜜桃视频一区二区| 欧美一级理论片| 一个色妞综合视频在线观看| 国产99久久久精品| 久久久综合网站| 国模套图日韩精品一区二区| 91精品久久久久久久久99蜜臂| 亚洲图片你懂的| 91丝袜国产在线播放| 国产精品萝li| 成人免费毛片片v| 国产人成亚洲第一网站在线播放 | 亚洲123区在线观看| 色综合久久天天综合网| 国产精品色呦呦| 99视频热这里只有精品免费| 久久久国际精品| 国产精品夜夜嗨| 国产亚洲一二三区| 成人午夜又粗又硬又大| 久久久高清一区二区三区| 国产精品99久久久久| 国产亚洲综合在线| 国产成人精品三级麻豆| 一区免费观看视频| 91色乱码一区二区三区| 亚洲精品欧美在线| 欧美日韩视频第一区| 亚洲国产日韩精品| 日韩三级免费观看| 国产麻豆成人传媒免费观看| 中文字幕二三区不卡| 91免费看视频| 亚洲午夜视频在线| 日韩欧美色电影| 国产成人精品一区二区三区四区 | 色狠狠色狠狠综合| 亚州成人在线电影| 亚洲精品一区二区三区影院| 国产一区欧美一区| 中文字幕一区免费在线观看| 日本黄色一区二区| 另类小说图片综合网| 国产精品欧美精品| 欧美日韩一区二区不卡| 久久国产精品色婷婷| 欧美激情一区二区三区在线| 91蜜桃在线观看| 天堂成人国产精品一区| 国产视频一区二区三区在线观看| 色综合天天做天天爱| 亚洲第一久久影院| 久久久精品欧美丰满| 欧美中文字幕不卡| 久久精品国内一区二区三区| 1区2区3区欧美| 日韩欧美资源站| 丁香婷婷深情五月亚洲| 亚洲第一av色| 国产农村妇女精品| 91精品国模一区二区三区| 高清av一区二区| 日韩高清不卡一区二区三区| 国产精品视频一二三区| 日韩久久精品一区| 欧美无人高清视频在线观看| 国产一区二区三区高清播放| 亚洲一区二区三区四区不卡| 久久久不卡网国产精品二区| 欧美日韩国产精品成人| 99国产精品国产精品毛片| 久久se这里有精品| 午夜精彩视频在线观看不卡| 中文字幕精品在线不卡| 久久综合国产精品| 欧美一区二区三区成人| 在线观看视频91| 99精品视频在线免费观看| 国产麻豆午夜三级精品| 青青草97国产精品免费观看| 亚洲美女一区二区三区| 国产精品久久久久一区| 久久九九久精品国产免费直播| 3atv一区二区三区| 欧美日韩一区二区三区在线| 色婷婷一区二区| 国产成人h网站| 午夜欧美大尺度福利影院在线看| 国产精品国产三级国产普通话三级 | 99久久99久久综合| 国产sm精品调教视频网站| 久久99久久99| 黄网站免费久久| 久88久久88久久久| 久久99这里只有精品| 久久精品av麻豆的观看方式| 日韩av中文在线观看| 首页综合国产亚洲丝袜| 丝袜美腿高跟呻吟高潮一区| 亚洲国产成人av网| 日韩国产成人精品| 免费成人深夜小野草| 奇米精品一区二区三区在线观看 | 99精品黄色片免费大全| 波多野结衣中文一区| 成人高清视频在线观看| www.欧美日韩国产在线| 99久久国产免费看| 欧美伊人久久久久久久久影院| 在线观看不卡视频| 欧美影院一区二区三区| 欧美电影一区二区| 日韩美女在线视频| 国产日韩欧美麻豆| 亚洲欧美在线aaa| 一区二区三区蜜桃| 日韩高清不卡在线| 韩国中文字幕2020精品| 国产精品影视天天线| 99久久久无码国产精品| 91原创在线视频| 91精品中文字幕一区二区三区| 欧美成人a视频| 国产精品丝袜黑色高跟| 偷拍亚洲欧洲综合| 韩国精品一区二区| 一道本成人在线| 日韩精品一区二区三区在线播放| 欧美精品一区二区在线播放| 国产精品久久久久一区| 午夜电影网亚洲视频| 国产一区二区不卡| 91丨porny丨户外露出| 欧美一区二区三区婷婷月色| 久久免费国产精品| 日韩av二区在线播放| 久久精品国产秦先生| www.av亚洲| 欧美成人在线直播| 亚洲男人电影天堂| 久久av中文字幕片| 欧洲一区二区三区免费视频| 欧美大片国产精品| 夜夜亚洲天天久久| 国产一区二区精品久久| 欧美午夜片在线观看| 国产亚洲综合色| 美女一区二区久久| 91精品办公室少妇高潮对白| 精品国产污污免费网站入口| 亚洲人成网站色在线观看| 美女视频第一区二区三区免费观看网站| 国产·精品毛片| 精品国内二区三区| 亚洲sss视频在线视频| av亚洲精华国产精华| 制服丝袜中文字幕一区| 亚洲人成精品久久久久久| 国内成+人亚洲+欧美+综合在线| 在线免费亚洲电影| 国产精品每日更新在线播放网址 | 91影视在线播放| 国产亚洲1区2区3区| 美国毛片一区二区三区| 在线观看国产精品网站| 亚洲日本在线天堂| 成人免费黄色大片| 国产亚洲一区二区三区四区| 日韩中文字幕一区二区三区| 91毛片在线观看| 亚洲欧洲成人自拍| a美女胸又www黄视频久久| 久久嫩草精品久久久精品一| 蜜桃av噜噜一区二区三区小说| 欧美日韩一区二区三区四区五区| 亚洲精品一二三| 色狠狠桃花综合| 夜夜精品视频一区二区| www.欧美日韩| 亚洲视频免费看| 欧美亚洲高清一区二区三区不卡| 亚洲天堂成人在线观看| 97久久精品人人做人人爽50路| 国产精品视频yy9299一区|