XilinxProcessorIPLib/drivers/mcdma/src/xmcdma_bd.c
u32 XMcDma_BdGetAppWord(XMcdma_Bd* BdPtr, int Offset, int *Valid)
{
	*Valid = 0;

	if (XMcdma_BdRead(BdPtr, XMCDMA_BD_HAS_CTRLSTS_OFFSET) == 0) {

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

		return (u32)0;
	}

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

		xil_printf("BdRingGetAppWord: invalid offset");

		return (u32)0;
	}

	*Valid = 1;

	return XMcdma_BdRead(BdPtr, XMCDMA_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.
 *
 *****************************************************************************/
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.
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 .
u32 XMcDma_BdGetAppWord(XMcdma_Bd* BdPtr, int Offset, int *Valid)
{
	*Valid = 0;
	if (XMcdma_BdRead(BdPtr, XMCDMA_BD_HAS_CTRLSTS_OFFSET) == 0) {
		xil_printf("BdRingGetAppWord: no sts cntrl"
			"stream in hardware build, no app word available\r\n");
		return (u32)0;
	}
	if((Offset < 0) || (Offset > XMCDMA_LAST_APPWORD)) {
		xil_printf("BdRingGetAppWord: invalid offset");
		return (u32)0;
	}
	*Valid = 1;
	return XMcdma_BdRead(BdPtr, XMCDMA_BD_USR0_OFFSET + Offset * 4);
}
u32 XMcDma_BdGetAppWord ( XMcdma_Bd * BdPtr , int Offset , int * Valid ) { * Valid = 0 ; if ( XMcdma_BdRead ( BdPtr , XMCDMA_BD_HAS_CTRLSTS_OFFSET ) == 0 ) { xil_printf ( " " " \r \n " ) ; return ( u32 ) 0 ; } if ( ( Offset < 0 ) || ( Offset > XMCDMA_LAST_APPWORD ) ) { xil_printf ( " " ) ; return ( u32 ) 0 ; } * Valid = 1 ; return XMcdma_BdRead ( BdPtr , XMCDMA_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 .