XilinxProcessorIPLib/drivers/axidma/src/xaxidma_bd.c
u32 XAxiDma_BdSetBufAddrMicroMode(XAxiDma_Bd* BdPtr, UINTPTR Addr)
{
	if (Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN) {
			xil_printf("Error set buf addr %x and %x,"
			" %x\r\n", Addr, XAXIDMA_MICROMODE_MIN_BUF_ALIGN,
			Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN);

			return XST_INVALID_PARAM;
	}

#if defined(__aarch64__) || defined(__arch64__)
	XAxiDma_BdWrite64(BdPtr, XAXIDMA_BD_BUFA_OFFSET, Addr);
#else
	XAxiDma_BdWrite(BdPtr, XAXIDMA_BD_BUFA_OFFSET, Addr);
#endif

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 * Set the BD's buffer address when configured for Micro Mode.  The buffer
 * address should be 4K aligned.
 *
 * @param	BdPtr is the BD to operate on
 * @param	Addr is the address to set
 *
 * @return
 *		- XST_SUCCESS if buffer address set successfully
 *		- XST_INVALID_PARAM if hardware has no DRE and address is not
 *		aligned
 *
 * @note	This function can be used only when DMA is in SG mode
 *
 *****************************************************************************/
Set the BD's buffer address when configured for Micro Mode.  The buffer
address should be 4K aligned.

@param       BdPtr is the BD to operate on
@param       Addr is the address to set

@return
- XST_SUCCESS if buffer address set successfully
- XST_INVALID_PARAM if hardware has no DRE and address is not
aligned

@note        This function can be used only when DMA is in SG mode
Set the BD ' s buffer address when configured for Micro Mode . The buffer address should be 4K aligned . @param BdPtr is the BD to operate on @param Addr is the address to set @return - XST_SUCCESS if buffer address set successfully - XST_INVALID_PARAM if hardware has no DRE and address is not aligned @note This function can be used only when DMA is in SG mode
u32 XAxiDma_BdSetBufAddrMicroMode(XAxiDma_Bd* BdPtr, UINTPTR Addr)
{
	if (Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN) {
			xil_printf("Error set buf addr %x and %x,"
			" %x\r\n", Addr, XAXIDMA_MICROMODE_MIN_BUF_ALIGN,
			Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN);
			return XST_INVALID_PARAM;
	}
#if defined(__aarch64__) || defined(__arch64__)
	XAxiDma_BdWrite64(BdPtr, XAXIDMA_BD_BUFA_OFFSET, Addr);
#else
	XAxiDma_BdWrite(BdPtr, XAXIDMA_BD_BUFA_OFFSET, Addr);
#endif
	return XST_SUCCESS;
}
u32 XAxiDma_BdSetBufAddrMicroMode ( XAxiDma_Bd * BdPtr , UINTPTR Addr ) { if ( Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN ) { xil_printf ( " " " \r \n " , Addr , XAXIDMA_MICROMODE_MIN_BUF_ALIGN , Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN ) ; return XST_INVALID_PARAM ; } #if defined ( __aarch64__ ) || defined ( __arch64__ ) XAxiDma_BdWrite64 ( BdPtr , XAXIDMA_BD_BUFA_OFFSET , Addr ) ; #else XAxiDma_BdWrite ( BdPtr , XAXIDMA_BD_BUFA_OFFSET , Addr ) ; #endif return XST_SUCCESS ; }
Set the BD's buffer address when configured for Micro Mode.
Set the BD ' s buffer address when configured for Micro Mode .