XilinxProcessorIPLib/drivers/board_common/src/rfclk/src/xrfclk.c
u32 XRFClk_ControlOutputPortLMK(u32 PortId, u32 State)
{
	Xil_AssertNonvoid((PortId <= LMK_PORT_ID_MAX) && (PortId > 0));
	Xil_AssertNonvoid(State <= 0xff);

	u32 ret = XST_SUCCESS;
#ifdef XPS_BOARD_ZCU111
	(void)PortId;
	(void)State;
	LOG("not supported");
	ret = XST_FAILURE;
#else

	u32 Addr = (LMK_CFG_OUTPUT_PORT0_ADDR + LMK_ADDRESS_STEP * (PortId - 1))
		   << LMK_ADDRESS_SHIFT;
	u8 data = State;
	if (XST_SUCCESS != XRFClk_WriteReg(RFCLK_LMK, Addr + data)) {
		LOG("write reg");
		ret = XST_FAILURE;
	}
#endif

	return ret;
}
/****************************************************************************/
/**
*
* This function is used to enable or disable the specified output port on
* LMK04828.
*
* @param	PortId indicates a LMK04828 port id, [1:7].
* @param	State indicates the state of the port, see chapter 9.7.2.7
*		in lmk04828.pdf datasheet, [0:7]
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is used to enable or disable the specified output port on
LMK04828.
This function is used to enable or disable the specified output port on LMK04828 .
u32 XRFClk_ControlOutputPortLMK(u32 PortId, u32 State)
{
	Xil_AssertNonvoid((PortId <= LMK_PORT_ID_MAX) && (PortId > 0));
	Xil_AssertNonvoid(State <= 0xff);
	u32 ret = XST_SUCCESS;
#ifdef XPS_BOARD_ZCU111
	(void)PortId;
	(void)State;
	LOG("not supported");
	ret = XST_FAILURE;
#else
	u32 Addr = (LMK_CFG_OUTPUT_PORT0_ADDR + LMK_ADDRESS_STEP * (PortId - 1))
		   << LMK_ADDRESS_SHIFT;
	u8 data = State;
	if (XST_SUCCESS != XRFClk_WriteReg(RFCLK_LMK, Addr + data)) {
		LOG("write reg");
		ret = XST_FAILURE;
	}
#endif
	return ret;
}
u32 XRFClk_ControlOutputPortLMK ( u32 PortId , u32 State ) { Xil_AssertNonvoid ( ( PortId <= LMK_PORT_ID_MAX ) && ( PortId > 0 ) ) ; Xil_AssertNonvoid ( State <= 0xff ) ; u32 ret = XST_SUCCESS ; #ifdef XPS_BOARD_ZCU111 ( void ) PortId ; ( void ) State ; LOG ( " " ) ; ret = XST_FAILURE ; #else u32 Addr = ( LMK_CFG_OUTPUT_PORT0_ADDR + LMK_ADDRESS_STEP * ( PortId - 1 ) ) << LMK_ADDRESS_SHIFT ; u8 data = State ; if ( XST_SUCCESS != XRFClk_WriteReg ( RFCLK_LMK , Addr + data ) ) { LOG ( " " ) ; ret = XST_FAILURE ; } #endif return ret ; }
This function is used to enable or disable the specified output port on
LMK04828.
This function is used to enable or disable the specified output port on LMK04828 .