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

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

?? xemac_options.c

?? gumstiz u-boot loader in linux
?? C
字號:
/********************************************************************************     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_options.c** Functions in this file handle configuration of the XEmac driver.** <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* </pre>*******************************************************************************//***************************** Include Files *********************************/#include "xbasic_types.h"#include "xemac_i.h"#include "xio.h"/************************** Constant Definitions *****************************/#define XEM_MAX_IFG         32	/* Maximum Interframe gap value *//**************************** Type Definitions *******************************//***************** Macros (Inline Functions) Definitions *********************//************************** Function Prototypes ******************************//************************** Variable Definitions *****************************//* * A table of options and masks. This table maps the user-visible options with * the control register masks. It is used in Set/GetOptions as an alternative * to a series of if/else pairs. Note that the polled options does not have a * corresponding entry in the control register, so it does not exist in the * table. */typedef struct {	u32 Option;	u32 Mask;} OptionMap;static OptionMap OptionsTable[] = {	{XEM_UNICAST_OPTION, XEM_ECR_UNICAST_ENABLE_MASK},	{XEM_BROADCAST_OPTION, XEM_ECR_BROAD_ENABLE_MASK},	{XEM_PROMISC_OPTION, XEM_ECR_PROMISC_ENABLE_MASK},	{XEM_FDUPLEX_OPTION, XEM_ECR_FULL_DUPLEX_MASK},	{XEM_LOOPBACK_OPTION, XEM_ECR_LOOPBACK_MASK},	{XEM_MULTICAST_OPTION, XEM_ECR_MULTI_ENABLE_MASK},	{XEM_FLOW_CONTROL_OPTION, XEM_ECR_PAUSE_FRAME_MASK},	{XEM_INSERT_PAD_OPTION, XEM_ECR_XMIT_PAD_ENABLE_MASK},	{XEM_INSERT_FCS_OPTION, XEM_ECR_XMIT_FCS_ENABLE_MASK},	{XEM_INSERT_ADDR_OPTION, XEM_ECR_XMIT_ADDR_INSERT_MASK},	{XEM_OVWRT_ADDR_OPTION, XEM_ECR_XMIT_ADDR_OVWRT_MASK},	{XEM_STRIP_PAD_FCS_OPTION, XEM_ECR_RECV_STRIP_ENABLE_MASK}};#define XEM_NUM_OPTIONS     (sizeof(OptionsTable) / sizeof(OptionMap))/*****************************************************************************//**** Set Ethernet driver/device options.  The device must be stopped before* calling this function.  The options are contained within a bit-mask with each* bit representing an option (i.e., you can OR the options together). A one (1)* in the bit-mask turns an option on, and a zero (0) turns the option off.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param OptionsFlag is a bit-mask representing the Ethernet options to turn on*        or off. See xemac.h for a description of the available options.** @return** - XST_SUCCESS if the options were set successfully* - XST_DEVICE_IS_STARTED if the device has not yet been stopped** @note** This function is not thread-safe and makes use of internal resources that are* shared between the Start, Stop, and SetOptions functions, so if one task* might be setting device options while another is trying to start the device,* protection of this shared data (typically using a semaphore) is required.*******************************************************************************/XStatusXEmac_SetOptions(XEmac * InstancePtr, u32 OptionsFlag){	u32 ControlReg;	int Index;	XASSERT_NONVOID(InstancePtr != NULL);	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	if (InstancePtr->IsStarted == XCOMPONENT_IS_STARTED) {		return XST_DEVICE_IS_STARTED;	}	ControlReg = XIo_In32(InstancePtr->BaseAddress + XEM_ECR_OFFSET);	/*	 * Loop through the options table, turning the option on or off	 * depending on whether the bit is set in the incoming options flag.	 */	for (Index = 0; Index < XEM_NUM_OPTIONS; Index++) {		if (OptionsFlag & OptionsTable[Index].Option) {			ControlReg |= OptionsTable[Index].Mask;	/* turn it on */		} else {			ControlReg &= ~OptionsTable[Index].Mask;	/* turn it off */		}	}	/*	 * TODO: need to validate addr-overwrite only if addr-insert?	 */	/*	 * Now write the control register. Leave it to the upper layers	 * to restart the device.	 */	XIo_Out32(InstancePtr->BaseAddress + XEM_ECR_OFFSET, ControlReg);	/*	 * Check the polled option	 */	if (OptionsFlag & XEM_POLLED_OPTION) {		InstancePtr->IsPolled = TRUE;	} else {		InstancePtr->IsPolled = FALSE;	}	return XST_SUCCESS;}/*****************************************************************************//**** Get Ethernet driver/device options. The 32-bit value returned is a bit-mask* representing the options.  A one (1) in the bit-mask means the option is on,* and a zero (0) means the option is off.** @param InstancePtr is a pointer to the XEmac instance to be worked on.** @return** The 32-bit value of the Ethernet options. The value is a bit-mask* representing all options that are currently enabled. See xemac.h for a* description of the available options.** @note** None.*******************************************************************************/u32XEmac_GetOptions(XEmac * InstancePtr){	u32 OptionsFlag = 0;	u32 ControlReg;	int Index;	XASSERT_NONVOID(InstancePtr != NULL);	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	/*	 * Get the control register to determine which options are currently set.	 */	ControlReg = XIo_In32(InstancePtr->BaseAddress + XEM_ECR_OFFSET);	/*	 * Loop through the options table to determine which options are set	 */	for (Index = 0; Index < XEM_NUM_OPTIONS; Index++) {		if (ControlReg & OptionsTable[Index].Mask) {			OptionsFlag |= OptionsTable[Index].Option;		}	}	if (InstancePtr->IsPolled) {		OptionsFlag |= XEM_POLLED_OPTION;	}	return OptionsFlag;}/*****************************************************************************//**** Set the Interframe Gap (IFG), which is the time the MAC delays between* transmitting frames.  There are two parts required.  The total interframe gap* is the total of the two parts.  The values provided for the Part1 and Part2* parameters are multiplied by 4 to obtain the bit-time interval. The first* part should be the first 2/3 of the total interframe gap. The MAC will reset* the interframe gap timer if carrier sense becomes true during the period* defined by interframe gap Part1. Part1 may be shorter than 2/3 the total and* can be as small as zero. The second part should be the last 1/3 of the total* interframe gap, but can be as large as the total interframe gap. The MAC* will not reset the interframe gap timer if carrier sense becomes true during* the period defined by interframe gap Part2.** The device must be stopped before setting the interframe gap.** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param Part1 is the interframe gap part 1 (which will be multiplied by 4 to*        get the bit-time interval).* @param Part2 is the interframe gap part 2 (which will be multiplied by 4 to*        get the bit-time interval).** @return** - XST_SUCCESS if the interframe gap was set successfully* - XST_DEVICE_IS_STARTED if the device has not been stopped** @note** None.*******************************************************************************/XStatusXEmac_SetInterframeGap(XEmac * InstancePtr, u8 Part1, u8 Part2){	u32 Ifg;	XASSERT_NONVOID(InstancePtr != NULL);	XASSERT_NONVOID(Part1 < XEM_MAX_IFG);	XASSERT_NONVOID(Part2 < XEM_MAX_IFG);	XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	/*	 * Be sure device has been stopped	 */	if (InstancePtr->IsStarted == XCOMPONENT_IS_STARTED) {		return XST_DEVICE_IS_STARTED;	}	Ifg = Part1 << XEM_IFGP_PART1_SHIFT;	Ifg |= (Part2 << XEM_IFGP_PART2_SHIFT);	XIo_Out32(InstancePtr->BaseAddress + XEM_IFGP_OFFSET, Ifg);	return XST_SUCCESS;}/*****************************************************************************//**** Get the interframe gap, parts 1 and 2. See the description of interframe gap* above in XEmac_SetInterframeGap().** @param InstancePtr is a pointer to the XEmac instance to be worked on.* @param Part1Ptr is a pointer to an 8-bit buffer into which the interframe gap*        part 1 value will be copied.* @param Part2Ptr is a pointer to an 8-bit buffer into which the interframe gap*        part 2 value will be copied.** @return** None. The values of the interframe gap parts are copied into the* output parameters.*******************************************************************************/voidXEmac_GetInterframeGap(XEmac * InstancePtr, u8 * Part1Ptr, u8 * Part2Ptr){	u32 Ifg;	XASSERT_VOID(InstancePtr != NULL);	XASSERT_VOID(Part1Ptr != NULL);	XASSERT_VOID(Part2Ptr != NULL);	XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);	Ifg = XIo_In32(InstancePtr->BaseAddress + XEM_IFGP_OFFSET);	*Part1Ptr = (Ifg & XEM_IFGP_PART1_MASK) >> XEM_IFGP_PART1_SHIFT;	*Part2Ptr = (Ifg & XEM_IFGP_PART2_MASK) >> XEM_IFGP_PART2_SHIFT;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线看日本不卡| 日韩一级在线观看| 麻豆精品一区二区三区| 国产精品嫩草99a| 欧美日韩综合在线| 成人深夜在线观看| 麻豆视频观看网址久久| 亚洲乱码精品一二三四区日韩在线 | 日韩亚洲欧美在线| 99re热视频这里只精品| 国产一区二区福利| 日韩在线播放一区二区| 日韩伦理av电影| 久久久久久久综合日本| 欧美一级久久久| 欧美影院午夜播放| 97久久精品人人爽人人爽蜜臀| 美女视频一区在线观看| 午夜精品免费在线观看| 一区二区三区毛片| 亚洲免费av高清| 国产精品福利一区| 亚洲国产成人私人影院tom| 日韩精品专区在线影院观看| 欧美日韩国产综合一区二区 | 成人精品国产免费网站| 极品尤物av久久免费看| 日韩高清在线观看| 香蕉影视欧美成人| 亚洲国产sm捆绑调教视频| 亚洲视频一区在线| 国产精品美女久久久久久久久久久 | 久久99久久精品| 免费观看91视频大全| 日韩精品一二区| 午夜av一区二区三区| 亚洲成人在线网站| 日韩黄色小视频| 奇米精品一区二区三区在线观看 | 99麻豆久久久国产精品免费| 国产精品一区二区在线播放| 国产原创一区二区| 国产成人啪午夜精品网站男同| 国产真实乱子伦精品视频| 免费xxxx性欧美18vr| 免费av网站大全久久| 久久99精品国产| 国产美女精品人人做人人爽| 国产91丝袜在线播放| 成人免费视频国产在线观看| 97成人超碰视| 欧美影院一区二区| 91麻豆精品久久久久蜜臀| 日韩欧美一二区| www国产精品av| 国产精品狼人久久影院观看方式| 日韩美女视频19| 亚洲成人精品一区二区| 免费亚洲电影在线| 成人一区二区三区中文字幕| 99久久精品国产一区| 欧美日韩一级二级| 日韩欧美国产成人一区二区| 国产午夜精品久久| 亚洲乱码国产乱码精品精的特点 | 久久精品男人天堂av| 中文字幕一区二区三区视频| 亚洲综合免费观看高清完整版在线| 亚洲一区影音先锋| 蜜臀av一级做a爰片久久| 国产成人午夜精品5599| 色8久久人人97超碰香蕉987| 欧美一二三区在线观看| 久久久久久久性| 一二三区精品福利视频| 蜜臀久久99精品久久久久宅男 | 日本不卡一二三| 国产不卡高清在线观看视频| 91丝袜呻吟高潮美腿白嫩在线观看| 欧洲精品在线观看| 精品国产乱码91久久久久久网站| 日本一区二区三区四区| 丝袜美腿一区二区三区| 国产成人av电影免费在线观看| 欧美系列一区二区| 国产农村妇女精品| 日韩av一区二区三区| 粉嫩13p一区二区三区| 欧美婷婷六月丁香综合色| 国产喂奶挤奶一区二区三区| 午夜私人影院久久久久| 成人av网站在线观看免费| 制服丝袜亚洲网站| 亚洲免费观看高清完整版在线观看| 日本美女视频一区二区| av电影一区二区| 精品久久国产字幕高潮| 一区二区视频在线| 国产成人免费视频精品含羞草妖精| 欧美日韩成人一区| 亚洲人成亚洲人成在线观看图片| 久久99久久99精品免视看婷婷| 欧美色爱综合网| 亚洲欧美精品午睡沙发| 国产麻豆精品视频| 日韩三级在线观看| 亚洲午夜激情网页| 91小视频免费观看| 久久久久久久久久久电影| 蜜桃视频一区二区三区在线观看 | 91精品国产91久久久久久最新毛片| 国产精品久久二区二区| 麻豆国产精品官网| 欧美日韩国产片| 亚洲伊人色欲综合网| 成人app在线| 中文一区一区三区高中清不卡| 久久国产精品99久久人人澡| 欧美精品乱人伦久久久久久| 一区二区三区不卡在线观看| 成人午夜激情片| 欧美激情一区在线| 国产福利电影一区二区三区| 精品88久久久久88久久久| 日韩国产在线一| 欧美视频在线观看一区| 亚洲永久精品国产| 色哟哟一区二区| 亚洲老司机在线| 91麻豆国产福利精品| 最近中文字幕一区二区三区| 99久久国产免费看| 亚洲欧洲精品一区二区三区| 成人深夜福利app| 欧美激情一区二区三区不卡| 成人影视亚洲图片在线| 国产精品麻豆久久久| 成人免费视频网站在线观看| 国产精品毛片高清在线完整版| 粉嫩一区二区三区在线看| 中文字幕va一区二区三区| av在线这里只有精品| 亚洲免费资源在线播放| 欧美在线播放高清精品| 午夜在线电影亚洲一区| 欧美一区二区三区喷汁尤物| 一区二区三区在线免费视频| 欧美亚洲尤物久久| 日韩精品亚洲一区二区三区免费| 欧美电影精品一区二区| 国产乱色国产精品免费视频| 国产精品色眯眯| 在线影视一区二区三区| 日本亚洲最大的色成网站www| 日韩免费观看高清完整版在线观看| 久久99精品久久久久久动态图| 国产日韩欧美亚洲| 99免费精品视频| 天天操天天干天天综合网| 精品入口麻豆88视频| 国产成人在线观看| 一区二区三区在线看| 欧美一级日韩一级| 国产精品资源在线看| 亚洲男人的天堂一区二区| 欧美精品久久99久久在免费线| 麻豆精品新av中文字幕| 国产精品每日更新在线播放网址| 色国产综合视频| 老司机免费视频一区二区| 欧美国产国产综合| 欧美日韩国产高清一区二区| 国产乱码精品一区二区三| 亚洲色图制服诱惑| 欧美成人bangbros| 成人av免费在线观看| 日韩精品每日更新| 亚洲国产精品二十页| 欧美高清一级片在线| 国产精品888| 午夜精品在线看| 欧美韩国日本不卡| 欧美一区二区美女| 粉嫩13p一区二区三区| 日韩国产精品91| 亚洲三级免费电影| 精品蜜桃在线看| 91黄视频在线观看| 国产精品一品视频| 亚洲成a人v欧美综合天堂| 欧美精品一区二区久久婷婷| 99精品久久只有精品| 国产一区福利在线| 亚洲五月六月丁香激情| 国产欧美综合在线观看第十页| 在线播放一区二区三区| av电影一区二区| 国产福利电影一区二区三区| 免费成人小视频| 一区二区三区国产|