QSPI_SRECBootloader/bootloader.c
int SpiFlashGetFlagStatus(XSpi *SpiPtr)
{
	int Status;


	/*
	 * Prepare the Write Buffer.
	 */
	WriteBuffer[BYTE1] = COMMAND_STATUSFLAG_READ;


	Status = XSpi_Transfer(SpiPtr, WriteBuffer, ReadBuffer,
						STATUS_READ_BYTES);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function reads the Status Flag register of the Winbond Flash.
*
* @param	SpiPtr is a pointer to the instance of the Spi device.
*
* @return	XST_SUCCESS if successful else XST_FAILURE.
*
* @note		The status register content is stored at the second byte pointed
*		by the ReadBuffer.
*
******************************************************************************/
This function reads the Status Flag register of the Winbond Flash.
This function reads the Status Flag register of the Winbond Flash .
int SpiFlashGetFlagStatus(XSpi *SpiPtr)
{
	int Status;
	WriteBuffer[BYTE1] = COMMAND_STATUSFLAG_READ;
	Status = XSpi_Transfer(SpiPtr, WriteBuffer, ReadBuffer,
						STATUS_READ_BYTES);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int SpiFlashGetFlagStatus ( XSpi * SpiPtr ) { int Status ; WriteBuffer [ BYTE1 ] = COMMAND_STATUSFLAG_READ ; Status = XSpi_Transfer ( SpiPtr , WriteBuffer , ReadBuffer , STATUS_READ_BYTES ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function reads the Status Flag register of the Winbond Flash.
This function reads the Status Flag register of the Winbond Flash .
/*
	 * Prepare the Write Buffer.
	 */