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

	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_RESET_MASK;
	XAudioFormatter_WriteReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset, val);
	while (XAudioFormatter_ReadReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset) & XAUD_CTRL_RESET_MASK);
}
/************************** Function Definitions *****************************/
/*****************************************************************************/
/**
*
* This function soft resets the audio formatter DMA core.
*
* @param	InstancePtr is a pointer to the XAudioFormatter instance.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
Function Definitions
This function soft resets the audio formatter DMA core.
Function Definitions This function soft resets the audio formatter DMA core .
void XAudioFormatterDMAReset(XAudioFormatter *InstancePtr)
{
	u32 offset;
	u32 val;
	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_RESET_MASK;
	XAudioFormatter_WriteReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset, val);
	while (XAudioFormatter_ReadReg(InstancePtr->BaseAddress,
		XAUD_FORMATTER_CTRL + offset) & XAUD_CTRL_RESET_MASK);
}
void XAudioFormatterDMAReset ( XAudioFormatter * InstancePtr ) { u32 offset ; u32 val ; 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_RESET_MASK ; XAudioFormatter_WriteReg ( InstancePtr -> BaseAddress , XAUD_FORMATTER_CTRL + offset , val ) ; while ( XAudioFormatter_ReadReg ( InstancePtr -> BaseAddress , XAUD_FORMATTER_CTRL + offset ) & XAUD_CTRL_RESET_MASK ) ; }
Function Definitions
This function soft resets the audio formatter DMA core.
Function Definitions This function soft resets the audio formatter DMA core .