XilinxProcessorIPLib/drivers/spips/src/xspips_options.c
u32 XSpiPs_GetOptions(const XSpiPs *InstancePtr)
{
	u32 OptionsFlag = 0U;
	u32 ConfigReg;
	u32 Index;

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

	/*
	 * Get the current options
	 */
	ConfigReg =
		XSpiPs_ReadReg(InstancePtr->Config.BaseAddress,
				 XSPIPS_CR_OFFSET);

	/*
	 * Loop through the options table to grab options
	 */
	for (Index = 0U; Index < XSPIPS_NUM_OPTIONS; Index++) {
		if ((ConfigReg & OptionsTable[Index].Mask) != FALSE) {
			OptionsFlag |= OptionsTable[Index].Option;
		}
	}

	return OptionsFlag;
}
/*****************************************************************************/
/**
*
* This function gets the options for the SPI device. The options control how
* the device behaves relative to the SPI bus.
*
* @param	InstancePtr is a pointer to the XSpiPs instance.
*
* @return
*
* Options contains the specified options currently set. This is a bit value
* where a 1 means the option is on, and a 0 means the option is off.
* See the bit definitions named XSPIPS_*_OPTIONS in file xspips.h.
*
* @note		None.
*
******************************************************************************/
This function gets the options for the SPI device. The options control how
the device behaves relative to the SPI bus.
This function gets the options for the SPI device . The options control how the device behaves relative to the SPI bus .
u32 XSpiPs_GetOptions(const XSpiPs *InstancePtr)
{
	u32 OptionsFlag = 0U;
	u32 ConfigReg;
	u32 Index;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	ConfigReg =
		XSpiPs_ReadReg(InstancePtr->Config.BaseAddress,
				 XSPIPS_CR_OFFSET);
	for (Index = 0U; Index < XSPIPS_NUM_OPTIONS; Index++) {
		if ((ConfigReg & OptionsTable[Index].Mask) != FALSE) {
			OptionsFlag |= OptionsTable[Index].Option;
		}
	}
	return OptionsFlag;
}
u32 XSpiPs_GetOptions ( const XSpiPs * InstancePtr ) { u32 OptionsFlag = 0U ; u32 ConfigReg ; u32 Index ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; ConfigReg = XSpiPs_ReadReg ( InstancePtr -> Config . BaseAddress , XSPIPS_CR_OFFSET ) ; for ( Index = 0U ; Index < XSPIPS_NUM_OPTIONS ; Index ++ ) { if ( ( ConfigReg & OptionsTable [ Index ] . Mask ) != FALSE ) { OptionsFlag |= OptionsTable [ Index ] . Option ; } } return OptionsFlag ; }
This function gets the options for the SPI device.
This function gets the options for the SPI device .
/*
	 * Get the current options
	 */ /*
	 * Loop through the options table to grab options
	 */