1 /* 2 * Copyright 2020-2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef QSPI_IP_COMMON_H 8 #define QSPI_IP_COMMON_H 9 10 /** 11 * @file Qspi_Ip_Common.h 12 * 13 * @addtogroup IPV_QSPI QSPI IPV Driver 14 * @{ 15 */ 16 17 /* implements Qspi_Ip_Common.h_Artifact */ 18 19 #ifdef __cplusplus 20 extern "C"{ 21 #endif 22 23 /*================================================================================================== 24 * SOURCE FILE VERSION INFORMATION 25 ==================================================================================================*/ 26 #define QSPI_IP_COMMON_VENDOR_ID_H 43 27 #define QSPI_IP_COMMON_AR_RELEASE_MAJOR_VERSION_H 4 28 #define QSPI_IP_COMMON_AR_RELEASE_MINOR_VERSION_H 7 29 #define QSPI_IP_COMMON_AR_RELEASE_REVISION_VERSION_H 0 30 #define QSPI_IP_COMMON_SW_MAJOR_VERSION_H 3 31 #define QSPI_IP_COMMON_SW_MINOR_VERSION_H 0 32 #define QSPI_IP_COMMON_SW_PATCH_VERSION_H 0 33 34 /*================================================================================================== 35 * FILE VERSION CHECKS 36 ==================================================================================================*/ 37 38 #if (QSPI_IP_MEM_INSTANCE_COUNT > 0) 39 40 /******************************************************************************* 41 * Enumerations. 42 ******************************************************************************/ 43 44 45 /******************************************************************************* 46 * Definitions 47 ******************************************************************************/ 48 49 /*! 50 * @brief Driver configuration structure 51 * 52 * This structure is used to provide configuration parameters for the external flash driver 53 * at initialization time. 54 */ 55 typedef struct 56 { 57 const Qspi_Ip_MemoryConfigType *configuration; /*!< Serial flash device configuration */ 58 const Qspi_Ip_MemoryConnectionType *connection; /*!< Connection to a QSPI device */ 59 uint32 baseAddress; /*!< Base address of serial flash device */ 60 Qspi_Ip_LastCommandType lastCommand; /*!< Last command sent to the flash device */ 61 uint16 activeReadLut; /*!< LUT number for currently active read mode */ 62 } Qspi_Ip_StateType; 63 64 65 /******************************************************************************* 66 * External variable declarations. 67 ******************************************************************************/ 68 69 /* Physical LUT seq to use for all flash commands */ 70 #define QSPI_IP_COMMAND_LUT 0U 71 /* Physical LUT seq to use for AHB reads */ 72 #define QSPI_IP_AHB_LUT 1U 73 74 #define FLS_START_SEC_CONST_UNSPECIFIED 75 #include "Fls_MemMap.h" 76 77 /* Table of AHB addresses for QuadSPI instances. */ 78 extern const uint32 Qspi_Ip_AhbAddress[QuadSPI_INSTANCE_COUNT]; 79 80 #define FLS_STOP_SEC_CONST_UNSPECIFIED 81 #include "Fls_MemMap.h" 82 83 84 #define FLS_START_SEC_VAR_CLEARED_UNSPECIFIED 85 #include "Fls_MemMap.h" 86 87 /* Pointer to runtime state structures */ 88 extern Qspi_Ip_StateType Qspi_Ip_MemoryStateStructure[]; 89 90 #define FLS_STOP_SEC_VAR_CLEARED_UNSPECIFIED 91 #include "Fls_MemMap.h" 92 93 94 /******************************************************************************* 95 * API 96 ******************************************************************************/ 97 98 #endif /* QSPI_IP_MEM_INSTANCE_COUNT */ 99 100 101 #ifdef __cplusplus 102 } 103 #endif 104 105 /** @} */ 106 107 #endif /* QSPI_IP_COMMON_H */ 108