XilinxProcessorIPLib/drivers/axidma/src/xaxidma_bd.c
u32 XAxiDma_BdGetAppWord(XAxiDma_Bd* BdPtr, int Offset, int *Valid)
{
	*Valid = 0;

	if (XAxiDma_BdRead(BdPtr, XAXIDMA_BD_HAS_STSCNTRL_OFFSET) == 0) {

		xdbg_printf(XDBG_DEBUG_ERROR, "BdRingGetAppWord: no sts cntrl "
			"stream in hardware build, no app word available\r\n");

		return (u32)0;
	}

	if((Offset < 0) || (Offset > XAXIDMA_LAST_APPWORD)) {

		xdbg_printf(XDBG_DEBUG_ERROR, "BdRingGetAppWord: invalid"
			" offset %d", Offset);

		return (u32)0;
	}

	*Valid = 1;

	return XAxiDma_BdRead(BdPtr, XAXIDMA_BD_USR0_OFFSET + Offset * 4);
}
/*****************************************************************************/
/**
 * Get the APP word at the specified APP word offset for a BD.
 *
 * @param	BdPtr is the BD to operate on.
 * @param	Offset is the offset inside the APP word, it is valid from
 *		0 to 4
 * @param	Valid is to tell the caller whether parameters are valid
 *
 * @returns
 *		The APP word. Passed in parameter Valid holds 0 for failure,
 *		and 1 for success.
 *
 * @note	This function can be used only when DMA is in SG mode
 *
 *****************************************************************************/
Get the APP word at the specified APP word offset for a BD.
@param       BdPtr is the BD to operate on.
@param       Offset is the offset inside the APP word, it is valid from
0 to 4
@param       Valid is to tell the caller whether parameters are valid

@returns
The APP word. Passed in parameter Valid holds 0 for failure,
and 1 for success.

@note        This function can be used only when DMA is in SG mode
Get the APP word at the specified APP word offset for a BD . @param BdPtr is the BD to operate on . @param Offset is the offset inside the APP word it is valid from 0 to 4 @param Valid is to tell the caller whether parameters are valid @returns The APP word . Passed in parameter Valid holds 0 for failure and 1 for success . @note This function can be used only when DMA is in SG mode
u32 XAxiDma_BdGetAppWord(XAxiDma_Bd* BdPtr, int Offset, int *Valid)
{
	*Valid = 0;
	if (XAxiDma_BdRead(BdPtr, XAXIDMA_BD_HAS_STSCNTRL_OFFSET) == 0) {
		xdbg_printf(XDBG_DEBUG_ERROR, "BdRingGetAppWord: no sts cntrl "
			"stream in hardware build, no app word available\r\n");
		return (u32)0;
	}
	if((Offset < 0) || (Offset > XAXIDMA_LAST_APPWORD)) {
		xdbg_printf(XDBG_DEBUG_ERROR, "BdRingGetAppWord: invalid"
			" offset %d", Offset);
		return (u32)0;
	}
	*Valid = 1;
	return XAxiDma_BdRead(BdPtr, XAXIDMA_BD_USR0_OFFSET + Offset * 4);
}
u32 XAxiDma_BdGetAppWord ( XAxiDma_Bd * BdPtr , int Offset , int * Valid ) { * Valid = 0 ; if ( XAxiDma_BdRead ( BdPtr , XAXIDMA_BD_HAS_STSCNTRL_OFFSET ) == 0 ) { xdbg_printf ( XDBG_DEBUG_ERROR , " " " \r \n " ) ; return ( u32 ) 0 ; } if ( ( Offset < 0 ) || ( Offset > XAXIDMA_LAST_APPWORD ) ) { xdbg_printf ( XDBG_DEBUG_ERROR , " " " " , Offset ) ; return ( u32 ) 0 ; } * Valid = 1 ; return XAxiDma_BdRead ( BdPtr , XAXIDMA_BD_USR0_OFFSET + Offset * 4 ) ; }
Get the APP word at the specified APP word offset for a BD.
Get the APP word at the specified APP word offset for a BD .