XilinxProcessorIPLib/drivers/clockps/src/xclockps_divider.c
static XStatus XClock_DivEnable(u8 DivIndex)
{
	u8  ParentType;
	u8  ParentIdx;

	/* Validate arguments */
	XCLOCK_VALIDATE_INDEX(DIVIDER, DivIndex);

	/* Check for parent */
	ParentType = XCLOCK_FETCH_PARENT_TYPE(Dividers[DivIndex].Parent);
	ParentIdx = XCLOCK_FETCH_PARENT_INDEX(Dividers[DivIndex].Parent);

	/* Enable parent node */
	if (XST_SUCCESS != XClock_EnableClkNode((XClock_Types)ParentType, ParentIdx)) {
		return XST_FAILURE;
	}

	Dividers[DivIndex].EnableCount++;

	return XST_SUCCESS;
}
/*****************************************************************************/
/*
*
* Enable function for the divider.
*
* @param	DivIndex is the database index of divider to enable.
*
* @return	XST_SUCCESS if successful.
*		XST_INVALID_PARAM if arguments are invalid.
*		XST_FAILURE otherwise.
*
* @note		None.
*
******************************************************************************/
Enable function for the divider.
Enable function for the divider .
static XStatus XClock_DivEnable(u8 DivIndex)
{
	u8  ParentType;
	u8  ParentIdx;
	XCLOCK_VALIDATE_INDEX(DIVIDER, DivIndex);
	ParentType = XCLOCK_FETCH_PARENT_TYPE(Dividers[DivIndex].Parent);
	ParentIdx = XCLOCK_FETCH_PARENT_INDEX(Dividers[DivIndex].Parent);
	if (XST_SUCCESS != XClock_EnableClkNode((XClock_Types)ParentType, ParentIdx)) {
		return XST_FAILURE;
	}
	Dividers[DivIndex].EnableCount++;
	return XST_SUCCESS;
}
static XStatus XClock_DivEnable ( u8 DivIndex ) { u8 ParentType ; u8 ParentIdx ; XCLOCK_VALIDATE_INDEX ( DIVIDER , DivIndex ) ; ParentType = XCLOCK_FETCH_PARENT_TYPE ( Dividers [ DivIndex ] . Parent ) ; ParentIdx = XCLOCK_FETCH_PARENT_INDEX ( Dividers [ DivIndex ] . Parent ) ; if ( XST_SUCCESS != XClock_EnableClkNode ( ( XClock_Types ) ParentType , ParentIdx ) ) { return XST_FAILURE ; } Dividers [ DivIndex ] . EnableCount ++ ; return XST_SUCCESS ; }
Enable function for the divider.
Enable function for the divider .
/* Validate arguments */ /* Check for parent */ /* Enable parent node */