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

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

?? xemac_intr_dma.c

?? gumstiz u-boot loader in linux
?? 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-

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝瓜av网站精品一区二区| 精品剧情在线观看| 99久久夜色精品国产网站| 国精产品一区一区三区mba视频 | 国产一区在线精品| 久久精品99国产精品| 久久国产尿小便嘘嘘| 蜜臀久久久99精品久久久久久| 丝袜美腿一区二区三区| 美女性感视频久久| 激情小说亚洲一区| 国产成人aaa| 97精品久久久午夜一区二区三区| 一本色道久久综合精品竹菊| 在线视频国内一区二区| 欧美日韩不卡一区| 欧美一区二区三区精品| 2021国产精品久久精品| 国产精品国产三级国产普通话蜜臀| 国产精品福利av| 亚洲午夜精品在线| 久久成人免费日本黄色| 懂色av一区二区三区免费观看| 成人av在线一区二区三区| 91啪亚洲精品| 日韩欧美自拍偷拍| 国产精品卡一卡二| 五月婷婷欧美视频| 高清beeg欧美| 欧美性欧美巨大黑白大战| 日韩女优毛片在线| 亚洲天堂av老司机| 免费国产亚洲视频| 97se亚洲国产综合在线| 91精品国产一区二区三区香蕉| 国产网站一区二区| 婷婷国产v国产偷v亚洲高清| 高清成人在线观看| 欧美一区二区视频观看视频| 国产精品久久久久久久久久久免费看 | 中文字幕乱码亚洲精品一区| 一区二区三区不卡在线观看| 国内欧美视频一区二区| av福利精品导航| 日韩欧美www| 亚洲黄色免费网站| 成人午夜在线视频| 日韩免费高清视频| 午夜久久久久久电影| 97精品国产97久久久久久久久久久久| 日韩欧美国产一区二区在线播放| 一区二区在线观看免费| 成人美女视频在线看| 欧美电影免费观看高清完整版在线观看| 国产精品久久久久影院亚瑟| 国产精品一卡二| 亚洲精品在线观看视频| 亚洲制服丝袜av| av亚洲精华国产精华精| 国产视频一区二区在线观看| 精品在线你懂的| 日韩精品一区二区三区中文精品| 亚洲国产精品人人做人人爽| 91丨九色丨蝌蚪丨老版| 国产精品国模大尺度视频| 国产精品影音先锋| 久久人人爽爽爽人久久久| 精品一区二区三区免费观看| 91精品国产91久久久久久一区二区 | 菠萝蜜视频在线观看一区| 精品久久久久久亚洲综合网| 久久国内精品视频| 欧美一级二级三级乱码| 麻豆一区二区99久久久久| 日韩一区二区电影网| 热久久国产精品| 日韩欧美三级在线| 美腿丝袜亚洲色图| 久久亚洲影视婷婷| 国产成人亚洲精品狼色在线| 亚洲国产成人自拍| av爱爱亚洲一区| 亚洲国产综合色| 欧美日本在线观看| 另类中文字幕网| 久久精品水蜜桃av综合天堂| 成人三级伦理片| 亚洲一区二区三区四区的| 欧美丰满高潮xxxx喷水动漫| 蜜桃精品在线观看| 国产欧美一区视频| 91免费观看视频| 视频一区二区三区在线| 久久久久久综合| 一本色道久久综合亚洲精品按摩| 亚洲电影第三页| 精品久久一二三区| av色综合久久天堂av综合| 亚洲第一在线综合网站| 亚洲欧美色图小说| 精品视频1区2区| 国产在线精品不卡| 亚洲黄色在线视频| 久久婷婷国产综合精品青草 | 色综合天天综合给合国产| 亚洲国产精品久久不卡毛片 | 成人一级黄色片| 亚洲在线视频一区| 欧美成人a在线| 91麻豆国产自产在线观看| 日本色综合中文字幕| 国产精品久久久久久一区二区三区| 欧美天堂亚洲电影院在线播放| 国产一区三区三区| 亚洲大型综合色站| 日本一二三不卡| 在线电影国产精品| 日本道免费精品一区二区三区| 琪琪久久久久日韩精品| 亚洲人精品午夜| 久久九九久精品国产免费直播| 91福利区一区二区三区| 风间由美一区二区三区在线观看 | 国产精品99久久久久| 亚洲成av人影院| 国产精品人成在线观看免费| 欧美剧情片在线观看| 不卡的av中国片| 麻豆精品在线播放| 亚洲资源中文字幕| 亚洲女厕所小便bbb| 欧美经典一区二区| 欧美精品一区二区三区蜜桃视频| 欧美日本韩国一区二区三区视频| av中文一区二区三区| 国产麻豆精品视频| 日本vs亚洲vs韩国一区三区二区| 最近日韩中文字幕| 一区二区三区四区中文字幕| 久久精品一区二区三区不卡| 538prom精品视频线放| 欧美天堂一区二区三区| 一本大道av伊人久久综合| 成人一级片在线观看| 丰满少妇在线播放bd日韩电影| 日韩精品乱码av一区二区| 亚洲高清视频中文字幕| 亚洲精品乱码久久久久久日本蜜臀| 国产精品国产三级国产aⅴ原创| 国产偷国产偷精品高清尤物 | 91丨porny丨国产| 成人精品高清在线| gogo大胆日本视频一区| 不卡一区中文字幕| kk眼镜猥琐国模调教系列一区二区| 国产精品综合二区| 国产乱人伦偷精品视频不卡| 激情六月婷婷综合| 国产精品中文字幕日韩精品| 福利一区二区在线观看| 成人av网在线| 欧美性感一类影片在线播放| 欧美日韩一二三区| 日韩一区二区三区视频在线| 欧美成人一区二区| 久久久亚洲精品石原莉奈| 国产精品狼人久久影院观看方式| 综合在线观看色| 亚洲激情五月婷婷| 蜜臀99久久精品久久久久久软件| 久久精品国产亚洲5555| 国产精品系列在线观看| 91性感美女视频| 欧美群妇大交群中文字幕| 欧美不卡一区二区三区| 中文字幕乱码久久午夜不卡 | 日韩久久精品一区| 久久先锋资源网| 亚洲三级视频在线观看| 亚洲电影中文字幕在线观看| 免费成人深夜小野草| 成人免费视频免费观看| 欧美日韩综合一区| 日韩欧美一级在线播放| 中文字幕乱码久久午夜不卡 | 欧美成va人片在线观看| 亚洲视频一区二区在线| 六月丁香婷婷久久| 色婷婷久久久亚洲一区二区三区| 欧美另类一区二区三区| 欧美激情在线观看视频免费| 日精品一区二区三区| 成人一区二区三区视频| 538在线一区二区精品国产| 亚洲欧美在线观看| 久久精品国产亚洲高清剧情介绍| 色婷婷av一区二区| 久久久99免费| 亚洲中国最大av网站| 欧美午夜精品久久久久久孕妇|