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

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

?? sngks32cend.c

?? at91rm9200 bsp at91rm9200 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩不卡一二三区| 日韩一区二区电影| 日韩av电影天堂| 中国色在线观看另类| 欧美色倩网站大全免费| 欧美三级一区二区| 国产一区日韩二区欧美三区| 一区二区三区欧美久久| 久久久激情视频| 欧美福利视频一区| 色综合天天综合网国产成人综合天| 蜜桃一区二区三区在线观看| 亚洲人成人一区二区在线观看| 精品国产制服丝袜高跟| 欧美午夜片在线看| 色婷婷久久99综合精品jk白丝 | 国产嫩草影院久久久久| 欧美日韩国产天堂| 日本韩国视频一区二区| 成人免费视频国产在线观看| 久草中文综合在线| 秋霞成人午夜伦在线观看| 亚洲高清视频的网址| 亚洲精品一二三四区| 中文字幕制服丝袜一区二区三区| 精品成人佐山爱一区二区| 欧美一区国产二区| 在线综合视频播放| 777a∨成人精品桃花网| 日本精品一级二级| 在线观看91视频| 欧美在线制服丝袜| 91成人网在线| 色综合久久久久网| 91成人免费在线视频| 色av一区二区| 欧美日精品一区视频| 欧美三级在线播放| 欧美丰满嫩嫩电影| 欧美电影在线免费观看| 这里只有精品免费| 日韩一级免费观看| 精品国产乱码久久久久久浪潮| 日韩欧美国产一二三区| 91精品免费观看| 欧美成人一区二区三区| 日韩精品中午字幕| 国产视频一区二区三区在线观看| 久久久99精品免费观看不卡| 国产无人区一区二区三区| 国产精品网友自拍| 亚洲欧洲另类国产综合| 一区二区三区中文字幕| 亚洲国产精品欧美一二99| 日韩综合在线视频| 捆绑调教美女网站视频一区| 国产一区二区免费视频| 成人一道本在线| 色欧美片视频在线观看在线视频| 色8久久精品久久久久久蜜| 欧美日韩亚洲综合| 欧美成人a视频| 欧美激情艳妇裸体舞| 中文字幕一区免费在线观看| 亚洲最大成人综合| 老司机午夜精品| 懂色av一区二区三区免费观看| 色综合天天综合色综合av| 欧美美女黄视频| 2020国产精品| 亚洲人妖av一区二区| 日韩极品在线观看| 国产乱子轮精品视频| 91网上在线视频| 6080国产精品一区二区| 国产日韩欧美精品一区| 一区二区三区中文字幕在线观看| 老司机精品视频导航| 99精品久久久久久| 欧美白人最猛性xxxxx69交| 亚洲欧洲在线观看av| 丝袜诱惑制服诱惑色一区在线观看| 精品一区二区日韩| 在线观看一区不卡| 久久午夜国产精品| 亚洲777理论| 高清不卡一二三区| 6080午夜不卡| 亚洲裸体xxx| 久久99九九99精品| 色婷婷久久久综合中文字幕| 日韩女同互慰一区二区| 亚洲天堂a在线| 国产一区二区按摩在线观看| 欧洲av在线精品| 中文字幕不卡的av| 久久国产人妖系列| 欧美美女一区二区三区| 亚洲欧洲精品成人久久奇米网| 久久精品国产久精国产| 在线亚洲一区二区| 国产精品美女www爽爽爽| 奇米亚洲午夜久久精品| 色综合一区二区| 国产精品系列在线| 国产一区二区三区在线观看免费 | 精品国产亚洲在线| 亚洲一区二区三区在线播放| 国产成人高清在线| 欧美刺激午夜性久久久久久久| 亚洲最大色网站| 色网综合在线观看| 国产精品色一区二区三区| 久久国产精品99久久久久久老狼 | 国产精品网曝门| 韩国精品主播一区二区在线观看| 欧美日韩国产影片| 一区二区三区四区在线免费观看| 国产精品综合一区二区| 日韩欧美123| 蜜臀久久久久久久| 欧美另类videos死尸| 亚洲综合久久久久| 欧美曰成人黄网| 亚洲美女在线一区| 成人av电影免费观看| 亚洲国产精品成人综合| 国产成人在线视频网站| 精品国产乱码久久久久久牛牛| 麻豆视频一区二区| 日韩欧美视频在线| 毛片av中文字幕一区二区| 91精品国产麻豆国产自产在线 | 国产精品一二三| 久久免费偷拍视频| 国产成人夜色高潮福利影视| 2021中文字幕一区亚洲| 国产精品99久久久久久久vr| 精品成人一区二区三区四区| 黄色日韩三级电影| 国产欧美一二三区| 风间由美一区二区av101 | 国产精品久久久久久妇女6080| 国产成人免费在线观看| 欧美国产精品专区| 97久久久精品综合88久久| 亚洲男女一区二区三区| 欧美在线色视频| 亚洲成a人片在线观看中文| 欧美精品一卡二卡| 麻豆国产精品一区二区三区| 日韩欧美国产精品一区| 国内久久精品视频| 国产欧美va欧美不卡在线| 成人国产免费视频| 亚洲在线观看免费| 日韩一二三区不卡| 国产成人亚洲综合色影视| 日韩码欧中文字| 欧美日韩国产一级| 国产麻豆精品theporn| 中文字幕第一页久久| 一本大道久久a久久综合| 亚洲成av人片一区二区梦乃| 91精品国产综合久久香蕉麻豆 | 在线精品视频一区二区| 蜜臀久久99精品久久久久宅男 | 欧美中文字幕一区二区三区| 日韩电影在线看| 中文字幕乱码久久午夜不卡 | jlzzjlzz欧美大全| 亚洲一区二区视频在线| 久久这里只有精品6| 色综合久久久久网| 久久国产精品99精品国产 | 黄网站免费久久| 亚洲人成在线播放网站岛国| 欧美日本在线看| 成人深夜视频在线观看| 日韩高清在线一区| 国产精品三级av| 在线综合视频播放| 99国产精品久久久久久久久久久| 青青草国产成人av片免费| 中文字幕欧美区| 91精品国产综合久久蜜臀| 97精品久久久午夜一区二区三区| 日本午夜精品一区二区三区电影| 国产精品午夜免费| 欧美tickle裸体挠脚心vk| 欧美最猛性xxxxx直播| 国产一区二区三区美女| 亚洲国产aⅴ天堂久久| 亚洲国产激情av| 日韩欧美成人一区| 欧美日韩视频在线第一区 | 欧美一二三四在线| 色婷婷久久久亚洲一区二区三区| 国产精品一区二区男女羞羞无遮挡 | 亚洲欧美日韩久久精品|