XilinxProcessorIPLib/drivers/nandps/src/xnandps_onfi.c
u8 Onfi_CmdReadStatus(XNandPs *InstancePtr)
{
	u8 Status;

	XNandPs_SendCommand(InstancePtr, &OnfiCommands[READ_STATUS],
			XNANDPS_PAGE_NOT_VALID, XNANDPS_COLUMN_NOT_VALID);

	if(InstancePtr->Config.FlashWidth == XNANDPS_FLASH_WIDTH_16)
		Status = (u8) Xil_In16(InstancePtr->DataPhaseAddr);
	else
		Status = Xil_In8(InstancePtr->DataPhaseAddr);

	return Status;
}
/**************************************************************************/
/**
*
* This function sends read status command to the flash device.
*
* @param	InstancePtr is a pointer to the XNandPs instance.
*
* @return	flash status value read
*
* @note		None
*
***************************************************************************/
This function sends read status command to the flash device.
This function sends read status command to the flash device .
u8 Onfi_CmdReadStatus(XNandPs *InstancePtr)
{
	u8 Status;
	XNandPs_SendCommand(InstancePtr, &OnfiCommands[READ_STATUS],
			XNANDPS_PAGE_NOT_VALID, XNANDPS_COLUMN_NOT_VALID);
	if(InstancePtr->Config.FlashWidth == XNANDPS_FLASH_WIDTH_16)
		Status = (u8) Xil_In16(InstancePtr->DataPhaseAddr);
	else
		Status = Xil_In8(InstancePtr->DataPhaseAddr);
	return Status;
}
u8 Onfi_CmdReadStatus ( XNandPs * InstancePtr ) { u8 Status ; XNandPs_SendCommand ( InstancePtr , & OnfiCommands [ READ_STATUS ] , XNANDPS_PAGE_NOT_VALID , XNANDPS_COLUMN_NOT_VALID ) ; if ( InstancePtr -> Config . FlashWidth == XNANDPS_FLASH_WIDTH_16 ) Status = ( u8 ) Xil_In16 ( InstancePtr -> DataPhaseAddr ) ; else Status = Xil_In8 ( InstancePtr -> DataPhaseAddr ) ; return Status ; }
This function sends read status command to the flash device.
This function sends read status command to the flash device .