XilinxProcessorIPLib/drivers/qspips/src/xqspips_options.c
u32 XQspiPs_GetOptions(XQspiPs *InstancePtr)
{
	u32 OptionsFlag = 0;
	u32 ConfigReg;
	unsigned int Index;

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

	/*
	 * Get the current options from QSPI configuration register.
	 */
	ConfigReg = XQspiPs_ReadReg(InstancePtr->Config.BaseAddress,
				      XQSPIPS_CR_OFFSET);

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

	/*
	 * Check for the LQSPI configuration options.
	 */
	ConfigReg = XQspiPs_ReadReg(InstancePtr->Config.BaseAddress,
				      XQSPIPS_LQSPI_CR_OFFSET);

	if ((ConfigReg & XQSPIPS_LQSPI_CR_LINEAR_MASK) != 0) {
		OptionsFlag |= XQSPIPS_LQSPI_MODE_OPTION;
	}

	return OptionsFlag;
}
/*****************************************************************************/
/**
*
* This function gets the options for the QSPI device. The options control how
* the device behaves relative to the QSPI bus.
*
* @param	InstancePtr is a pointer to the XQspiPs 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 XQSPIPS_*_OPTIONS in file xqspips.h.
*
* @note		None.
*
******************************************************************************/
This function gets the options for the QSPI device. The options control how
the device behaves relative to the QSPI bus.
This function gets the options for the QSPI device . The options control how the device behaves relative to the QSPI bus .
u32 XQspiPs_GetOptions(XQspiPs *InstancePtr)
{
	u32 OptionsFlag = 0;
	u32 ConfigReg;
	unsigned int Index;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	ConfigReg = XQspiPs_ReadReg(InstancePtr->Config.BaseAddress,
				      XQSPIPS_CR_OFFSET);
	for (Index = 0; Index < XQSPIPS_NUM_OPTIONS; Index++) {
		if (ConfigReg & OptionsTable[Index].Mask) {
			OptionsFlag |= OptionsTable[Index].Option;
		}
	}
	ConfigReg = XQspiPs_ReadReg(InstancePtr->Config.BaseAddress,
				      XQSPIPS_LQSPI_CR_OFFSET);
	if ((ConfigReg & XQSPIPS_LQSPI_CR_LINEAR_MASK) != 0) {
		OptionsFlag |= XQSPIPS_LQSPI_MODE_OPTION;
	}
	return OptionsFlag;
}
u32 XQspiPs_GetOptions ( XQspiPs * InstancePtr ) { u32 OptionsFlag = 0 ; u32 ConfigReg ; unsigned int Index ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; ConfigReg = XQspiPs_ReadReg ( InstancePtr -> Config . BaseAddress , XQSPIPS_CR_OFFSET ) ; for ( Index = 0 ; Index < XQSPIPS_NUM_OPTIONS ; Index ++ ) { if ( ConfigReg & OptionsTable [ Index ] . Mask ) { OptionsFlag |= OptionsTable [ Index ] . Option ; } } ConfigReg = XQspiPs_ReadReg ( InstancePtr -> Config . BaseAddress , XQSPIPS_LQSPI_CR_OFFSET ) ; if ( ( ConfigReg & XQSPIPS_LQSPI_CR_LINEAR_MASK ) != 0 ) { OptionsFlag |= XQSPIPS_LQSPI_MODE_OPTION ; } return OptionsFlag ; }
This function gets the options for the QSPI device.
This function gets the options for the QSPI device .
/*
	 * Get the current options from QSPI configuration register.
	 */ /*
	 * Loop through the options table to grab options
	 */ /*
	 * Check for the LQSPI configuration options.
	 */