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

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

?? sngks32cend.c

?? 三星公司S3C4510B的VXWORKS操作系統(tǒng)下的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--------------------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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一级片在线观看| 波多野结衣亚洲一区| 欧美巨大另类极品videosbest| 亚洲午夜精品网| 日韩视频一区在线观看| 久久精品久久久精品美女| 2023国产精品| 91视频国产观看| 亚洲高清在线精品| 日韩精品一区二区三区视频| 国产乱码字幕精品高清av| 国产欧美日韩中文久久| 91网站黄www| 日韩精品一二区| 久久久久97国产精华液好用吗| youjizz久久| 亚洲一区二区三区中文字幕| 日韩视频免费观看高清完整版在线观看 | 日本韩国欧美三级| 视频一区视频二区中文字幕| 亚洲精品一区二区三区香蕉| 99久久er热在这里只有精品15 | 日韩美女啊v在线免费观看| 91福利国产成人精品照片| 日韩经典一区二区| 国产欧美一区二区精品忘忧草| 99精品欧美一区| 天天色天天爱天天射综合| 久久久久9999亚洲精品| 色国产综合视频| 狠狠v欧美v日韩v亚洲ⅴ| 一区二区三区高清在线| 精品国产一区二区三区忘忧草| 91亚洲精品一区二区乱码| 麻豆91精品91久久久的内涵| 中文字幕佐山爱一区二区免费| 欧美一区二区三区不卡| 97超碰欧美中文字幕| 日韩av不卡在线观看| 亚洲欧美激情视频在线观看一区二区三区| 91精品国产综合久久久蜜臀图片| 不卡电影一区二区三区| 久久激情五月激情| 亚洲成a人片在线不卡一二三区| 国产日韩欧美亚洲| 6080午夜不卡| 欧美综合天天夜夜久久| 成人午夜视频在线| 韩国欧美国产1区| 日韩精品电影一区亚洲| 一区二区三区在线看| 日本一区二区三区四区在线视频| 6080yy午夜一二三区久久| 色婷婷激情一区二区三区| 国产精品中文有码| 欧美aaaaaa午夜精品| 亚洲一区二区三区三| 亚洲三级电影网站| 国产精品色眯眯| 国产欧美日韩另类视频免费观看| 日韩视频一区二区三区| 欧美日韩精品一区二区天天拍小说 | 国产精品福利一区二区| 精品国产乱码久久久久久1区2区| 欧美色图第一页| 91免费版在线| 97se亚洲国产综合自在线观| 成人免费视频app| 国产精品18久久久久久vr| 毛片不卡一区二区| 日本伊人午夜精品| 日韩和欧美一区二区三区| 午夜视黄欧洲亚洲| 婷婷开心久久网| 午夜久久久影院| 午夜激情久久久| 午夜久久久久久久久久一区二区| 午夜免费欧美电影| 男人的j进女人的j一区| 麻豆91精品91久久久的内涵| 老司机一区二区| 国产一本一道久久香蕉| 国产精品18久久久久久久久| 国产成人精品影视| 成人一级片网址| 色综合久久99| 欧美日韩国产综合一区二区三区 | 中文字幕av在线一区二区三区| 久久久久久夜精品精品免费| 久久精品水蜜桃av综合天堂| 久久精品在线免费观看| 中文幕一区二区三区久久蜜桃| 国产欧美日产一区| 中文字幕一区二区三区不卡| 亚洲欧美在线另类| 夜色激情一区二区| 午夜电影网亚洲视频| 日本欧美大码aⅴ在线播放| 久久91精品久久久久久秒播| 国产精品69久久久久水密桃| 成人高清视频免费观看| 91福利在线看| 欧美一区二区福利视频| 国产三级精品三级| 一区二区三区四区不卡视频| 视频一区视频二区在线观看| 国产最新精品精品你懂的| 国产成人在线免费| 欧美中文字幕一区| 欧美电视剧在线看免费| 国产精品国产三级国产aⅴ原创| 亚洲一区二区三区爽爽爽爽爽| 美腿丝袜亚洲三区| 97久久超碰精品国产| 欧美挠脚心视频网站| 国产日韩精品一区二区三区在线| 一区二区三区日韩在线观看| 久久精品国产精品青草| 91婷婷韩国欧美一区二区| 欧美精品一级二级三级| 国产精品麻豆一区二区| 日韩不卡手机在线v区| 国产ts人妖一区二区| 欧美精品高清视频| 国产精品三级久久久久三级| 日韩国产一区二| 99re这里都是精品| 精品精品欲导航| 亚洲一区二区三区中文字幕在线| 国产一区二区免费视频| 欧美理论在线播放| 综合久久一区二区三区| 韩国精品主播一区二区在线观看| 色猫猫国产区一区二在线视频| 精品对白一区国产伦| 一卡二卡三卡日韩欧美| 国产精一品亚洲二区在线视频| 欧美欧美午夜aⅴ在线观看| 中文字幕高清不卡| 精品一区二区三区免费播放 | 国产成人精品免费网站| 欧美日韩成人综合在线一区二区| 国产精品欧美精品| 国产精品自拍一区| 欧美成人video| 偷拍日韩校园综合在线| 91女厕偷拍女厕偷拍高清| 国产日产欧美精品一区二区三区| 免费一级欧美片在线观看| 欧美午夜一区二区三区免费大片| 亚洲欧洲日产国码二区| 国产成人福利片| 久久久国产一区二区三区四区小说 | 欧美日韩夫妻久久| 亚洲九九爱视频| 成人h动漫精品一区二区| 亚洲精品在线免费播放| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美精品一级二级三级| 亚洲www啪成人一区二区麻豆| 日本久久电影网| 亚洲欧美色一区| 日本久久一区二区| 一区二区高清在线| 欧美无砖砖区免费| 亚洲综合精品久久| 在线精品视频小说1| 一二三四社区欧美黄| 欧美在线观看一区| 天天操天天综合网| 欧美一区二区三区播放老司机| 蜜桃av一区二区三区电影| 精品欧美久久久| 韩国视频一区二区| 亚洲国产精品精华液ab| 99视频精品在线| 亚洲天天做日日做天天谢日日欢| 91啪在线观看| 亚洲成人手机在线| 91精品国产aⅴ一区二区| 奇米精品一区二区三区在线观看一| 欧美丰满美乳xxx高潮www| 亚洲成av人影院| 精品噜噜噜噜久久久久久久久试看| 久久99精品国产麻豆婷婷| 久久久99精品免费观看不卡| caoporn国产精品| 亚洲妇女屁股眼交7| 日韩一区二区三免费高清| 国产精品自拍网站| 1区2区3区国产精品| 欧美性猛交一区二区三区精品| 五月婷婷综合在线| 久久夜色精品一区| 色综合久久精品| 美国三级日本三级久久99 | 亚洲免费观看高清在线观看| 欧美性大战久久久| 精品一区二区三区免费观看| 最新高清无码专区|