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

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

?? xiic_l.c

?? u-boot1.3.0的原碼,從配了網絡驅動和FLASH的驅動,并該用ESC竟如
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: xiic_l.c,v 1.2 2002/12/05 19:32:40 meinelte Exp $ *//********************************************************************************	XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"*	AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND*	SOLUTIONS FOR XILINX DEVICES.  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 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.**	(c) Copyright 2002 Xilinx Inc.*	All rights reserved.*******************************************************************************//*****************************************************************************//**** @file xiic_l.c** This file contains low-level driver functions that can be used to access the* device.  The user should refer to the hardware device specification for more* details of the device operation.** <pre>* MODIFICATION HISTORY:** Ver	Who  Date     Changes* ----- --- -------  -----------------------------------------------* 1.01b jhl 5/13/02  First release* 1.01b jhl 10/14/02 Corrected bug in the receive function, the setup of the*		     interrupt status mask was not being done in the loop such*		     that a read would sometimes fail on the last byte because*		     the transmit error which should have been ignored was*		     being used.  This would leave an extra byte in the FIFO*		     and the bus throttled such that the next operation would*		     also fail.	 Also updated the receive function to not*		     disable the device after the last byte until after the*		     bus transitions to not busy which is more consistent*		     with the expected behavior.* 1.01c ecm 12/05/02 new rev* </pre>*****************************************************************************//***************************** Include Files *******************************/#include "xbasic_types.h"#include "xio.h"#include "xipif_v1_23_b.h"#include "xiic_l.h"/************************** Constant Definitions ***************************//**************************** Type Definitions *****************************//***************** Macros (Inline Functions) Definitions *******************//******************************************************************************** This macro clears the specified interrupt in the IPIF interrupt status* register.  It is non-destructive in that the register is read and only the* interrupt specified is cleared.  Clearing an interrupt acknowledges it.** @param    BaseAddress contains the IPIF registers base address.** @param    InterruptMask contains the interrupts to be disabled** @return** None.** @note** Signature: void XIic_mClearIisr(u32 BaseAddress,*				  u32 InterruptMask);*******************************************************************************/#define XIic_mClearIisr(BaseAddress, InterruptMask)		    \    XIIF_V123B_WRITE_IISR((BaseAddress),			    \	XIIF_V123B_READ_IISR(BaseAddress) & (InterruptMask))/******************************************************************************** This macro sends the address for a 7 bit address during both read and write* operations. It takes care of the details to format the address correctly.* This macro is designed to be called internally to the drivers.** @param    SlaveAddress contains the address of the slave to send to.** @param    Operation indicates XIIC_READ_OPERATION or XIIC_WRITE_OPERATION** @return** None.** @note** Signature: void XIic_mSend7BitAddr(u16 SlaveAddress, u8 Operation);*******************************************************************************/#define XIic_mSend7BitAddress(BaseAddress, SlaveAddress, Operation)	    \{									    \    u8 LocalAddr = (u8)(SlaveAddress << 1);			    \    LocalAddr = (LocalAddr & 0xFE) | (Operation);			    \    XIo_Out8(BaseAddress + XIIC_DTR_REG_OFFSET, LocalAddr);		    \}/************************** Function Prototypes ****************************/static unsigned RecvData (u32 BaseAddress, u8 * BufferPtr,			  unsigned ByteCount);static unsigned SendData (u32 BaseAddress, u8 * BufferPtr,			  unsigned ByteCount);/************************** Variable Definitions **************************//****************************************************************************//*** Receive data as a master on the IIC bus.  This function receives the data* using polled I/O and blocks until the data has been received.	 It only* supports 7 bit addressing and non-repeated start modes of operation.	The* user is responsible for ensuring the bus is not busy if multiple masters* are present on the bus.** @param    BaseAddress contains the base address of the IIC device.* @param    Address contains the 7 bit IIC address of the device to send the*	    specified data to.* @param    BufferPtr points to the data to be sent.* @param    ByteCount is the number of bytes to be sent.** @return** The number of bytes received.** @note** None*******************************************************************************/unsigned XIic_Recv (u32 BaseAddress, u8 Address,		    u8 * BufferPtr, unsigned ByteCount){	u8 CntlReg;	unsigned RemainingByteCount;	/* Tx error is enabled incase the address (7 or 10) has no device to answer	 * with Ack. When only one byte of data, must set NO ACK before address goes	 * out therefore Tx error must not be enabled as it will go off immediately	 * and the Rx full interrupt will be checked.  If full, then the one byte	 * was received and the Tx error will be disabled without sending an error	 * callback msg.	 */	XIic_mClearIisr (BaseAddress,			 XIIC_INTR_RX_FULL_MASK | XIIC_INTR_TX_ERROR_MASK |			 XIIC_INTR_ARB_LOST_MASK);	/* Set receive FIFO occupancy depth for 1 byte (zero based)	 */	XIo_Out8 (BaseAddress + XIIC_RFD_REG_OFFSET, 0);	/* 7 bit slave address, send the address for a read operation	 * and set the state to indicate the address has been sent	 */	XIic_mSend7BitAddress (BaseAddress, Address, XIIC_READ_OPERATION);	/* MSMS gets set after putting data in FIFO. Start the master receive	 * operation by setting CR Bits MSMS to Master, if the buffer is only one	 * byte, then it should not be acknowledged to indicate the end of data	 */	CntlReg = XIIC_CR_MSMS_MASK | XIIC_CR_ENABLE_DEVICE_MASK;	if (ByteCount == 1) {		CntlReg |= XIIC_CR_NO_ACK_MASK;	}	/* Write out the control register to start receiving data and call the	 * function to receive each byte into the buffer	 */	XIo_Out8 (BaseAddress + XIIC_CR_REG_OFFSET, CntlReg);	/* Clear the latched interrupt status for the bus not busy bit which must	 * be done while the bus is busy	 */	XIic_mClearIisr (BaseAddress, XIIC_INTR_BNB_MASK);	/* Try to receive the data from the IIC bus */	RemainingByteCount = RecvData (BaseAddress, BufferPtr, ByteCount);	/*	 * The receive is complete, disable the IIC device and return the number of	 * bytes that was received	 */	XIo_Out8 (BaseAddress + XIIC_CR_REG_OFFSET, 0);	/* Return the number of bytes that was received */	return ByteCount - RemainingByteCount;}/******************************************************************************** Receive the specified data from the device that has been previously addressed* on the IIC bus.  This function assumes that the 7 bit address has been sent* and it should wait for the transmit of the address to complete.** @param    BaseAddress contains the base address of the IIC device.* @param    BufferPtr points to the buffer to hold the data that is received.* @param    ByteCount is the number of bytes to be received.** @return** The number of bytes remaining to be received.** @note** This function does not take advantage of the receive FIFO because it is* designed for minimal code space and complexity.  It contains loops that* that could cause the function not to return if the hardware is not working.** This function assumes that the calling function will disable the IIC device* after this function returns.*******************************************************************************/static unsigned RecvData (u32 BaseAddress, u8 * BufferPtr, unsigned ByteCount){	u8 CntlReg;	u32 IntrStatusMask;	u32 IntrStatus;	/* Attempt to receive the specified number of bytes on the IIC bus */	while (ByteCount > 0) {		/* Setup the mask to use for checking errors because when receiving one		 * byte OR the last byte of a multibyte message an error naturally

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷综合久久久中文一区二区| 久久成人麻豆午夜电影| 91免费国产视频网站| 国产精品妹子av| 99国产精品久久久久久久久久 | 日韩毛片视频在线看| 国产乱色国产精品免费视频| 久久精品一区二区三区不卡| 波波电影院一区二区三区| 亚洲欧美日韩成人高清在线一区| 色婷婷综合五月| 日本视频一区二区三区| 久久久久久久久久久久久久久99| 国产精品69久久久久水密桃 | 亚洲黄色性网站| 欧美日韩一区久久| 国内精品视频666| 国产精品人成在线观看免费| 色婷婷国产精品| 老司机精品视频一区二区三区| 26uuu色噜噜精品一区二区| 成人永久aaa| 亚洲成人在线观看视频| 欧美精品一区二区三区高清aⅴ | 精品国产一区二区亚洲人成毛片| 国产激情视频一区二区三区欧美| 亚洲欧美日韩电影| 欧美sm极限捆绑bd| 91麻豆123| 国产一区在线观看视频| 一二三区精品福利视频| 欧美精品一区在线观看| 91福利精品第一导航| 麻豆国产精品视频| 亚洲精品成人a在线观看| 日韩免费视频一区| 91久久精品一区二区三区| 精品无码三级在线观看视频| 亚洲久草在线视频| 久久久久综合网| 欧美浪妇xxxx高跟鞋交| 不卡的av电影在线观看| 久久国产夜色精品鲁鲁99| 亚洲乱码中文字幕| 国产日韩精品久久久| 91麻豆精品国产无毒不卡在线观看 | 欧美日韩在线播放三区四区| 国产精品综合网| 日韩avvvv在线播放| 自拍偷自拍亚洲精品播放| 久久久久国产成人精品亚洲午夜| 欧美日韩dvd在线观看| 91在线码无精品| 国产suv精品一区二区883| 日本中文字幕不卡| 亚洲成人先锋电影| 亚洲乱码一区二区三区在线观看| 国产精品色哟哟| 久久久99久久| 欧美sm美女调教| 日韩免费高清视频| 日韩欧美国产一区二区三区| 欧美欧美欧美欧美| 91免费在线视频观看| 日韩精品一区国产麻豆| 99v久久综合狠狠综合久久| 国产一区二区三区在线观看免费视频| 中文字幕av在线一区二区三区| 亚洲图片欧美综合| 蜜臀av一区二区三区| 亚洲综合免费观看高清完整版在线 | 亚洲综合网站在线观看| 最好看的中文字幕久久| 国产精品成人免费| 国产精品成人免费| 中文字幕一区三区| 国产精品国产三级国产普通话三级| 久久久精品国产99久久精品芒果| 精品盗摄一区二区三区| 精品国产123| 精品国产一区二区在线观看| 精品国产第一区二区三区观看体验 | 人人精品人人爱| 麻豆精品一区二区av白丝在线| 日本视频中文字幕一区二区三区| 奇米色一区二区| 九九**精品视频免费播放| 麻豆精品久久久| 国产伦理精品不卡| 岛国一区二区三区| 一本在线高清不卡dvd| 欧美在线不卡视频| 欧美电影影音先锋| 日韩亚洲欧美一区| 国产亚洲婷婷免费| 国产精品日韩成人| 亚洲国产精品久久人人爱| 午夜精品久久久久久久久久| 美女视频网站久久| 国产精华液一区二区三区| 97精品视频在线观看自产线路二| 色又黄又爽网站www久久| 欧美日韩日日骚| 久久久久一区二区三区四区| 亚洲欧美在线视频观看| 亚洲成人黄色影院| 国产一区二区精品久久| 在线观看视频一区二区欧美日韩| 欧美日韩成人高清| 中文无字幕一区二区三区 | 亚洲成人免费在线观看| 蜜桃视频在线观看一区二区| 久久99久久99小草精品免视看| 国产高清精品网站| 欧美在线免费观看亚洲| 欧美一区二区三区免费视频 | 亚洲情趣在线观看| 日本视频中文字幕一区二区三区| 国产+成+人+亚洲欧洲自线| 欧美日韩情趣电影| 中文子幕无线码一区tr| 日韩精品成人一区二区三区| 福利电影一区二区| 91精品国产综合久久久久| 中文字幕电影一区| 麻豆国产一区二区| 在线观看亚洲精品视频| 一区二区三区成人在线视频| 久久99国产精品久久99 | 亚洲国产精品尤物yw在线观看| 国产在线精品一区二区不卡了 | 欧美中文字幕久久| 2020国产成人综合网| 一级做a爱片久久| 国产成人精品www牛牛影视| 欧美精品乱码久久久久久按摩| 国产精品久久久久久久久免费相片| 日韩精品乱码av一区二区| 色婷婷综合激情| 国产精品欧美极品| 精品在线视频一区| 欧美精品高清视频| 樱花草国产18久久久久| 成人免费观看男女羞羞视频| 日韩欧美久久久| 男人的天堂久久精品| 欧美日韩精品一区二区三区四区| 国产精品久久久久久久久免费樱桃| 国产曰批免费观看久久久| 日韩一区二区精品葵司在线| 亚洲国产成人91porn| 色婷婷国产精品综合在线观看| 国产精品色噜噜| 国产 日韩 欧美大片| 久久欧美一区二区| 精品无人区卡一卡二卡三乱码免费卡| 欧美喷水一区二区| 亚洲一区二区精品3399| 91传媒视频在线播放| 欧美激情一区二区三区不卡 | 成人av网在线| 久久精品欧美一区二区三区不卡 | 99精品黄色片免费大全| 中文幕一区二区三区久久蜜桃| 国产精品一区二区x88av| 久久亚洲私人国产精品va媚药| 热久久国产精品| 精品欧美乱码久久久久久| 另类小说图片综合网| 精品日韩av一区二区| 韩国成人精品a∨在线观看| 69堂成人精品免费视频| 奇米精品一区二区三区在线观看一 | 欧美96一区二区免费视频| 日韩欧美视频在线| 国内精品国产三级国产a久久| 精品国产sm最大网站免费看| 国模套图日韩精品一区二区| 久久蜜桃一区二区| eeuss鲁一区二区三区| **网站欧美大片在线观看| 色狠狠一区二区三区香蕉| 一区二区欧美精品| 久久久精品国产免大香伊| jvid福利写真一区二区三区| 亚洲视频电影在线| 欧美高清www午色夜在线视频| 美女视频黄a大片欧美| 久久精品夜色噜噜亚洲a∨| 成人免费观看视频| 亚洲成人动漫一区| 久久这里只有精品6| aaa亚洲精品| 亚洲1区2区3区视频| 精品福利在线导航| 91一区二区三区在线观看| 偷拍一区二区三区| 久久久久久免费| 色久综合一二码| 狠狠久久亚洲欧美|