lib/sw_services/xilisf/src/xilisf_write.c
static int WriteSR(XIsf *InstancePtr, u8 SRData)
{
	int Status = (int)(XST_FAILURE);

#if ((XPAR_XISF_FLASH_FAMILY == INTEL) || \
	(XPAR_XISF_FLASH_FAMILY == STM) || \
	(XPAR_XISF_FLASH_FAMILY == WINBOND) || \
	(XPAR_XISF_FLASH_FAMILY == SPANSION) || \
	(XPAR_XISF_FLASH_FAMILY == SST))
	/*
	 * Prepare the Write Buffer.
	 */
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_STATUSREG_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = SRData;

	/*
	 * Initiate the Transfer.
	 */
	Status = XIsf_Transfer(InstancePtr, InstancePtr->WriteBufPtr, NULL,
						XISF_STATUS_RDWR_BYTES);
	if (Status != (int)XST_SUCCESS)
		return (int)XST_FAILURE;
#endif
/**
 * ((XPAR_XISF_FLASH_FAMILY==INTEL) || \
 * (XPAR_XISF_FLASH_FAMILY==STM) || \
 * (XPAR_XISF_FLASH_FAMILY == WINBOND) || \
 * (XPAR_XISF_FLASH_FAMILY == SPANSION))
 */

	return Status;
}
/*****************************************************************************/
/**
 *
 * This function writes data to the Status Register of the Serial Flash.
 *
 * @param	InstancePtr is a pointer to the XIsf instance.
 * @param	SRData is the value to be written to the Status Register
 *		of the Serial Flash.
 *
 * @return	XST_SUCCESS if successful else XST_FAILURE.
 *
 * @note	This operation is only supported in Intel, STM, Winbond and
 *		Spansion Serial Flash. This is the write of Status Register 1
 *		for Winbond devices, write of Status Register 2 is handled by
 *		WriteSR2.
 *
 ******************************************************************************/
This function writes data to the Status Register of the Serial Flash.
@param       InstancePtr is a pointer to the XIsf instance.
@param       SRData is the value to be written to the Status Register
of the Serial Flash.



@note        This operation is only supported in Intel, STM, Winbond and
Spansion Serial Flash. This is the write of Status Register 1
for Winbond devices, write of Status Register 2 is handled by
WriteSR2.
This function writes data to the Status Register of the Serial Flash . @param InstancePtr is a pointer to the XIsf instance . @param SRData is the value to be written to the Status Register of the Serial Flash . @note This operation is only supported in Intel STM Winbond and Spansion Serial Flash . This is the write of Status Register 1 for Winbond devices write of Status Register 2 is handled by WriteSR2 .
static int WriteSR(XIsf *InstancePtr, u8 SRData)
{
	int Status = (int)(XST_FAILURE);
#if ((XPAR_XISF_FLASH_FAMILY == INTEL) || \
	(XPAR_XISF_FLASH_FAMILY == STM) || \
	(XPAR_XISF_FLASH_FAMILY == WINBOND) || \
	(XPAR_XISF_FLASH_FAMILY == SPANSION) || \
	(XPAR_XISF_FLASH_FAMILY == SST))
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_STATUSREG_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = SRData;
	Status = XIsf_Transfer(InstancePtr, InstancePtr->WriteBufPtr, NULL,
						XISF_STATUS_RDWR_BYTES);
	if (Status != (int)XST_SUCCESS)
		return (int)XST_FAILURE;
#endif
	return Status;
}
static int WriteSR ( XIsf * InstancePtr , u8 SRData ) { int Status = ( int ) ( XST_FAILURE ) ; #if ( ( XPAR_XISF_FLASH_FAMILY == INTEL ) || ( XPAR_XISF_FLASH_FAMILY == STM ) || ( XPAR_XISF_FLASH_FAMILY == WINBOND ) || ( XPAR_XISF_FLASH_FAMILY == SPANSION ) || ( XPAR_XISF_FLASH_FAMILY == SST ) ) InstancePtr -> WriteBufPtr [ BYTE1 ] = XISF_CMD_STATUSREG_WRITE ; InstancePtr -> WriteBufPtr [ BYTE2 ] = SRData ; Status = XIsf_Transfer ( InstancePtr , InstancePtr -> WriteBufPtr , NULL , XISF_STATUS_RDWR_BYTES ) ; if ( Status != ( int ) XST_SUCCESS ) return ( int ) XST_FAILURE ; #endif return Status ; }
This function writes data to the Status Register of the Serial Flash.
This function writes data to the Status Register of the Serial Flash .
/*
	 * Prepare the Write Buffer.
	 */ /*
	 * Initiate the Transfer.
	 */ /**
 * ((XPAR_XISF_FLASH_FAMILY==INTEL) || \
 * (XPAR_XISF_FLASH_FAMILY==STM) || \
 * (XPAR_XISF_FLASH_FAMILY == WINBOND) || \
 * (XPAR_XISF_FLASH_FAMILY == SPANSION))
 */