lib/sw_services/xilisf/src/xilisf_write.c
static int AutoPageWrite(XIsf *InstancePtr, u32 Address)
{
	int Status = (int)XST_FAILURE;

	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(Address != 0);


#if (XPAR_XISF_FLASH_FAMILY == ATMEL)
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_AUTOPAGE_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = (u8) (Address >> XISF_ADDR_SHIFT16);
	InstancePtr->WriteBufPtr[BYTE3] = (u8) (Address >> XISF_ADDR_SHIFT8);
	InstancePtr->WriteBufPtr[BYTE4] = (XISF_DUMMYBYTE);

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

	return Status;
}
/*****************************************************************************/
/**
 *
 * This function Auto rewrites the contents of a Page in the Serial Flash.
 *
 * @param	InstancePtr is a pointer to the XIsf instance.
 * @param	Address is the address of the page to be refreshed.
 *
 * @return	XST_SUCCESS if successful else XST_FAILURE.
 *
 * @note		This operation is only supported for Atmel Serial Flash.
 *
 ******************************************************************************/
This function Auto rewrites the contents of a Page in the Serial Flash.
@param       InstancePtr is a pointer to the XIsf instance.
@param       Address is the address of the page to be refreshed.



@note                This operation is only supported for Atmel Serial Flash.
This function Auto rewrites the contents of a Page in the Serial Flash . @param InstancePtr is a pointer to the XIsf instance . @param Address is the address of the page to be refreshed . @note This operation is only supported for Atmel Serial Flash .
static int AutoPageWrite(XIsf *InstancePtr, u32 Address)
{
	int Status = (int)XST_FAILURE;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(Address != 0);
#if (XPAR_XISF_FLASH_FAMILY == ATMEL)
	InstancePtr->WriteBufPtr[BYTE1] = XISF_CMD_AUTOPAGE_WRITE;
	InstancePtr->WriteBufPtr[BYTE2] = (u8) (Address >> XISF_ADDR_SHIFT16);
	InstancePtr->WriteBufPtr[BYTE3] = (u8) (Address >> XISF_ADDR_SHIFT8);
	InstancePtr->WriteBufPtr[BYTE4] = (XISF_DUMMYBYTE);
	Status = XIsf_Transfer(InstancePtr, InstancePtr->WriteBufPtr, NULL,
				XISF_CMD_SEND_EXTRA_BYTES);
	if (Status != (int)XST_SUCCESS)
		return (int)XST_FAILURE;
#endif 
	return Status;
}
static int AutoPageWrite ( XIsf * InstancePtr , u32 Address ) { int Status = ( int ) XST_FAILURE ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( Address != 0 ) ; #if ( XPAR_XISF_FLASH_FAMILY == ATMEL ) InstancePtr -> WriteBufPtr [ BYTE1 ] = XISF_CMD_AUTOPAGE_WRITE ; InstancePtr -> WriteBufPtr [ BYTE2 ] = ( u8 ) ( Address >> XISF_ADDR_SHIFT16 ) ; InstancePtr -> WriteBufPtr [ BYTE3 ] = ( u8 ) ( Address >> XISF_ADDR_SHIFT8 ) ; InstancePtr -> WriteBufPtr [ BYTE4 ] = ( XISF_DUMMYBYTE ) ; Status = XIsf_Transfer ( InstancePtr , InstancePtr -> WriteBufPtr , NULL , XISF_CMD_SEND_EXTRA_BYTES ) ; if ( Status != ( int ) XST_SUCCESS ) return ( int ) XST_FAILURE ; #endif return Status ; }
This function Auto rewrites the contents of a Page in the Serial Flash.
This function Auto rewrites the contents of a Page in the Serial Flash .
/*
	 * Initiate the Transfer.
	 */ /* (XPAR_XISF_FLASH_FAMILY == ATMEL) */