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

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

?? xemac_options.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? 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;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品国产99久久久久久白柏| 国产精品 欧美精品| 国产日韩综合av| 精品国产欧美一区二区| 精品国产乱子伦一区| 精品卡一卡二卡三卡四在线| 日韩欧美中文字幕制服| 日韩欧美亚洲另类制服综合在线| 欧美日韩高清在线播放| 欧美一二三四在线| 精品国产a毛片| 国产日产亚洲精品系列| 国产精品欧美一区二区三区| 国产精品视频第一区| 亚洲欧美一区二区视频| 亚洲一区在线电影| 免费在线观看精品| 国产91丝袜在线观看| 99久久99久久综合| 777奇米成人网| 久久久久久久久久久久久女国产乱| 国产婷婷色一区二区三区在线| 欧美国产1区2区| 香蕉久久夜色精品国产使用方法 | 成人av网在线| 欧美在线小视频| 精品国产免费人成在线观看| 久久久久国产一区二区三区四区| 中文字幕视频一区| 日本欧美在线观看| 国产成人精品免费在线| 欧美性一级生活| 国产午夜精品一区二区三区嫩草 | 色综合久久中文字幕| 制服丝袜亚洲网站| 日本一区二区视频在线| 依依成人精品视频| 国产精品资源在线观看| 欧美三级日本三级少妇99| 日韩欧美一级二级三级久久久 | 欧美在线高清视频| 精品国产sm最大网站| 亚洲一区二区视频在线观看| 裸体健美xxxx欧美裸体表演| 99国产精品久久久久| 久久综合五月天婷婷伊人| 国产精品久久久久久久久久免费看 | 日韩国产高清在线| 成人app下载| 精品久久人人做人人爰| 17c精品麻豆一区二区免费| 麻豆高清免费国产一区| 色婷婷亚洲综合| 国产精品久久网站| 狠狠色综合色综合网络| 欧美日韩三级一区二区| 亚洲美女免费视频| 国产精品资源在线看| 日韩一级精品视频在线观看| 亚洲成人免费视| 色噜噜狠狠色综合中国| 国产欧美日韩综合| 九色综合狠狠综合久久| 日韩欧美一二三四区| 视频一区二区国产| 欧美日韩精品高清| 亚洲国产乱码最新视频| 在线观看日韩国产| 一区二区三区四区亚洲| 日本道免费精品一区二区三区| 欧美国产精品一区二区三区| 国产精品一区不卡| 久久久精品欧美丰满| 国产麻豆成人传媒免费观看| 性欧美大战久久久久久久久| 亚洲一二三区不卡| 国产午夜久久久久| 91精品国产麻豆国产自产在线 | 久久国产麻豆精品| 精品奇米国产一区二区三区| 午夜不卡av免费| 3d动漫精品啪啪| 免费看精品久久片| 日韩一级成人av| 加勒比av一区二区| 久久伊人中文字幕| 国产99久久久久| 亚洲国产精品99久久久久久久久| 国产传媒欧美日韩成人| 国产精品污污网站在线观看| 亚洲美女电影在线| 亚洲精品第一国产综合野| 久久精品999| 国产精品乱码一区二区三区软件 | 亚洲愉拍自拍另类高清精品| 在线观看不卡一区| 日本不卡视频在线| 国产欧美日韩视频一区二区| 高清shemale亚洲人妖| 国产精品护士白丝一区av| 91国产丝袜在线播放| 天天色综合成人网| 中文字幕国产一区| 欧美日韩视频在线观看一区二区三区 | 中文字幕精品在线不卡| 色综合久久久久综合99| 免费xxxx性欧美18vr| 国产精品拍天天在线| 欧美日韩另类一区| 国产成人精品aa毛片| 亚洲午夜私人影院| 欧美激情在线看| 欧美喷水一区二区| 99久久精品国产一区二区三区| 日日骚欧美日韩| 亚洲免费观看高清| 国产调教视频一区| 911精品产国品一二三产区| 成人污污视频在线观看| 日本亚洲一区二区| 亚洲男人的天堂在线观看| 精品日韩在线一区| 日本伦理一区二区| 不卡视频一二三四| 另类小说综合欧美亚洲| 亚洲综合自拍偷拍| 国产精品欧美一区喷水| 精品乱人伦一区二区三区| 欧美日韩免费在线视频| 97精品久久久久中文字幕| 国产成人综合在线播放| 琪琪一区二区三区| 亚洲狠狠爱一区二区三区| 国产欧美一区二区精品性| 日韩亚洲欧美综合| 在线观看国产一区二区| 成人国产精品免费| 国内精品免费**视频| 视频一区二区中文字幕| 一区二区三区精品视频在线| 国产精品伦理一区二区| 国产日韩成人精品| 日本一区二区视频在线观看| 久久这里只有精品6| 欧美成人在线直播| 91精品国产乱码久久蜜臀| 欧美精品在线观看一区二区| 91亚洲国产成人精品一区二三| 成人永久免费视频| 不卡免费追剧大全电视剧网站| 国产永久精品大片wwwapp| 精品亚洲免费视频| 久久av中文字幕片| 精品亚洲国内自在自线福利| 麻豆成人免费电影| 国产综合久久久久影院| 国产大陆a不卡| 日韩欧美在线影院| 国产精品黄色在线观看| 成人一道本在线| 国产精品一区一区三区| 国产成人免费视频一区| 国产·精品毛片| 97久久精品人人做人人爽| 欧美三级韩国三级日本三斤| 欧美理论在线播放| 欧美成人激情免费网| 久久久国产精品午夜一区ai换脸| 久久精品亚洲精品国产欧美kt∨| 欧美激情艳妇裸体舞| 亚洲日本乱码在线观看| 亚洲国产色一区| 久久99国内精品| 成人av先锋影音| 777奇米四色成人影色区| 久久久噜噜噜久久中文字幕色伊伊 | 99视频一区二区| 欧美日韩在线综合| 欧美tickling网站挠脚心| 中国色在线观看另类| 亚洲国产日韩a在线播放性色| 免费的国产精品| 91视视频在线直接观看在线看网页在线看 | 色天使久久综合网天天| 在线成人高清不卡| 欧美激情一区二区三区| 亚洲国产精品久久不卡毛片| 精品一区二区三区免费播放| 成人av手机在线观看| 日韩一二三区视频| 亚洲免费观看高清完整| 精品无人码麻豆乱码1区2区| 99国产精品国产精品久久| 日韩欧美视频一区| 一区二区久久久| 成人综合婷婷国产精品久久免费| 欧美日韩国产美| 亚洲乱码国产乱码精品精小说| 蜜臀av一区二区| 91久久线看在观草草青青|