XilinxProcessorIPLib/drivers/axicdma/src/xaxicdma_bdring.c
XAxiCdma_Bd *XAxiCdma_BdRingGetCurrBd(XAxiCdma *InstancePtr)
{

	if (InstancePtr->AddrWidth > 32) {
		return (XAxiCdma_Bd *)(UINTPTR)((XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_OFFSET)) |
		((uint64_t)(XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_MSB_OFFSET)) << 32U));
	} else {
		return (XAxiCdma_Bd *)(UINTPTR)(XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_OFFSET));
	}
}
/*****************************************************************************/
/**
 * This function grabs a copy of the current BD pointer from the hardware.
 *
 * @param	InstancePtr is the driver instance we are working on
 *
 * @return	The BD pointer in CDESC register
 *
 * @note	None.
 *
 *****************************************************************************/
This function grabs a copy of the current BD pointer from the hardware.
@param       InstancePtr is the driver instance we are working on

@return      The BD pointer in CDESC register

@note        None.
This function grabs a copy of the current BD pointer from the hardware . @param InstancePtr is the driver instance we are working on @return The BD pointer in CDESC register @note None .
XAxiCdma_Bd *XAxiCdma_BdRingGetCurrBd(XAxiCdma *InstancePtr)
{
	if (InstancePtr->AddrWidth > 32) {
		return (XAxiCdma_Bd *)(UINTPTR)((XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_OFFSET)) |
		((uint64_t)(XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_MSB_OFFSET)) << 32U));
	} else {
		return (XAxiCdma_Bd *)(UINTPTR)(XAxiCdma_BdRead(InstancePtr->BaseAddr, XAXICDMA_CDESC_OFFSET));
	}
}
XAxiCdma_Bd * XAxiCdma_BdRingGetCurrBd ( XAxiCdma * InstancePtr ) { if ( InstancePtr -> AddrWidth > 32 ) { return ( XAxiCdma_Bd * ) ( UINTPTR ) ( ( XAxiCdma_BdRead ( InstancePtr -> BaseAddr , XAXICDMA_CDESC_OFFSET ) ) | ( ( uint64_t ) ( XAxiCdma_BdRead ( InstancePtr -> BaseAddr , XAXICDMA_CDESC_MSB_OFFSET ) ) << 32U ) ) ; } else { return ( XAxiCdma_Bd * ) ( UINTPTR ) ( XAxiCdma_BdRead ( InstancePtr -> BaseAddr , XAXICDMA_CDESC_OFFSET ) ) ; } }
This function grabs a copy of the current BD pointer from the hardware.
This function grabs a copy of the current BD pointer from the hardware .