亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久一区二区三区国产精品| 在线视频欧美精品| 色综合久久久网| 精品av久久707| 26uuu色噜噜精品一区二区| 日韩免费电影网站| 国产福利一区在线| 男女男精品网站| 麻豆成人久久精品二区三区红| 国产精品美女久久久久久久| 日本一区二区三区高清不卡| 亚洲高清免费观看| 国产91对白在线观看九色| 欧美性xxxxxx少妇| 色偷偷一区二区三区| 一区二区三区免费网站| 日韩女同互慰一区二区| 欧美精品精品一区| 97精品久久久久中文字幕| 国产真实乱偷精品视频免| 蜜桃精品在线观看| 麻豆成人av在线| 婷婷六月综合亚洲| 日韩中文字幕1| 国产一区二区三区日韩| 国产欧美久久久精品影院| 视频一区国产视频| 欧美精品一区二| 久久成人精品无人区| 国产精品久久久久永久免费观看 | 亚洲综合丁香婷婷六月香| 91麻豆高清视频| 国产成人在线免费| 国产精品18久久久久久久久久久久| 久久国产精品色婷婷| 午夜精品福利一区二区三区av| 一区二区三区欧美亚洲| 一区二区三区中文字幕| 亚洲曰韩产成在线| 日韩中文字幕1| 亚洲一区在线视频观看| 麻豆精品在线看| 日本成人在线不卡视频| 蜜桃精品在线观看| 国产精品乱码人人做人人爱| 91在线无精精品入口| 国产一区二区三区在线观看免费| 亚洲欧美日韩中文播放| 日韩三级视频在线看| 色综合视频在线观看| 色哟哟一区二区三区| 欧美成人官网二区| 欧美一区二区三区不卡| 欧美日韩mp4| 丁香啪啪综合成人亚洲小说| 国产馆精品极品| 国产伦精品一区二区三区免费迷| 日韩电影一区二区三区| 亚洲欧美日韩在线| 欧美—级在线免费片| 国产农村妇女精品| 久久久五月婷婷| 欧美成人r级一区二区三区| xfplay精品久久| 亚洲在线视频一区| 中文字幕一区二区三区av| 国产欧美精品在线观看| 亚洲人精品一区| 一区二区在线观看免费| 午夜一区二区三区视频| 国产麻豆午夜三级精品| 99国产精品久久久| 欧美一区二区三区在线电影| **性色生活片久久毛片| 中文字幕国产精品一区二区| 视频精品一区二区| 一区二区三区在线高清| 久久99久久精品| 色偷偷久久人人79超碰人人澡| 丁香天五香天堂综合| 在线免费不卡电影| 日韩欧美美女一区二区三区| 一区二区三区美女| 91亚洲精品乱码久久久久久蜜桃| 日韩国产在线观看| 国产精品国产三级国产普通话99| 久久99精品久久久| 五月激情丁香一区二区三区| 亚洲第一av色| 五月天中文字幕一区二区| 国产精品伦一区| 久久午夜老司机| 成人爽a毛片一区二区免费| 精品国产一区二区国模嫣然| 国产91对白在线观看九色| 亚洲欧美激情小说另类| 欧美亚洲图片小说| 国产在线播精品第三| 亚洲日本青草视频在线怡红院| 日韩欧美在线网站| 亚洲国产精品成人综合| 欧美午夜电影网| k8久久久一区二区三区| 日韩国产精品久久久| 成人午夜看片网址| 欧美不卡一区二区三区四区| 精品亚洲porn| 亚洲色图在线视频| 久久女同精品一区二区| 成人综合在线观看| 三级欧美在线一区| ㊣最新国产の精品bt伙计久久| 91精品久久久久久久99蜜桃| 91免费国产视频网站| 日本伊人色综合网| 亚洲国产精品二十页| 91精品国产色综合久久不卡蜜臀 | 青椒成人免费视频| 欧美变态口味重另类| 在线观看成人免费视频| 免费一级片91| 视频一区国产视频| 亚洲成va人在线观看| 国产精品久久一级| 日韩欧美三级在线| 欧美性猛交xxxx黑人交| 粉嫩久久99精品久久久久久夜| 亚洲欧美一区二区三区极速播放 | 国产精品一区二区久激情瑜伽| 精品少妇一区二区三区| 97久久精品人人做人人爽50路| 另类小说色综合网站| 欧美激情中文字幕| 在线不卡欧美精品一区二区三区| 91在线porny国产在线看| 亚洲电影在线播放| 国产精品你懂的在线欣赏| 99精品国产热久久91蜜凸| 精品一区二区三区久久久| 蜜臀av国产精品久久久久| 亚洲国产日韩综合久久精品| 国产精品短视频| 亚洲欧美怡红院| 一区二区三区四区不卡视频| 亚洲欧美影音先锋| 亚洲欧洲日产国产综合网| 国产精品久久久久久久午夜片| 国产日韩欧美精品一区| 久久青草国产手机看片福利盒子| 欧美午夜电影网| bt7086福利一区国产| 激情欧美一区二区三区在线观看| 国产精一品亚洲二区在线视频| 奇米影视一区二区三区小说| 国产一区美女在线| 国产v综合v亚洲欧| 成人午夜免费电影| 欧美日韩在线电影| 7777精品伊人久久久大香线蕉 | 亚洲欧美日韩在线播放| 欧美一区二区三区爱爱| 日韩亚洲欧美成人一区| 欧美一级免费观看| 欧美性受极品xxxx喷水| 欧美一级国产精品| 亚洲成av人片在线观看无码| 偷窥国产亚洲免费视频| 福利一区二区在线观看| 欧美欧美午夜aⅴ在线观看| 亚洲女爱视频在线| 在线观看日韩精品| 久久免费看少妇高潮| 国产成人免费在线视频| 亚洲欧洲在线观看av| 欧美亚洲国产一区在线观看网站| 日韩电影一区二区三区四区| 久久久高清一区二区三区| 成人黄色av网站在线| 日韩高清电影一区| 在线播放91灌醉迷j高跟美女| 中文文精品字幕一区二区| 色婷婷国产精品久久包臀| 亚洲卡通欧美制服中文| 91视频免费播放| 亚洲成av人综合在线观看| 91精品国产综合久久久蜜臀图片 | 艳妇臀荡乳欲伦亚洲一区| 成人黄色电影在线 | 久久久五月婷婷| 精品成人a区在线观看| 丝瓜av网站精品一区二区| 91丨porny丨首页| 国产精品午夜电影| eeuss影院一区二区三区| 一区二区三区在线高清| 91浏览器打开| 天天色 色综合| 精品成人免费观看| 不卡的av网站| 一色桃子久久精品亚洲|