XilinxProcessorIPLib/drivers/audio_formatter/src/xaudioformatter.c
void XAudioFormatterDMAStart(XAudioFormatter *InstancePtr)
{
	u32 val;
	u32 offset;

	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	if (InstancePtr->ChannelId == XAudioFormatter_S2MM) {
		offset = XAUD_FORMATTER_S2MM_OFFSET;
	}
	if (InstancePtr->ChannelId == XAudioFormatter_MM2S) {
		offset = XAUD_FORMATTER_MM2S_OFFSET;
	}
	val = XAudioFormatter_ReadReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset);
	val |= XAUD_CTRL_DMA_EN_MASK;
	XAudioFormatter_WriteReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset, val);
}
/*****************************************************************************/
/**
*
* This function starts the dma for audio formatter core.
*
* @param	InstancePtr is a pointer to the XAudioFormatter instance.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function starts the dma for audio formatter core.
This function starts the dma for audio formatter core .
void XAudioFormatterDMAStart(XAudioFormatter *InstancePtr)
{
	u32 val;
	u32 offset;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	if (InstancePtr->ChannelId == XAudioFormatter_S2MM) {
		offset = XAUD_FORMATTER_S2MM_OFFSET;
	}
	if (InstancePtr->ChannelId == XAudioFormatter_MM2S) {
		offset = XAUD_FORMATTER_MM2S_OFFSET;
	}
	val = XAudioFormatter_ReadReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset);
	val |= XAUD_CTRL_DMA_EN_MASK;
	XAudioFormatter_WriteReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset, val);
}
void XAudioFormatterDMAStart ( XAudioFormatter * InstancePtr ) { u32 val ; u32 offset ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; if ( InstancePtr -> ChannelId == XAudioFormatter_S2MM ) { offset = XAUD_FORMATTER_S2MM_OFFSET ; } if ( InstancePtr -> ChannelId == XAudioFormatter_MM2S ) { offset = XAUD_FORMATTER_MM2S_OFFSET ; } val = XAudioFormatter_ReadReg ( InstancePtr -> BaseAddress , XAUD_FORMATTER_CTRL + offset ) ; val |= XAUD_CTRL_DMA_EN_MASK ; XAudioFormatter_WriteReg ( InstancePtr -> BaseAddress , XAUD_FORMATTER_CTRL + offset , val ) ; }
This function starts the dma for audio formatter core.
This function starts the dma for audio formatter core .