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

	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(SRData != NULL);

#if (XPAR_XISF_FLASH_FAMILY == WINBOND)
	/*
	 * Prepare the Write Buffer.
	 */
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_STATUSREG_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = *SRData++;
	InstancePtr->WriteBufPtr[BYTE3] = *SRData;

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

	return Status;
}
/*****************************************************************************/
/**
 *
 * This function writes data to Status Register of the Serial Flash. This API
 * should be used to write to the 16 bit status register in Winbond Quad Flash
 * (W25QXX).
 *
 * @param	InstancePtr is a pointer to the XIsf instance.
 * @param	SRData is of type (u8*) and points to the 16 bit 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 Winbond (W25QXX) Serial
 *		Flash.
 *
 ******************************************************************************/
This function writes data to Status Register of the Serial Flash. This API
should be used to write to the 16 bit status register in Winbond Quad Flash
(W25QXX).

@param       InstancePtr is a pointer to the XIsf instance.
@param       SRData is of type (u8*) and points to the 16 bit value to be
written to the Status Register of the Serial Flash.



@note        This operation is only supported in Winbond (W25QXX) Serial
Flash.
This function writes data to Status Register of the Serial Flash . This API should be used to write to the 16 bit status register in Winbond Quad Flash ( W25QXX ) . @param InstancePtr is a pointer to the XIsf instance . @param SRData is of type ( u8 * ) and points to the 16 bit value to be written to the Status Register of the Serial Flash . @note This operation is only supported in Winbond ( W25QXX ) Serial Flash .
static int WriteSR2(XIsf *InstancePtr, u8 *SRData)
{
	int Status = (int)XST_FAILURE;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(SRData != NULL);
#if (XPAR_XISF_FLASH_FAMILY == WINBOND)
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_STATUSREG_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = *SRData++;
	InstancePtr->WriteBufPtr[BYTE3] = *SRData;
	Status = XIsf_Transfer(InstancePtr, InstancePtr->WriteBufPtr, NULL,
						XISF_STATUS_RDWR_BYTES + 1);
	if (Status != (int)XST_SUCCESS)
		return (int)XST_FAILURE;
#endif 
	return Status;
}
static int WriteSR2 ( XIsf * InstancePtr , u8 * SRData ) { int Status = ( int ) XST_FAILURE ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( SRData != NULL ) ; #if ( XPAR_XISF_FLASH_FAMILY == WINBOND ) InstancePtr -> WriteBufPtr [ BYTE1 ] = XISF_CMD_STATUSREG_WRITE ; InstancePtr -> WriteBufPtr [ BYTE2 ] = * SRData ++ ; InstancePtr -> WriteBufPtr [ BYTE3 ] = * SRData ; Status = XIsf_Transfer ( InstancePtr , InstancePtr -> WriteBufPtr , NULL , XISF_STATUS_RDWR_BYTES + 1 ) ; if ( Status != ( int ) XST_SUCCESS ) return ( int ) XST_FAILURE ; #endif return Status ; }
This function writes data to Status Register of the Serial Flash.
This function writes data to Status Register of the Serial Flash .
/*
	 * Prepare the Write Buffer.
	 */ /*
	 * Initiate the Transfer.
	 */ /* (XPAR_XISF_FLASH_FAMILY == WINBOND) */