XilinxProcessorIPLib/drivers/qspips/examples/xqspips_dual_flash_stack_lqspi_example.c
int FlashReadID(void)
{
	int Status;

	/* Read ID in Auto mode.*/
	WriteBuffer[COMMAND_OFFSET]   = READ_ID;
	WriteBuffer[ADDRESS_1_OFFSET] = 0x23;		/* 3 dummy bytes */
	WriteBuffer[ADDRESS_2_OFFSET] = 0x08;
	WriteBuffer[ADDRESS_3_OFFSET] = 0x09;

	Status = XQspiPs_PolledTransfer(&QspiInstance, WriteBuffer, ReadBuffer,
				RD_ID_SIZE);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	xil_printf("FlashID=0x%x 0x%x 0x%x\n\r", ReadBuffer[1], ReadBuffer[2],
		   ReadBuffer[3]);

	return XST_SUCCESS;
}
/**
 *
 * This function reads serial FLASH ID connected to the SPI interface.
 *
 *
 * @return	XST_SUCCESS if read id, otherwise XST_FAILURE.
 *
 * @note	None.
 *
 ******************************************************************************/
This function reads serial FLASH ID connected to the SPI interface.
@return      XST_SUCCESS if read id, otherwise XST_FAILURE.

@note        None.
This function reads serial FLASH ID connected to the SPI interface . @return XST_SUCCESS if read id otherwise XST_FAILURE . @note None .
int FlashReadID(void)
{
	int Status;
	WriteBuffer[COMMAND_OFFSET]   = READ_ID;
	WriteBuffer[ADDRESS_1_OFFSET] = 0x23;		
	WriteBuffer[ADDRESS_2_OFFSET] = 0x08;
	WriteBuffer[ADDRESS_3_OFFSET] = 0x09;
	Status = XQspiPs_PolledTransfer(&QspiInstance, WriteBuffer, ReadBuffer,
				RD_ID_SIZE);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	xil_printf("FlashID=0x%x 0x%x 0x%x\n\r", ReadBuffer[1], ReadBuffer[2],
		   ReadBuffer[3]);
	return XST_SUCCESS;
}
int FlashReadID ( void ) { int Status ; WriteBuffer [ COMMAND_OFFSET ] = READ_ID ; WriteBuffer [ ADDRESS_1_OFFSET ] = 0x23 ; WriteBuffer [ ADDRESS_2_OFFSET ] = 0x08 ; WriteBuffer [ ADDRESS_3_OFFSET ] = 0x09 ; Status = XQspiPs_PolledTransfer ( & QspiInstance , WriteBuffer , ReadBuffer , RD_ID_SIZE ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } xil_printf ( " \n \r " , ReadBuffer [ 1 ] , ReadBuffer [ 2 ] , ReadBuffer [ 3 ] ) ; return XST_SUCCESS ; }
This function reads serial FLASH ID connected to the SPI interface.
This function reads serial FLASH ID connected to the SPI interface .
/* Read ID in Auto mode.*/ /* 3 dummy bytes */