lib/sw_apps/img_rcvry/src/xbir_sd.c
int Xbir_SdRead(u64 SrcAddr, u8* DestAddr, u64 Length)
{
	int Status = XST_FAILURE;
	u16 NumOfBlocks = (Length / XBIR_SDPS_BLOCK_SIZE);
	u64 BlockNumber = (SrcAddr / XBIR_SDPS_BLOCK_SIZE);

	Status  = XSdPs_ReadPolled(&SdInstance, BlockNumber, NumOfBlocks,
		(u8*)DestAddr);

	return Status;
}
/*****************************************************************************/
/**
 * @brief
 * This function is used to copy the data from SD card to destination
 * address.
 *
 * @param 	SrcAddr Address of SD card where copy should start from
 * @param 	DestAddr Pointer to destination where it should copy to
 * @param	Length Number of data bytes to be copied
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
 *****************************************************************************/
@brief
This function is used to copy the data from SD card to destination
address.

@param       SrcAddr Address of SD card where copy should start from
@param       DestAddr Pointer to destination where it should copy to
@param       Length Number of data bytes to be copied

@return      XST_SUCCESS on success and error code on failure
@brief This function is used to copy the data from SD card to destination address . @param SrcAddr Address of SD card where copy should start from @param DestAddr Pointer to destination where it should copy to @param Length Number of data bytes to be copied @return XST_SUCCESS on success and error code on failure
int Xbir_SdRead(u64 SrcAddr, u8* DestAddr, u64 Length)
{
	int Status = XST_FAILURE;
	u16 NumOfBlocks = (Length / XBIR_SDPS_BLOCK_SIZE);
	u64 BlockNumber = (SrcAddr / XBIR_SDPS_BLOCK_SIZE);
	Status  = XSdPs_ReadPolled(&SdInstance, BlockNumber, NumOfBlocks,
		(u8*)DestAddr);
	return Status;
}
int Xbir_SdRead ( u64 SrcAddr , u8 * DestAddr , u64 Length ) { int Status = XST_FAILURE ; u16 NumOfBlocks = ( Length / XBIR_SDPS_BLOCK_SIZE ) ; u64 BlockNumber = ( SrcAddr / XBIR_SDPS_BLOCK_SIZE ) ; Status = XSdPs_ReadPolled ( & SdInstance , BlockNumber , NumOfBlocks , ( u8 * ) DestAddr ) ; return Status ; }
@brief
 This function is used to copy the data from SD card to destination
 address.
@brief This function is used to copy the data from SD card to destination address .