XilinxProcessorIPLib/drivers/qspips/examples/xqspips_dual_flash_stack_lqspi_example.c
void FlashQuadEnable(XQspiPs *QspiPtr)
{
	u8 WriteEnableCmd = {WRITE_ENABLE_CMD};
	u8 ReadStatusCmd[] = {READ_STATUS_CMD, 0};
	u8 QuadEnableCmd[] = {WRITE_STATUS_CMD, 0};
	u8 FlashStatus[2];

	if (ReadBuffer[1] == 0x9D) {
		XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd,
				FlashStatus, sizeof(ReadStatusCmd));

		QuadEnableCmd[1] = FlashStatus[1] | 1 << 6;

		XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,
				sizeof(WriteEnableCmd));

		XQspiPs_PolledTransfer(QspiPtr, QuadEnableCmd, NULL,
				sizeof(QuadEnableCmd));
	}
}
/**
 *
 * This function enables quad mode in the serial flash connected to the
 * SPI interface.
 *
 * @param	QspiPtr is a pointer to the QSPI driver component to use.
 *
 * @return	None.
 *
 * @note	None.
 *
 ******************************************************************************/
This function enables quad mode in the serial flash connected to the
SPI interface.

@param       QspiPtr is a pointer to the QSPI driver component to use.

@return      None.

@note        None.
This function enables quad mode in the serial flash connected to the SPI interface . @param QspiPtr is a pointer to the QSPI driver component to use . @return None . @note None .
void FlashQuadEnable(XQspiPs *QspiPtr)
{
	u8 WriteEnableCmd = {WRITE_ENABLE_CMD};
	u8 ReadStatusCmd[] = {READ_STATUS_CMD, 0};
	u8 QuadEnableCmd[] = {WRITE_STATUS_CMD, 0};
	u8 FlashStatus[2];
	if (ReadBuffer[1] == 0x9D) {
		XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd,
				FlashStatus, sizeof(ReadStatusCmd));
		QuadEnableCmd[1] = FlashStatus[1] | 1 << 6;
		XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,
				sizeof(WriteEnableCmd));
		XQspiPs_PolledTransfer(QspiPtr, QuadEnableCmd, NULL,
				sizeof(QuadEnableCmd));
	}
}
void FlashQuadEnable ( XQspiPs * QspiPtr ) { u8 WriteEnableCmd = { WRITE_ENABLE_CMD } ; u8 ReadStatusCmd [ ] = { READ_STATUS_CMD , 0 } ; u8 QuadEnableCmd [ ] = { WRITE_STATUS_CMD , 0 } ; u8 FlashStatus [ 2 ] ; if ( ReadBuffer [ 1 ] == 0x9D ) { XQspiPs_PolledTransfer ( QspiPtr , ReadStatusCmd , FlashStatus , sizeof ( ReadStatusCmd ) ) ; QuadEnableCmd [ 1 ] = FlashStatus [ 1 ] | 1 << 6 ; XQspiPs_PolledTransfer ( QspiPtr , & WriteEnableCmd , NULL , sizeof ( WriteEnableCmd ) ) ; XQspiPs_PolledTransfer ( QspiPtr , QuadEnableCmd , NULL , sizeof ( QuadEnableCmd ) ) ; } }
This function enables quad mode in the serial flash connected to the
 SPI interface.
This function enables quad mode in the serial flash connected to the SPI interface .