lib/sw_services/xilisf/examples/xilisf_spips_sst_polled_example.c
int FlashWrite(XIsf *InstancePtr, u32 Address, u32 ByteCount, u8 Command)
{
	XIsf_WriteParam WriteParam;

	int Status = XST_FAILURE;

	WriteEnable(InstancePtr);

	WriteParam.Address = Address;
	WriteParam.NumBytes = ByteCount;
	WriteParam.WritePtr = WriteBuffer;

	/*
	 * Perform the Write operation.
	 */
	Status = XIsf_Write(&Isf, Command, (void*) &WriteParam);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Wait till the Flash is not Busy.
	 */
	Status = IsfWaitForFlashNotBusy();
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
/******************************************************************************
*
*
* This function writes to the  serial FLASH connected to the SPI interface.
*
* @param	InstancePtr is a pointer to the XIsf component to use.
* @param	Address contains the address to write data to in the FLASH.
* @param	ByteCount contains the number of bytes to write.
* @param	Command is the command used to write data to the flash.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function writes to the  serial FLASH connected to the SPI interface.
This function writes to the serial FLASH connected to the SPI interface .
int FlashWrite(XIsf *InstancePtr, u32 Address, u32 ByteCount, u8 Command)
{
	XIsf_WriteParam WriteParam;
	int Status = XST_FAILURE;
	WriteEnable(InstancePtr);
	WriteParam.Address = Address;
	WriteParam.NumBytes = ByteCount;
	WriteParam.WritePtr = WriteBuffer;
	Status = XIsf_Write(&Isf, Command, (void*) &WriteParam);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = IsfWaitForFlashNotBusy();
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int FlashWrite ( XIsf * InstancePtr , u32 Address , u32 ByteCount , u8 Command ) { XIsf_WriteParam WriteParam ; int Status = XST_FAILURE ; WriteEnable ( InstancePtr ) ; WriteParam . Address = Address ; WriteParam . NumBytes = ByteCount ; WriteParam . WritePtr = WriteBuffer ; Status = XIsf_Write ( & Isf , Command , ( void * ) & WriteParam ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = IsfWaitForFlashNotBusy ( ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function writes to the  serial FLASH connected to the SPI interface.
This function writes to the serial FLASH connected to the SPI interface .
/*
	 * Perform the Write operation.
	 */ /*
	 * Wait till the Flash is not Busy.
	 */