XilinxProcessorIPLib/drivers/spi/examples/xspi_stm_flash_example.c
int SpiStmFlashWaitForFlashNotBusy(void)
{
	int Status;
	u8 StatusReg;

	while(1) {

		/*
		 * Get the Status Register.
		 */
		Status = SpiStmFlashGetStatus(&Spi);
		if(Status != XST_SUCCESS) {
			return XST_FAILURE;
		}

		/*
		 * Check if the flash is ready to accept the next command.
		 * If so break.
		 */
		StatusReg = ReadBuffer[1];
		if((StatusReg & STM_FLASH_SR_IS_READY_MASK) == 0) {
			break;
		}
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function waits till the STM serial Flash is ready to accept next command.
*
* @param	None
*
* @return	XST_SUCCESS if successful else XST_FAILURE.
*
* @note		This function reads the status register of the Buffer and waits
*.		till the WIP bit of the status register becomes 0.
*
******************************************************************************/
This function waits till the STM serial Flash is ready to accept next command.
@param None



@note          This function reads the status register of the Buffer and waits
.               till the WIP bit of the status register becomes 0.
This function waits till the STM serial Flash is ready to accept next command . @param None @note This function reads the status register of the Buffer and waits . till the WIP bit of the status register becomes 0 .
int SpiStmFlashWaitForFlashNotBusy(void)
{
	int Status;
	u8 StatusReg;
	while(1) {
		Status = SpiStmFlashGetStatus(&Spi);
		if(Status != XST_SUCCESS) {
			return XST_FAILURE;
		}
		StatusReg = ReadBuffer[1];
		if((StatusReg & STM_FLASH_SR_IS_READY_MASK) == 0) {
			break;
		}
	}
	return XST_SUCCESS;
}
int SpiStmFlashWaitForFlashNotBusy ( void ) { int Status ; u8 StatusReg ; while ( 1 ) { Status = SpiStmFlashGetStatus ( & Spi ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } StatusReg = ReadBuffer [ 1 ] ; if ( ( StatusReg & STM_FLASH_SR_IS_READY_MASK ) == 0 ) { break ; } } return XST_SUCCESS ; }
This function waits till the STM serial Flash is ready to accept next command.
This function waits till the STM serial Flash is ready to accept next command .
/*
		 * Get the Status Register.
		 */ /*
		 * Check if the flash is ready to accept the next command.
		 * If so break.
		 */