XilinxProcessorIPLib/drivers/nandps/src/xnandps_onfi.c
static void Onfi_ReadData(XNandPs *InstancePtr, u8 *Buf, u32 Length)
{
	u32 Index;

	/*
	 * 8-bit/16-bit access for basic read operations
	 */
	for(Index = 0; Index < Length; Index++) {

		if (InstancePtr->Config.FlashWidth == XNANDPS_FLASH_WIDTH_16)
			Buf[Index] = (u8)Xil_In16(InstancePtr->DataPhaseAddr);
		else
			Buf[Index] = Xil_In8(InstancePtr->DataPhaseAddr);
	}
}
/**************************************************************************/
/**
*
* This function reads the data from flash. It is used for reading the control
* information from flash like ID and Parameter page.
*
* @param	InstancePtr is a pointer to the XNandPs instance.
* @param	Buf is the buffer pointer to read the data.
* @param	Length is the length of data to read.
*
* @return	None
*
* @note		None
*
***************************************************************************/
This function reads the data from flash. It is used for reading the control
information from flash like ID and Parameter page.
This function reads the data from flash . It is used for reading the control information from flash like ID and Parameter page .
static void Onfi_ReadData(XNandPs *InstancePtr, u8 *Buf, u32 Length)
{
	u32 Index;
	for(Index = 0; Index < Length; Index++) {
		if (InstancePtr->Config.FlashWidth == XNANDPS_FLASH_WIDTH_16)
			Buf[Index] = (u8)Xil_In16(InstancePtr->DataPhaseAddr);
		else
			Buf[Index] = Xil_In8(InstancePtr->DataPhaseAddr);
	}
}
static void Onfi_ReadData ( XNandPs * InstancePtr , u8 * Buf , u32 Length ) { u32 Index ; for ( Index = 0 ; Index < Length ; Index ++ ) { if ( InstancePtr -> Config . FlashWidth == XNANDPS_FLASH_WIDTH_16 ) Buf [ Index ] = ( u8 ) Xil_In16 ( InstancePtr -> DataPhaseAddr ) ; else Buf [ Index ] = Xil_In8 ( InstancePtr -> DataPhaseAddr ) ; } }
This function reads the data from flash.
This function reads the data from flash .
/*
	 * 8-bit/16-bit access for basic read operations
	 */