XilinxProcessorIPLib/drivers/mcdma/src/xmcdma.c
u16 XMcdma_GetTxChanServiced(XMcdma *InstancePtr)
{
	u16 ServReg;
	u16 Chan_id = 0;

	ServReg = XMcdma_ReadReg(InstancePtr->Config.BaseAddress,
				 XMCDMA_CHSER_OFFSET);
	while(ServReg >>= 1)
		Chan_id++;

	Chan_id += 1;

	return Chan_id;
}
/*****************************************************************************/
/**
*
* Gets the last serviced mm2s channel number.
*
* @param	InstancePtr is a pointer to the DMA engine instance to be
*		worked on.
*
* @return
* 		- Channel id that last serviced.
*
* @note		None
*
******************************************************************************/
Gets the last serviced mm2s channel number.
Gets the last serviced mm2s channel number .
u16 XMcdma_GetTxChanServiced(XMcdma *InstancePtr)
{
	u16 ServReg;
	u16 Chan_id = 0;
	ServReg = XMcdma_ReadReg(InstancePtr->Config.BaseAddress,
				 XMCDMA_CHSER_OFFSET);
	while(ServReg >>= 1)
		Chan_id++;
	Chan_id += 1;
	return Chan_id;
}
u16 XMcdma_GetTxChanServiced ( XMcdma * InstancePtr ) { u16 ServReg ; u16 Chan_id = 0 ; ServReg = XMcdma_ReadReg ( InstancePtr -> Config . BaseAddress , XMCDMA_CHSER_OFFSET ) ; while ( ServReg >>= 1 ) Chan_id ++ ; Chan_id += 1 ; return Chan_id ; }
Gets the last serviced mm2s channel number.
Gets the last serviced mm2s channel number .