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

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

?? xemac_intr_dma.c

?? u-boot1.3.0的原碼,從配了網(wǎng)絡(luò)驅(qū)動和FLASH的驅(qū)動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 4 頁
字號:
/********************************************************************************     Author: Xilinx, Inc.***     This program is free software; you can redistribute it and/or modify it*     under the terms of the GNU General Public License as published by the*     Free Software Foundation; either version 2 of the License, or (at your*     option) any later version.***     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.*     XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO*     THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY*     WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM*     CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND*     FITNESS FOR A PARTICULAR PURPOSE.***     Xilinx hardware products are not intended for use in life support*     appliances, devices, or systems. Use in such applications is*     expressly prohibited.***     (c) Copyright 2002-2004 Xilinx Inc.*     All rights reserved.***     You should have received a copy of the GNU General Public License along*     with this program; if not, write to the Free Software Foundation, Inc.,*     675 Mass Ave, Cambridge, MA 02139, USA.*******************************************************************************//*****************************************************************************//**** @file xemac_intr_dma.c** Contains functions used in interrupt mode when configured with scatter-gather* DMA.** The interrupt handler, XEmac_IntrHandlerDma(), must be connected by the user* to the interrupt controller.** <pre>* MODIFICATION HISTORY:** Ver   Who  Date     Changes* ----- ---- -------- ---------------------------------------------------------* 1.00a rpm  07/31/01 First release* 1.00b rpm  02/20/02 Repartitioned files and functions* 1.00c rpm  12/05/02 New version includes support for simple DMA and the delay*                     argument to SgSend* 1.00c rpm  02/03/03 The XST_DMA_SG_COUNT_EXCEEDED return code was removed*                     from SetPktThreshold in the internal DMA driver. Also*                     avoided compiler warnings by initializing Result in the*                     interrupt service routines.* 1.00c rpm  03/26/03 Fixed a problem in the interrupt service routines where*                     the interrupt status was toggled clear after a call to*                     ErrorHandler, but if ErrorHandler reset the device the*                     toggle actually asserted the interrupt because the*                     reset had cleared it.* </pre>*******************************************************************************//***************************** Include Files *********************************/#include "xbasic_types.h"#include "xemac_i.h"#include "xio.h"#include "xbuf_descriptor.h"#include "xdma_channel.h"#include "xipif_v1_23_b.h"	/* Uses v1.23b of the IPIF *//************************** Constant Definitions *****************************//**************************** Type Definitions *******************************//***************** Macros (Inline Functions) Definitions *********************//************************** Variable Definitions *****************************//************************** Function Prototypes ******************************/static void HandleDmaRecvIntr(XEmac * InstancePtr);static void HandleDmaSendIntr(XEmac * InstancePtr);static void HandleEmacDmaIntr(XEmac * InstancePtr);/*****************************************************************************//**** Send an Ethernet frame using scatter-gather DMA. The caller attaches the* frame to one or more buffer descriptors, then calls this function once for* each descriptor. The caller is responsible for allocating and setting up the* descriptor. An entire Ethernet frame may or may not be contained within one* descriptor.  This function simply inserts the descriptor into the scatter-* gather engine's transmit list. The caller is responsible for providing mutual* exclusion to guarantee that a frame is contiguous in the transmit list. The* buffer attached to the descriptor must be word-aligned.** The driver updates the descriptor with the device control register before* being inserted into the transmit list.  If this is the last descriptor in* the frame, the inserts are committed, which means the descriptors for this* frame are now available for transmission.** It is assumed that the upper layer software supplies a correctly formatted* Ethernet frame, including the destination and source addresses, the* type/length field, and the data field.  It is also assumed that upper layer* software does not append FCS at the end of the frame.** The buffer attached to the descriptor must be word-aligned on the front end.** This call is non-blocking.  Notification of error or successful transmission* is done asynchronously through the send or error callback function.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param BdPtr is the address of a descriptor to be inserted into the transmit*        ring.* @param Delay indicates whether to start the scatter-gather DMA channel*        immediately, or whether to wait. This allows the user to build up a*        list of more than one descriptor before starting the transmission of*        the packets, which allows the application to keep up with DMA and have*        a constant stream of frames being transmitted. Use XEM_SGDMA_NODELAY or*        XEM_SGDMA_DELAY, defined in xemac.h, as the value of this argument. If*        the user chooses to delay and build a list, the user must call this*        function with the XEM_SGDMA_NODELAY option or call XEmac_Start() to*        kick off the tranmissions.** @return** - XST_SUCCESS if the buffer was successfull sent* - XST_DEVICE_IS_STOPPED if the Ethernet MAC has not been started yet* - XST_NOT_SGDMA if the device is not in scatter-gather DMA mode* - XST_DMA_SG_LIST_FULL if the descriptor list for the DMA channel is full* - XST_DMA_SG_BD_LOCKED if the DMA channel cannot insert the descriptor into*   the list because a locked descriptor exists at the insert point* - XST_DMA_SG_NOTHING_TO_COMMIT if even after inserting a descriptor into the*   list, the DMA channel believes there are no new descriptors to commit. If*   this is ever encountered, there is likely a thread mutual exclusion problem*   on transmit.** @note** This function is not thread-safe. The user must provide mutually exclusive* access to this function if there are to be multiple threads that can call it.** @internal** A status that should never be returned from this function, although* the code is set up to handle it, is XST_DMA_SG_NO_LIST. Starting the device* requires a list to be created, and this function requires the device to be* started.*******************************************************************************/XStatusXEmac_SgSend(XEmac * InstancePtr, XBufDescriptor * BdPtr, int Delay){	XStatus Result;	u32 BdControl;	XASSERT_NONVOID(InstancePtr != NULL);	XASSERT_NONVOID(BdPtr != NULL);	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	/*	 * Be sure the device is configured for scatter-gather DMA, then be sure	 * it is started.	 */	if (!XEmac_mIsSgDma(InstancePtr)) {		return XST_NOT_SGDMA;	}	/*	 * Set some descriptor control word defaults (source address increment	 * and local destination address) and the destination address	 * (the FIFO).  These are the same for every transmit descriptor.	 */	BdControl = XBufDescriptor_GetControl(BdPtr);	XBufDescriptor_SetControl(BdPtr, BdControl | XEM_DFT_SEND_BD_MASK);	XBufDescriptor_SetDestAddress(BdPtr,				      InstancePtr->BaseAddress +				      XEM_PFIFO_TXDATA_OFFSET);	/*	 * Put the descriptor in the send list. The DMA component accesses data	 * here that can also be modified in interrupt context, so a critical	 * section is required.	 */	XIIF_V123B_GINTR_DISABLE(InstancePtr->BaseAddress);	Result = XDmaChannel_PutDescriptor(&InstancePtr->SendChannel, BdPtr);	if (Result != XST_SUCCESS) {		XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);		return Result;	}	/*	 * If this is the last buffer in the frame, commit the inserts and start	 * the DMA engine if necessary	 */	if (XBufDescriptor_IsLastControl(BdPtr)) {		Result = XDmaChannel_CommitPuts(&InstancePtr->SendChannel);		if (Result != XST_SUCCESS) {			XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);			return Result;		}		if (Delay == XEM_SGDMA_NODELAY) {			/*			 * Start the DMA channel. Ignore the return status since we know the			 * list exists and has at least one entry and we don't care if the			 * channel is already started.  The DMA component accesses data here			 * that can be modified at interrupt or task levels, so a critical			 * section is required.			 */			(void) XDmaChannel_SgStart(&InstancePtr->SendChannel);		}	}	XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);	return XST_SUCCESS;}/*****************************************************************************//**** Add a descriptor, with an attached empty buffer, into the receive descriptor* list. The buffer attached to the descriptor must be word-aligned. This is* used by the upper layer software during initialization when first setting up* the receive descriptors, and also during reception of frames to replace* filled buffers with empty buffers. This function can be called when the* device is started or stopped. Note that it does start the scatter-gather DMA* engine.  Although this is not necessary during initialization, it is not a* problem during initialization because the MAC receiver is not yet started.** The buffer attached to the descriptor must be word-aligned on both the front* end and the back end.** Notification of received frames are done asynchronously through the receive* callback function.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param BdPtr is a pointer to the buffer descriptor that will be added to the*        descriptor list.** @return** - XST_SUCCESS if a descriptor was successfully returned to the driver* - XST_NOT_SGDMA if the device is not in scatter-gather DMA mode* - XST_DMA_SG_LIST_FULL if the receive descriptor list is full* - XST_DMA_SG_BD_LOCKED if the DMA channel cannot insert the descriptor into*   the list because a locked descriptor exists at the insert point.* - XST_DMA_SG_NOTHING_TO_COMMIT if even after inserting a descriptor into the*   list, the DMA channel believes there are no new descriptors to commit.** @internal** A status that should never be returned from this function, although* the code is set up to handle it, is XST_DMA_SG_NO_LIST. Starting the device* requires a list to be created, and this function requires the device to be* started.*******************************************************************************/XStatusXEmac_SgRecv(XEmac * InstancePtr, XBufDescriptor * BdPtr){	XStatus Result;	u32 BdControl;	XASSERT_NONVOID(InstancePtr != NULL);	XASSERT_NONVOID(BdPtr != NULL);	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	/*	 * Be sure the device is configured for scatter-gather DMA	 */	if (!XEmac_mIsSgDma(InstancePtr)) {		return XST_NOT_SGDMA;	}	/*	 * Set some descriptor control word defaults (destination address increment	 * and local source address) and the source address (the FIFO). These are	 * the same for every receive descriptor.	 */	BdControl = XBufDescriptor_GetControl(BdPtr);	XBufDescriptor_SetControl(BdPtr, BdControl | XEM_DFT_RECV_BD_MASK);	XBufDescriptor_SetSrcAddress(BdPtr,				     InstancePtr->BaseAddress +				     XEM_PFIFO_RXDATA_OFFSET);	/*	 * Put the descriptor into the channel's descriptor list and commit.	 * Although this function is likely called within interrupt context, there	 * is the possibility that the upper layer software queues it to a task.	 * In this case, a critical section is needed here to protect shared data	 * in the DMA component.	 */	XIIF_V123B_GINTR_DISABLE(InstancePtr->BaseAddress);	Result = XDmaChannel_PutDescriptor(&InstancePtr->RecvChannel, BdPtr);	if (Result != XST_SUCCESS) {		XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);		return Result;	}	Result = XDmaChannel_CommitPuts(&InstancePtr->RecvChannel);	if (Result != XST_SUCCESS) {		XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);		return Result;	}	/*	 * Start the DMA channel. Ignore the return status since we know the list	 * exists and has at least one entry and we don't care if the channel is	 * already started. The DMA component accesses data here that can be	 * modified at interrupt or task levels, so a critical section is required.	 */	(void) XDmaChannel_SgStart(&InstancePtr->RecvChannel);	XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);	return XST_SUCCESS;}/*****************************************************************************//**** The interrupt handler for the Ethernet driver when configured with scatter-

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
洋洋成人永久网站入口| 奇米综合一区二区三区精品视频 | 精品蜜桃在线看| 中文字幕成人网| 美女一区二区三区在线观看| 99久久精品国产观看| 欧美成人福利视频| 亚洲gay无套男同| 99久久综合国产精品| 精品av久久707| 人妖欧美一区二区| 欧美日韩精品福利| 一区二区三区不卡视频在线观看| 成人午夜电影久久影院| 久久综合久久综合亚洲| 午夜精品久久久久久久久| 99久久国产综合精品女不卡| 久久久久国产精品人| 精品中文字幕一区二区小辣椒| 欧美精品乱人伦久久久久久| 亚洲一二三区在线观看| 99久久久无码国产精品| 亚洲国产岛国毛片在线| 国产成人免费视频一区| 久久久久久毛片| 国产精品一区二区三区四区| 日韩三级伦理片妻子的秘密按摩| 午夜婷婷国产麻豆精品| 欧美精品欧美精品系列| 日韩av中文字幕一区二区三区| 欧美精品 日韩| 日本vs亚洲vs韩国一区三区 | 97久久超碰精品国产| 久久综合色天天久久综合图片| 精品一区二区三区视频在线观看 | 欧美精品一卡二卡| 午夜成人在线视频| 日韩一区二区视频| 国产一区在线看| 国产精品拍天天在线| 99在线精品观看| 亚洲欧美另类图片小说| 欧美日韩在线三区| 免费亚洲电影在线| 久久久久久久久伊人| 成人高清视频在线| 亚洲一区在线观看网站| 欧美日韩视频第一区| 日韩电影免费一区| 精品国产sm最大网站免费看| 国产成人一区在线| 亚洲欧美日韩在线播放| 91国产成人在线| 老司机午夜精品| 欧美国产日韩在线观看| 在线看日本不卡| 亚洲成a人v欧美综合天堂下载 | 国产成人免费视频网站| 中文字幕一区二区视频| 欧美性极品少妇| 狂野欧美性猛交blacked| 国产欧美日韩综合| 欧美日韩在线播放三区| 国产精品123| 亚洲一区二区三区国产| 欧美mv和日韩mv的网站| 成人av动漫网站| 日本伊人色综合网| 日本一区二区三区四区在线视频 | 久久免费偷拍视频| 日本高清不卡视频| 精品制服美女久久| 亚洲一二三区不卡| 国产精品美女久久久久av爽李琼 | 欧美亚洲国产bt| 国产成人精品一区二区三区四区| 一区二区三区蜜桃| www国产精品av| 欧美日本一区二区在线观看| 国产成人aaa| 免费的成人av| 亚洲午夜国产一区99re久久| 国产精品人成在线观看免费 | 免费不卡在线视频| 艳妇臀荡乳欲伦亚洲一区| 久久日一线二线三线suv| 欧美亚洲尤物久久| 国产成人av电影| 国产综合一区二区| 日韩精品五月天| 亚洲五码中文字幕| 亚洲乱码国产乱码精品精98午夜| 精品国产乱码久久久久久闺蜜| 欧美日韩在线播放三区四区| 99精品欧美一区二区三区小说| 国产一区欧美日韩| 麻豆国产精品777777在线| 亚洲一区av在线| 亚洲男帅同性gay1069| 国产欧美一区二区精品性| 日韩亚洲欧美一区二区三区| 欧美日韩日日骚| 欧美日韩一区小说| 91久久奴性调教| 91激情在线视频| 一本色道久久综合亚洲aⅴ蜜桃| 国产久卡久卡久卡久卡视频精品| 国产一区二区三区久久久| 欧美另类z0zxhd电影| 国产一区二区三区av电影| 美女在线视频一区| 久久黄色级2电影| 麻豆国产91在线播放| 男男gaygay亚洲| 久久国产精品99久久久久久老狼 | 91久久一区二区| 在线观看日韩国产| 欧美亚洲另类激情小说| 欧美视频一区二区在线观看| 欧美影院午夜播放| 欧美久久婷婷综合色| 欧美夫妻性生活| 欧美刺激午夜性久久久久久久| 欧美一级片免费看| 日韩片之四级片| 久久久久久久综合| 中文字幕一区二区三区在线观看 | 国产欧美日韩视频在线观看| 国产片一区二区| 综合久久给合久久狠狠狠97色 | 欧美性一级生活| 欧美精品丝袜中出| xnxx国产精品| 亚洲色图.com| 亚洲成年人影院| 狠狠色丁香婷综合久久| 成人免费毛片a| 91福利视频久久久久| 91精品国产91久久综合桃花 | 精品国产制服丝袜高跟| 国产视频一区不卡| 一区二区免费看| 久久精品99国产国产精| 国产成人精品免费视频网站| 99久久精品国产一区二区三区| 欧美私人免费视频| 精品福利一二区| 亚洲六月丁香色婷婷综合久久| 亚洲123区在线观看| 国产一区二区免费在线| 91国产成人在线| 久久久久久久久久美女| 亚洲午夜精品一区二区三区他趣| 美国毛片一区二区| 91香蕉视频mp4| 欧美v日韩v国产v| 亚洲一线二线三线视频| 国产麻豆精品95视频| 欧美影院午夜播放| 久久久不卡影院| 免费欧美在线视频| 日本韩国精品一区二区在线观看| 精品国产电影一区二区| 亚洲午夜精品17c| proumb性欧美在线观看| 日韩欧美一区二区久久婷婷| 亚洲男女毛片无遮挡| 国产精品一二一区| 在线成人免费视频| 亚洲欧美偷拍三级| 国产1区2区3区精品美女| 欧美乱妇15p| 亚洲一区在线观看免费| 国产成人av一区二区三区在线 | 极品少妇xxxx偷拍精品少妇| 日本久久精品电影| 国产精品国产三级国产普通话三级 | 欧美精品日韩一本| 亚洲日本va午夜在线电影| 国产99久久久国产精品潘金网站| 91精品国产色综合久久久蜜香臀| 成人欧美一区二区三区黑人麻豆 | 2023国产精品| 午夜久久久影院| 欧美在线free| 自拍偷拍国产精品| av电影在线不卡| 国产精品女主播av| 国产成人免费视频精品含羞草妖精| 日韩一区二区三区免费观看| 亚洲福利视频导航| 欧日韩精品视频| 亚洲午夜激情网页| 91成人国产精品| 一区二区三区在线视频观看 | 欧美一区二区私人影院日本| 五月婷婷色综合| 51久久夜色精品国产麻豆| 天堂资源在线中文精品| 欧美日韩一区二区三区不卡|