XilinxProcessorIPLib/drivers/clockps/src/xclockps_mux.c
static XStatus XClock_MuxFetchIdx(XClock_OutputClks ClockId, u8 *MuxIndex)
{
	u8 Idx;

	/* Validate Args */
	XCLOCK_VALIDATE_INDEX(OP, ClockId);
	XCLOCK_VALIDATE_PTR(MuxIndex);

	for (Idx = 0; Idx < CLK_ARRAY_SIZE(MuxMap); Idx++) {
		if (MuxMap[Idx].ClockId == ClockId) {
			*MuxIndex = MuxMap[Idx].MuxIndex;
			return XST_SUCCESS;
		}
	}

	return XST_INVALID_PARAM;
}
/*****************************************************************************/
/*
*
* This function looks for the output clock mapped to mux and returns the
* mux index.
*
* @param	ClockId is the identifier for output clock.
* @param	MuxIndex is the index of output clock in mux database.
*
* @return	XST_SUCCESS if successful.
*		XST_INVALID_PARAM if output clock mapping not found.
*
* @note		None.
*
******************************************************************************/
This function looks for the output clock mapped to mux and returns the
mux index.
This function looks for the output clock mapped to mux and returns the mux index .
static XStatus XClock_MuxFetchIdx(XClock_OutputClks ClockId, u8 *MuxIndex)
{
	u8 Idx;
	XCLOCK_VALIDATE_INDEX(OP, ClockId);
	XCLOCK_VALIDATE_PTR(MuxIndex);
	for (Idx = 0; Idx < CLK_ARRAY_SIZE(MuxMap); Idx++) {
		if (MuxMap[Idx].ClockId == ClockId) {
			*MuxIndex = MuxMap[Idx].MuxIndex;
			return XST_SUCCESS;
		}
	}
	return XST_INVALID_PARAM;
}
static XStatus XClock_MuxFetchIdx ( XClock_OutputClks ClockId , u8 * MuxIndex ) { u8 Idx ; XCLOCK_VALIDATE_INDEX ( OP , ClockId ) ; XCLOCK_VALIDATE_PTR ( MuxIndex ) ; for ( Idx = 0 ; Idx < CLK_ARRAY_SIZE ( MuxMap ) ; Idx ++ ) { if ( MuxMap [ Idx ] . ClockId == ClockId ) { * MuxIndex = MuxMap [ Idx ] . MuxIndex ; return XST_SUCCESS ; } } return XST_INVALID_PARAM ; }
This function looks for the output clock mapped to mux and returns the
mux index.
This function looks for the output clock mapped to mux and returns the mux index .
/* Validate Args */