XilinxProcessorIPLib/drivers/dpdma/src/xdpdma.c
static void XDpDma_SetupAudioDescriptor(XDpDma_Descriptor *CurrDesc,
					u32 DataSize, u64 BuffAddr,
					XDpDma_Descriptor *NextDesc)
{
	Xil_AssertVoid(CurrDesc != NULL);
	Xil_AssertVoid(DataSize != 0U);
	Xil_AssertVoid(BuffAddr != 0U);
	u64 DescAddr = (UINTPTR) NextDesc;
	if(NextDesc == NULL) {
		CurrDesc->Control = XDPDMA_DESC_PREAMBLE |
			XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE |
			XDPDMA_DESC_COMP_INTR;

	}
	else {
		CurrDesc->Control = XDPDMA_DESC_PREAMBLE |
			XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE;
	}
	CurrDesc->DSCR_ID = 0;
	CurrDesc->XFER_SIZE = DataSize;
	CurrDesc->LINE_SIZE_STRIDE = 0;
	CurrDesc->LSB_Timestamp = 0;
	CurrDesc->MSB_Timestamp = 0;
	CurrDesc->ADDR_EXT = (((u32)
			       (BuffAddr >> XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH) <<
			       XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT)) |
			       (UPPER_32_BITS(DescAddr));
	CurrDesc->NEXT_DESR = LOWER_32_BITS(DescAddr);
	CurrDesc->SRC_ADDR =  LOWER_32_BITS(BuffAddr);
}
/*************************************************************************/
/**
 *
 * This functions sets the Audio Descriptor for Data Transfer.
 *
 * @param    CurrDesc is a pointer to the descriptor to be initialized
 * @param    DataSize is the payload size of the buffer to be transferred
 * @param    BuffAddr is the payload address
 *
 * @return   None.
 *
 * @note     None.
 *
 * **************************************************************************/
This functions sets the Audio Descriptor for Data Transfer.
@param    CurrDesc is a pointer to the descriptor to be initialized
@param    DataSize is the payload size of the buffer to be transferred
@param    BuffAddr is the payload address

@return   None.

@note     None.
This functions sets the Audio Descriptor for Data Transfer . @param CurrDesc is a pointer to the descriptor to be initialized @param DataSize is the payload size of the buffer to be transferred @param BuffAddr is the payload address @return None . @note None .
static void XDpDma_SetupAudioDescriptor(XDpDma_Descriptor *CurrDesc,
					u32 DataSize, u64 BuffAddr,
					XDpDma_Descriptor *NextDesc)
{
	Xil_AssertVoid(CurrDesc != NULL);
	Xil_AssertVoid(DataSize != 0U);
	Xil_AssertVoid(BuffAddr != 0U);
	u64 DescAddr = (UINTPTR) NextDesc;
	if(NextDesc == NULL) {
		CurrDesc->Control = XDPDMA_DESC_PREAMBLE |
			XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE |
			XDPDMA_DESC_COMP_INTR;
	}
	else {
		CurrDesc->Control = XDPDMA_DESC_PREAMBLE |
			XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE;
	}
	CurrDesc->DSCR_ID = 0;
	CurrDesc->XFER_SIZE = DataSize;
	CurrDesc->LINE_SIZE_STRIDE = 0;
	CurrDesc->LSB_Timestamp = 0;
	CurrDesc->MSB_Timestamp = 0;
	CurrDesc->ADDR_EXT = (((u32)
			       (BuffAddr >> XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH) <<
			       XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT)) |
			       (UPPER_32_BITS(DescAddr));
	CurrDesc->NEXT_DESR = LOWER_32_BITS(DescAddr);
	CurrDesc->SRC_ADDR =  LOWER_32_BITS(BuffAddr);
}
static void XDpDma_SetupAudioDescriptor ( XDpDma_Descriptor * CurrDesc , u32 DataSize , u64 BuffAddr , XDpDma_Descriptor * NextDesc ) { Xil_AssertVoid ( CurrDesc != NULL ) ; Xil_AssertVoid ( DataSize != 0U ) ; Xil_AssertVoid ( BuffAddr != 0U ) ; u64 DescAddr = ( UINTPTR ) NextDesc ; if ( NextDesc == NULL ) { CurrDesc -> Control = XDPDMA_DESC_PREAMBLE | XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE | XDPDMA_DESC_COMP_INTR ; } else { CurrDesc -> Control = XDPDMA_DESC_PREAMBLE | XDPDMA_DESC_UPDATE | XDPDMA_DESC_IGNR_DONE ; } CurrDesc -> DSCR_ID = 0 ; CurrDesc -> XFER_SIZE = DataSize ; CurrDesc -> LINE_SIZE_STRIDE = 0 ; CurrDesc -> LSB_Timestamp = 0 ; CurrDesc -> MSB_Timestamp = 0 ; CurrDesc -> ADDR_EXT = ( ( ( u32 ) ( BuffAddr >> XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH ) << XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT ) ) | ( UPPER_32_BITS ( DescAddr ) ) ; CurrDesc -> NEXT_DESR = LOWER_32_BITS ( DescAddr ) ; CurrDesc -> SRC_ADDR = LOWER_32_BITS ( BuffAddr ) ; }
This functions sets the Audio Descriptor for Data Transfer.
This functions sets the Audio Descriptor for Data Transfer .