XilinxProcessorIPLib/drivers/spips/src/xspips_options.c
u8 XSpiPs_GetClkPrescaler(const XSpiPs *InstancePtr)
{
	u32 ConfigReg;

	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	ConfigReg = XSpiPs_ReadReg(InstancePtr->Config.BaseAddress,
			XSPIPS_CR_OFFSET);

	ConfigReg &= XSPIPS_CR_PRESC_MASK;

	return (u8)(ConfigReg >> XSPIPS_CR_PRESC_SHIFT);

}
/*****************************************************************************/
/**
*
* This function gets the clock prescaler of an SPI device.
*
* @param	InstancePtr is a pointer to the XSpiPs instance.
*
* @return	The prescaler value.
*
* @note		None.
*
*
******************************************************************************/
This function gets the clock prescaler of an SPI device.
This function gets the clock prescaler of an SPI device .
u8 XSpiPs_GetClkPrescaler(const XSpiPs *InstancePtr)
{
	u32 ConfigReg;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	ConfigReg = XSpiPs_ReadReg(InstancePtr->Config.BaseAddress,
			XSPIPS_CR_OFFSET);
	ConfigReg &= XSPIPS_CR_PRESC_MASK;
	return (u8)(ConfigReg >> XSPIPS_CR_PRESC_SHIFT);
}
u8 XSpiPs_GetClkPrescaler ( const XSpiPs * InstancePtr ) { u32 ConfigReg ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; ConfigReg = XSpiPs_ReadReg ( InstancePtr -> Config . BaseAddress , XSPIPS_CR_OFFSET ) ; ConfigReg &= XSPIPS_CR_PRESC_MASK ; return ( u8 ) ( ConfigReg >> XSPIPS_CR_PRESC_SHIFT ) ; }
This function gets the clock prescaler of an SPI device.
This function gets the clock prescaler of an SPI device .