Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:36

0001 /**
0002   ******************************************************************************
0003   * @file    stm32h7xx_hal_qspi.h
0004   * @author  MCD Application Team
0005   * @brief   Header file of QSPI HAL module.
0006   ******************************************************************************
0007   * @attention
0008   *
0009   * Copyright (c) 2017 STMicroelectronics.
0010   * All rights reserved.
0011   *
0012   * This software is licensed under terms that can be found in the LICENSE file
0013   * in the root directory of this software component.
0014   * If no LICENSE file comes with this software, it is provided AS-IS.
0015   *
0016   ******************************************************************************
0017   */
0018 
0019 /* Define to prevent recursive inclusion -------------------------------------*/
0020 #ifndef STM32H7xx_HAL_QSPI_H
0021 #define STM32H7xx_HAL_QSPI_H
0022 
0023 #ifdef __cplusplus
0024  extern "C" {
0025 #endif
0026 
0027 /* Includes ------------------------------------------------------------------*/
0028 #include "stm32h7xx_hal_def.h"
0029 
0030 #if defined(QUADSPI)
0031 
0032 /** @addtogroup STM32H7xx_HAL_Driver
0033   * @{
0034   */
0035 
0036 /** @addtogroup QSPI
0037   * @{
0038   */
0039 
0040 /* Exported types ------------------------------------------------------------*/
0041 /** @defgroup QSPI_Exported_Types QSPI Exported Types
0042   * @ingroup RTEMSBSPsARMSTM32H7
0043   * @{
0044   */
0045 
0046 /**
0047   * @brief  QSPI Init structure definition
0048   */
0049 typedef struct
0050 {
0051   uint32_t ClockPrescaler;     /* Specifies the prescaler factor for generating clock based on the AHB clock.
0052                                   This parameter can be a number between 0 and 255 */
0053   uint32_t FifoThreshold;      /* Specifies the threshold number of bytes in the FIFO (used only in indirect mode)
0054                                   This parameter can be a value between 1 and 32 */
0055   uint32_t SampleShifting;     /* Specifies the Sample Shift. The data is sampled 1/2 clock cycle delay later to
0056                                   take in account external signal delays. (It should be QSPI_SAMPLE_SHIFTING_NONE in DDR mode)
0057                                   This parameter can be a value of @ref QSPI_SampleShifting */
0058   uint32_t FlashSize;          /* Specifies the Flash Size. FlashSize+1 is effectively the number of address bits
0059                                   required to address the flash memory. The flash capacity can be up to 4GB
0060                                   (addressed using 32 bits) in indirect mode, but the addressable space in
0061                                   memory-mapped mode is limited to 256MB
0062                                   This parameter can be a number between 0 and 31 */
0063   uint32_t ChipSelectHighTime; /* Specifies the Chip Select High Time. ChipSelectHighTime+1 defines the minimum number
0064                                   of clock cycles which the chip select must remain high between commands.
0065                                   This parameter can be a value of @ref QSPI_ChipSelectHighTime */
0066   uint32_t ClockMode;          /* Specifies the Clock Mode. It indicates the level that clock takes between commands.
0067                                   This parameter can be a value of @ref QSPI_ClockMode */
0068   uint32_t FlashID;            /* Specifies the Flash which will be used,
0069                                   This parameter can be a value of @ref QSPI_Flash_Select */
0070   uint32_t DualFlash;          /* Specifies the Dual Flash Mode State
0071                                   This parameter can be a value of @ref QSPI_DualFlash_Mode */
0072 }QSPI_InitTypeDef;
0073 
0074 /**
0075   * @brief HAL QSPI State structures definition
0076   */
0077 typedef enum
0078 {
0079   HAL_QSPI_STATE_RESET             = 0x00U,    /*!< Peripheral not initialized                            */
0080   HAL_QSPI_STATE_READY             = 0x01U,    /*!< Peripheral initialized and ready for use              */
0081   HAL_QSPI_STATE_BUSY              = 0x02U,    /*!< Peripheral in indirect mode and busy                  */
0082   HAL_QSPI_STATE_BUSY_INDIRECT_TX  = 0x12U,    /*!< Peripheral in indirect mode with transmission ongoing */
0083   HAL_QSPI_STATE_BUSY_INDIRECT_RX  = 0x22U,    /*!< Peripheral in indirect mode with reception ongoing    */
0084   HAL_QSPI_STATE_BUSY_AUTO_POLLING = 0x42U,    /*!< Peripheral in auto polling mode ongoing               */
0085   HAL_QSPI_STATE_BUSY_MEM_MAPPED   = 0x82U,    /*!< Peripheral in memory mapped mode ongoing              */
0086   HAL_QSPI_STATE_ABORT             = 0x08U,    /*!< Peripheral with abort request ongoing                 */
0087   HAL_QSPI_STATE_ERROR             = 0x04U     /*!< Peripheral in error                                   */
0088 }HAL_QSPI_StateTypeDef;
0089 
0090 /**
0091   * @brief  QSPI Handle Structure definition
0092   */
0093 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0094 typedef struct __QSPI_HandleTypeDef
0095 #else
0096 typedef struct
0097 #endif
0098 {
0099   QUADSPI_TypeDef            *Instance;        /* QSPI registers base address        */
0100   QSPI_InitTypeDef           Init;             /* QSPI communication parameters      */
0101   uint8_t                    *pTxBuffPtr;      /* Pointer to QSPI Tx transfer Buffer */
0102   __IO uint32_t              TxXferSize;       /* QSPI Tx Transfer size              */
0103   __IO uint32_t              TxXferCount;      /* QSPI Tx Transfer Counter           */
0104   uint8_t                    *pRxBuffPtr;      /* Pointer to QSPI Rx transfer Buffer */
0105   __IO uint32_t              RxXferSize;       /* QSPI Rx Transfer size              */
0106   __IO uint32_t              RxXferCount;      /* QSPI Rx Transfer Counter           */
0107   MDMA_HandleTypeDef          *hmdma;            /* QSPI Rx/Tx MDMA Handle parameters   */
0108   __IO HAL_LockTypeDef       Lock;             /* Locking object                     */
0109   __IO HAL_QSPI_StateTypeDef State;            /* QSPI communication state           */
0110   __IO uint32_t              ErrorCode;        /* QSPI Error code                    */
0111   uint32_t                   Timeout;          /* Timeout for the QSPI memory access */
0112 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0113   void (* ErrorCallback)        (struct __QSPI_HandleTypeDef *hqspi);
0114   void (* AbortCpltCallback)    (struct __QSPI_HandleTypeDef *hqspi);
0115   void (* FifoThresholdCallback)(struct __QSPI_HandleTypeDef *hqspi);
0116   void (* CmdCpltCallback)      (struct __QSPI_HandleTypeDef *hqspi);
0117   void (* RxCpltCallback)       (struct __QSPI_HandleTypeDef *hqspi);
0118   void (* TxCpltCallback)       (struct __QSPI_HandleTypeDef *hqspi);
0119   void (* StatusMatchCallback)  (struct __QSPI_HandleTypeDef *hqspi);
0120   void (* TimeOutCallback)      (struct __QSPI_HandleTypeDef *hqspi);
0121 
0122   void (* MspInitCallback)      (struct __QSPI_HandleTypeDef *hqspi);
0123   void (* MspDeInitCallback)    (struct __QSPI_HandleTypeDef *hqspi);
0124 #endif
0125 }QSPI_HandleTypeDef;
0126 
0127 /**
0128   * @brief  QSPI Command structure definition
0129   */
0130 typedef struct
0131 {
0132   uint32_t Instruction;        /* Specifies the Instruction to be sent
0133                                   This parameter can be a value (8-bit) between 0x00 and 0xFF */
0134   uint32_t Address;            /* Specifies the Address to be sent (Size from 1 to 4 bytes according AddressSize)
0135                                   This parameter can be a value (32-bits) between 0x0 and 0xFFFFFFFF */
0136   uint32_t AlternateBytes;     /* Specifies the Alternate Bytes to be sent (Size from 1 to 4 bytes according AlternateBytesSize)
0137                                   This parameter can be a value (32-bits) between 0x0 and 0xFFFFFFFF */
0138   uint32_t AddressSize;        /* Specifies the Address Size
0139                                   This parameter can be a value of @ref QSPI_AddressSize */
0140   uint32_t AlternateBytesSize; /* Specifies the Alternate Bytes Size
0141                                   This parameter can be a value of @ref QSPI_AlternateBytesSize */
0142   uint32_t DummyCycles;        /* Specifies the Number of Dummy Cycles.
0143                                   This parameter can be a number between 0 and 31 */
0144   uint32_t InstructionMode;    /* Specifies the Instruction Mode
0145                                   This parameter can be a value of @ref QSPI_InstructionMode */
0146   uint32_t AddressMode;        /* Specifies the Address Mode
0147                                   This parameter can be a value of @ref QSPI_AddressMode */
0148   uint32_t AlternateByteMode;  /* Specifies the Alternate Bytes Mode
0149                                   This parameter can be a value of @ref QSPI_AlternateBytesMode */
0150   uint32_t DataMode;           /* Specifies the Data Mode (used for dummy cycles and data phases)
0151                                   This parameter can be a value of @ref QSPI_DataMode */
0152   uint32_t NbData;             /* Specifies the number of data to transfer. (This is the number of bytes)
0153                                   This parameter can be any value between 0 and 0xFFFFFFFF (0 means undefined length
0154                                   until end of memory)*/
0155   uint32_t DdrMode;            /* Specifies the double data rate mode for address, alternate byte and data phase
0156                                   This parameter can be a value of @ref QSPI_DdrMode */
0157   uint32_t DdrHoldHalfCycle;   /* Specifies if the DDR hold is enabled. When enabled it delays the data
0158                                   output by one half of system clock in DDR mode.
0159                                   This parameter can be a value of @ref QSPI_DdrHoldHalfCycle */
0160   uint32_t SIOOMode;           /* Specifies the send instruction only once mode
0161                                   This parameter can be a value of @ref QSPI_SIOOMode */
0162 }QSPI_CommandTypeDef;
0163 
0164 /**
0165   * @brief  QSPI Auto Polling mode configuration structure definition
0166   */
0167 typedef struct
0168 {
0169   uint32_t Match;              /* Specifies the value to be compared with the masked status register to get a match.
0170                                   This parameter can be any value between 0 and 0xFFFFFFFF */
0171   uint32_t Mask;               /* Specifies the mask to be applied to the status bytes received.
0172                                   This parameter can be any value between 0 and 0xFFFFFFFF */
0173   uint32_t Interval;           /* Specifies the number of clock cycles between two read during automatic polling phases.
0174                                   This parameter can be any value between 0 and 0xFFFF */
0175   uint32_t StatusBytesSize;    /* Specifies the size of the status bytes received.
0176                                   This parameter can be any value between 1 and 4 */
0177   uint32_t MatchMode;          /* Specifies the method used for determining a match.
0178                                   This parameter can be a value of @ref QSPI_MatchMode */
0179   uint32_t AutomaticStop;      /* Specifies if automatic polling is stopped after a match.
0180                                   This parameter can be a value of @ref QSPI_AutomaticStop */
0181 }QSPI_AutoPollingTypeDef;
0182 
0183 /**
0184   * @brief  QSPI Memory Mapped mode configuration structure definition
0185   */
0186 typedef struct
0187 {
0188   uint32_t TimeOutPeriod;      /* Specifies the number of clock to wait when the FIFO is full before to release the chip select.
0189                                   This parameter can be any value between 0 and 0xFFFF */
0190   uint32_t TimeOutActivation;  /* Specifies if the timeout counter is enabled to release the chip select.
0191                                   This parameter can be a value of @ref QSPI_TimeOutActivation */
0192 }QSPI_MemoryMappedTypeDef;
0193 
0194 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0195 /**
0196   * @brief  HAL QSPI Callback ID enumeration definition
0197   */
0198 typedef enum
0199 {
0200   HAL_QSPI_ERROR_CB_ID          = 0x00U,  /*!< QSPI Error Callback ID            */
0201   HAL_QSPI_ABORT_CB_ID          = 0x01U,  /*!< QSPI Abort Callback ID            */
0202   HAL_QSPI_FIFO_THRESHOLD_CB_ID = 0x02U,  /*!< QSPI FIFO Threshold Callback ID   */
0203   HAL_QSPI_CMD_CPLT_CB_ID       = 0x03U,  /*!< QSPI Command Complete Callback ID */
0204   HAL_QSPI_RX_CPLT_CB_ID        = 0x04U,  /*!< QSPI Rx Complete Callback ID      */
0205   HAL_QSPI_TX_CPLT_CB_ID        = 0x05U,  /*!< QSPI Tx Complete Callback ID      */
0206   HAL_QSPI_STATUS_MATCH_CB_ID   = 0x08U,  /*!< QSPI Status Match Callback ID     */
0207   HAL_QSPI_TIMEOUT_CB_ID        = 0x09U,  /*!< QSPI Timeout Callback ID          */
0208 
0209   HAL_QSPI_MSP_INIT_CB_ID       = 0x0AU,  /*!< QSPI MspInit Callback ID          */
0210   HAL_QSPI_MSP_DEINIT_CB_ID     = 0x0B0   /*!< QSPI MspDeInit Callback ID        */
0211 }HAL_QSPI_CallbackIDTypeDef;
0212 
0213 /**
0214   * @brief  HAL QSPI Callback pointer definition
0215   */
0216 typedef void (*pQSPI_CallbackTypeDef)(QSPI_HandleTypeDef *hqspi);
0217 #endif
0218 /**
0219   * @}
0220   */
0221 
0222 /* Exported constants --------------------------------------------------------*/
0223 /** @defgroup QSPI_Exported_Constants QSPI Exported Constants
0224   * @ingroup RTEMSBSPsARMSTM32H7
0225   * @{
0226   */
0227 
0228 /** @defgroup QSPI_ErrorCode QSPI Error Code
0229   * @ingroup RTEMSBSPsARMSTM32H7
0230   * @{
0231   */
0232 #define HAL_QSPI_ERROR_NONE             0x00000000U /*!< No error                 */
0233 #define HAL_QSPI_ERROR_TIMEOUT          0x00000001U /*!< Timeout error            */
0234 #define HAL_QSPI_ERROR_TRANSFER         0x00000002U /*!< Transfer error           */
0235 #define HAL_QSPI_ERROR_DMA              0x00000004U /*!< DMA transfer error       */
0236 #define HAL_QSPI_ERROR_INVALID_PARAM    0x00000008U /*!< Invalid parameters error */
0237 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0238 #define HAL_QSPI_ERROR_INVALID_CALLBACK 0x00000010U /*!< Invalid callback error   */
0239 #endif
0240 /**
0241   * @}
0242   */
0243 
0244 /** @defgroup QSPI_SampleShifting QSPI Sample Shifting
0245   * @ingroup RTEMSBSPsARMSTM32H7
0246   * @{
0247   */
0248 #define QSPI_SAMPLE_SHIFTING_NONE      0x00000000U                   /*!<No clock cycle shift to sample data*/
0249 #define QSPI_SAMPLE_SHIFTING_HALFCYCLE ((uint32_t)QUADSPI_CR_SSHIFT) /*!<1/2 clock cycle shift to sample data*/
0250 /**
0251   * @}
0252   */
0253 
0254 /** @defgroup QSPI_ChipSelectHighTime QSPI ChipSelect High Time
0255   * @ingroup RTEMSBSPsARMSTM32H7
0256   * @{
0257   */
0258 #define QSPI_CS_HIGH_TIME_1_CYCLE      0x00000000U                                         /*!<nCS stay high for at least 1 clock cycle between commands*/
0259 #define QSPI_CS_HIGH_TIME_2_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_0)                      /*!<nCS stay high for at least 2 clock cycles between commands*/
0260 #define QSPI_CS_HIGH_TIME_3_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_1)                      /*!<nCS stay high for at least 3 clock cycles between commands*/
0261 #define QSPI_CS_HIGH_TIME_4_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_0 | QUADSPI_DCR_CSHT_1) /*!<nCS stay high for at least 4 clock cycles between commands*/
0262 #define QSPI_CS_HIGH_TIME_5_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_2)                      /*!<nCS stay high for at least 5 clock cycles between commands*/
0263 #define QSPI_CS_HIGH_TIME_6_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_0) /*!<nCS stay high for at least 6 clock cycles between commands*/
0264 #define QSPI_CS_HIGH_TIME_7_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_1) /*!<nCS stay high for at least 7 clock cycles between commands*/
0265 #define QSPI_CS_HIGH_TIME_8_CYCLE      ((uint32_t)QUADSPI_DCR_CSHT)                        /*!<nCS stay high for at least 8 clock cycles between commands*/
0266 /**
0267   * @}
0268   */
0269 
0270 /** @defgroup QSPI_ClockMode QSPI Clock Mode
0271   * @ingroup RTEMSBSPsARMSTM32H7
0272   * @{
0273   */
0274 #define QSPI_CLOCK_MODE_0              0x00000000U                    /*!<Clk stays low while nCS is released*/
0275 #define QSPI_CLOCK_MODE_3              ((uint32_t)QUADSPI_DCR_CKMODE) /*!<Clk goes high while nCS is released*/
0276 /**
0277   * @}
0278   */
0279 
0280 /** @defgroup QSPI_Flash_Select QSPI Flash Select
0281   * @ingroup RTEMSBSPsARMSTM32H7
0282   * @{
0283   */
0284 #define QSPI_FLASH_ID_1                0x00000000U                 /*!<FLASH 1 selected*/
0285 #define QSPI_FLASH_ID_2                ((uint32_t)QUADSPI_CR_FSEL) /*!<FLASH 2 selected*/
0286 /**
0287   * @}
0288   */
0289 
0290   /** @defgroup QSPI_DualFlash_Mode QSPI Dual Flash Mode
0291     * @ingroup RTEMSBSPsARMSTM32H7
0292   * @{
0293   */
0294 #define QSPI_DUALFLASH_ENABLE          ((uint32_t)QUADSPI_CR_DFM) /*!<Dual-flash mode enabled*/
0295 #define QSPI_DUALFLASH_DISABLE         0x00000000U                /*!<Dual-flash mode disabled*/
0296 /**
0297   * @}
0298   */
0299 
0300 /** @defgroup QSPI_AddressSize QSPI Address Size
0301   * @ingroup RTEMSBSPsARMSTM32H7
0302   * @{
0303   */
0304 #define QSPI_ADDRESS_8_BITS            0x00000000U                      /*!<8-bit address*/
0305 #define QSPI_ADDRESS_16_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE_0) /*!<16-bit address*/
0306 #define QSPI_ADDRESS_24_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE_1) /*!<24-bit address*/
0307 #define QSPI_ADDRESS_32_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE)   /*!<32-bit address*/
0308 /**
0309   * @}
0310   */
0311 
0312 /** @defgroup QSPI_AlternateBytesSize QSPI Alternate Bytes Size
0313   * @ingroup RTEMSBSPsARMSTM32H7
0314   * @{
0315   */
0316 #define QSPI_ALTERNATE_BYTES_8_BITS    0x00000000U                      /*!<8-bit alternate bytes*/
0317 #define QSPI_ALTERNATE_BYTES_16_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE_0) /*!<16-bit alternate bytes*/
0318 #define QSPI_ALTERNATE_BYTES_24_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE_1) /*!<24-bit alternate bytes*/
0319 #define QSPI_ALTERNATE_BYTES_32_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE)   /*!<32-bit alternate bytes*/
0320 /**
0321   * @}
0322   */
0323 
0324 /** @defgroup QSPI_InstructionMode QSPI Instruction Mode
0325   * @ingroup RTEMSBSPsARMSTM32H7
0326 * @{
0327 */
0328 #define QSPI_INSTRUCTION_NONE          0x00000000U                     /*!<No instruction*/
0329 #define QSPI_INSTRUCTION_1_LINE        ((uint32_t)QUADSPI_CCR_IMODE_0) /*!<Instruction on a single line*/
0330 #define QSPI_INSTRUCTION_2_LINES       ((uint32_t)QUADSPI_CCR_IMODE_1) /*!<Instruction on two lines*/
0331 #define QSPI_INSTRUCTION_4_LINES       ((uint32_t)QUADSPI_CCR_IMODE)   /*!<Instruction on four lines*/
0332 /**
0333   * @}
0334   */
0335 
0336 /** @defgroup QSPI_AddressMode QSPI Address Mode
0337   * @ingroup RTEMSBSPsARMSTM32H7
0338 * @{
0339 */
0340 #define QSPI_ADDRESS_NONE              0x00000000U                      /*!<No address*/
0341 #define QSPI_ADDRESS_1_LINE            ((uint32_t)QUADSPI_CCR_ADMODE_0) /*!<Address on a single line*/
0342 #define QSPI_ADDRESS_2_LINES           ((uint32_t)QUADSPI_CCR_ADMODE_1) /*!<Address on two lines*/
0343 #define QSPI_ADDRESS_4_LINES           ((uint32_t)QUADSPI_CCR_ADMODE)   /*!<Address on four lines*/
0344 /**
0345   * @}
0346   */
0347 
0348 /** @defgroup QSPI_AlternateBytesMode QSPI Alternate Bytes Mode
0349   * @ingroup RTEMSBSPsARMSTM32H7
0350 * @{
0351 */
0352 #define QSPI_ALTERNATE_BYTES_NONE      0x00000000U                      /*!<No alternate bytes*/
0353 #define QSPI_ALTERNATE_BYTES_1_LINE    ((uint32_t)QUADSPI_CCR_ABMODE_0) /*!<Alternate bytes on a single line*/
0354 #define QSPI_ALTERNATE_BYTES_2_LINES   ((uint32_t)QUADSPI_CCR_ABMODE_1) /*!<Alternate bytes on two lines*/
0355 #define QSPI_ALTERNATE_BYTES_4_LINES   ((uint32_t)QUADSPI_CCR_ABMODE)   /*!<Alternate bytes on four lines*/
0356 /**
0357   * @}
0358   */
0359 
0360 /** @defgroup QSPI_DataMode QSPI Data Mode
0361   * @ingroup RTEMSBSPsARMSTM32H7
0362   * @{
0363   */
0364 #define QSPI_DATA_NONE                 0x00000000U                     /*!<No data*/
0365 #define QSPI_DATA_1_LINE               ((uint32_t)QUADSPI_CCR_DMODE_0) /*!<Data on a single line*/
0366 #define QSPI_DATA_2_LINES              ((uint32_t)QUADSPI_CCR_DMODE_1) /*!<Data on two lines*/
0367 #define QSPI_DATA_4_LINES              ((uint32_t)QUADSPI_CCR_DMODE)   /*!<Data on four lines*/
0368 /**
0369   * @}
0370   */
0371 
0372 /** @defgroup QSPI_DdrMode QSPI DDR Mode
0373   * @ingroup RTEMSBSPsARMSTM32H7
0374   * @{
0375   */
0376 #define QSPI_DDR_MODE_DISABLE          0x00000000U                  /*!<Double data rate mode disabled*/
0377 #define QSPI_DDR_MODE_ENABLE           ((uint32_t)QUADSPI_CCR_DDRM) /*!<Double data rate mode enabled*/
0378 /**
0379   * @}
0380   */
0381 
0382 /** @defgroup QSPI_DdrHoldHalfCycle QSPI DDR Data Output Delay
0383   * @ingroup RTEMSBSPsARMSTM32H7
0384   * @{
0385   */
0386 #define QSPI_DDR_HHC_ANALOG_DELAY      0x00000000U                  /*!<Delay the data output using analog delay in DDR mode*/
0387 #define QSPI_DDR_HHC_HALF_CLK_DELAY    ((uint32_t)QUADSPI_CCR_DHHC) /*!<Delay the data output by one half of system clock in DDR mode*/
0388 /**
0389   * @}
0390   */
0391 
0392 /** @defgroup QSPI_SIOOMode QSPI Send Instruction Mode
0393   * @ingroup RTEMSBSPsARMSTM32H7
0394   * @{
0395   */
0396 #define QSPI_SIOO_INST_EVERY_CMD       0x00000000U                  /*!<Send instruction on every transaction*/
0397 #define QSPI_SIOO_INST_ONLY_FIRST_CMD  ((uint32_t)QUADSPI_CCR_SIOO) /*!<Send instruction only for the first command*/
0398 /**
0399   * @}
0400   */
0401 
0402 /** @defgroup QSPI_MatchMode QSPI Match Mode
0403   * @ingroup RTEMSBSPsARMSTM32H7
0404   * @{
0405   */
0406 #define QSPI_MATCH_MODE_AND            0x00000000U                /*!<AND match mode between unmasked bits*/
0407 #define QSPI_MATCH_MODE_OR             ((uint32_t)QUADSPI_CR_PMM) /*!<OR match mode between unmasked bits*/
0408 /**
0409   * @}
0410   */
0411 
0412 /** @defgroup QSPI_AutomaticStop QSPI Automatic Stop
0413   * @ingroup RTEMSBSPsARMSTM32H7
0414   * @{
0415   */
0416 #define QSPI_AUTOMATIC_STOP_DISABLE    0x00000000U                 /*!<AutoPolling stops only with abort or QSPI disabling*/
0417 #define QSPI_AUTOMATIC_STOP_ENABLE     ((uint32_t)QUADSPI_CR_APMS) /*!<AutoPolling stops as soon as there is a match*/
0418 /**
0419   * @}
0420   */
0421 
0422 /** @defgroup QSPI_TimeOutActivation QSPI Timeout Activation
0423   * @ingroup RTEMSBSPsARMSTM32H7
0424   * @{
0425   */
0426 #define QSPI_TIMEOUT_COUNTER_DISABLE   0x00000000U                 /*!<Timeout counter disabled, nCS remains active*/
0427 #define QSPI_TIMEOUT_COUNTER_ENABLE    ((uint32_t)QUADSPI_CR_TCEN) /*!<Timeout counter enabled, nCS released when timeout expires*/
0428 /**
0429   * @}
0430   */
0431 
0432 /** @defgroup QSPI_Flags QSPI Flags
0433   * @ingroup RTEMSBSPsARMSTM32H7
0434   * @{
0435   */
0436 #define QSPI_FLAG_BUSY                 QUADSPI_SR_BUSY /*!<Busy flag: operation is ongoing*/
0437 #define QSPI_FLAG_TO                   QUADSPI_SR_TOF  /*!<Timeout flag: timeout occurs in memory-mapped mode*/
0438 #define QSPI_FLAG_SM                   QUADSPI_SR_SMF  /*!<Status match flag: received data matches in autopolling mode*/
0439 #define QSPI_FLAG_FT                   QUADSPI_SR_FTF  /*!<Fifo threshold flag: Fifo threshold reached or data left after read from memory is complete*/
0440 #define QSPI_FLAG_TC                   QUADSPI_SR_TCF  /*!<Transfer complete flag: programmed number of data have been transferred or the transfer has been aborted*/
0441 #define QSPI_FLAG_TE                   QUADSPI_SR_TEF  /*!<Transfer error flag: invalid address is being accessed*/
0442 /**
0443   * @}
0444   */
0445 
0446 /** @defgroup QSPI_Interrupts QSPI Interrupts
0447   * @ingroup RTEMSBSPsARMSTM32H7
0448   * @{
0449   */
0450 #define QSPI_IT_TO                     QUADSPI_CR_TOIE /*!<Interrupt on the timeout flag*/
0451 #define QSPI_IT_SM                     QUADSPI_CR_SMIE /*!<Interrupt on the status match flag*/
0452 #define QSPI_IT_FT                     QUADSPI_CR_FTIE /*!<Interrupt on the fifo threshold flag*/
0453 #define QSPI_IT_TC                     QUADSPI_CR_TCIE /*!<Interrupt on the transfer complete flag*/
0454 #define QSPI_IT_TE                     QUADSPI_CR_TEIE /*!<Interrupt on the transfer error flag*/
0455 /**
0456   * @}
0457   */
0458 
0459 /** @defgroup QSPI_Timeout_definition QSPI Timeout definition
0460   * @ingroup RTEMSBSPsARMSTM32H7
0461   * @brief QSPI Timeout definition
0462   * @{
0463   */
0464 #define HAL_QSPI_TIMEOUT_DEFAULT_VALUE 5000U /* 5 s */
0465 /**
0466   * @}
0467   */
0468 
0469 /**
0470   * @}
0471   */
0472 
0473 /* Exported macros -----------------------------------------------------------*/
0474 /** @defgroup QSPI_Exported_Macros QSPI Exported Macros
0475   * @ingroup RTEMSBSPsARMSTM32H7
0476   * @{
0477   */
0478 /** @brief Reset QSPI handle state.
0479   * @param  __HANDLE__ QSPI handle.
0480   * @retval None
0481   */
0482 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0483 #define __HAL_QSPI_RESET_HANDLE_STATE(__HANDLE__)           do {                                              \
0484                                                                   (__HANDLE__)->State = HAL_QSPI_STATE_RESET; \
0485                                                                   (__HANDLE__)->MspInitCallback = NULL;       \
0486                                                                   (__HANDLE__)->MspDeInitCallback = NULL;     \
0487                                                                } while(0)
0488 #else
0489 #define __HAL_QSPI_RESET_HANDLE_STATE(__HANDLE__)           ((__HANDLE__)->State = HAL_QSPI_STATE_RESET)
0490 #endif
0491 
0492 /** @brief  Enable the QSPI peripheral.
0493   * @param  __HANDLE__ specifies the QSPI Handle.
0494   * @retval None
0495   */
0496 #define __HAL_QSPI_ENABLE(__HANDLE__)                       SET_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)
0497 
0498 /** @brief  Disable the QSPI peripheral.
0499   * @param  __HANDLE__ specifies the QSPI Handle.
0500   * @retval None
0501   */
0502 #define __HAL_QSPI_DISABLE(__HANDLE__)                      CLEAR_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)
0503 
0504 /** @brief  Enable the specified QSPI interrupt.
0505   * @param  __HANDLE__ specifies the QSPI Handle.
0506   * @param  __INTERRUPT__ specifies the QSPI interrupt source to enable.
0507   *          This parameter can be one of the following values:
0508   *            @arg QSPI_IT_TO: QSPI Timeout interrupt
0509   *            @arg QSPI_IT_SM: QSPI Status match interrupt
0510   *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt
0511   *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt
0512   *            @arg QSPI_IT_TE: QSPI Transfer error interrupt
0513   * @retval None
0514   */
0515 #define __HAL_QSPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)     SET_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
0516 
0517 
0518 /** @brief  Disable the specified QSPI interrupt.
0519   * @param  __HANDLE__ specifies the QSPI Handle.
0520   * @param  __INTERRUPT__ specifies the QSPI interrupt source to disable.
0521   *          This parameter can be one of the following values:
0522   *            @arg QSPI_IT_TO: QSPI Timeout interrupt
0523   *            @arg QSPI_IT_SM: QSPI Status match interrupt
0524   *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt
0525   *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt
0526   *            @arg QSPI_IT_TE: QSPI Transfer error interrupt
0527   * @retval None
0528   */
0529 #define __HAL_QSPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)    CLEAR_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
0530 
0531 /** @brief  Check whether the specified QSPI interrupt source is enabled or not.
0532   * @param  __HANDLE__ specifies the QSPI Handle.
0533   * @param  __INTERRUPT__ specifies the QSPI interrupt source to check.
0534   *          This parameter can be one of the following values:
0535   *            @arg QSPI_IT_TO: QSPI Timeout interrupt
0536   *            @arg QSPI_IT_SM: QSPI Status match interrupt
0537   *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt
0538   *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt
0539   *            @arg QSPI_IT_TE: QSPI Transfer error interrupt
0540   * @retval The new state of __INTERRUPT__ (TRUE or FALSE).
0541   */
0542 #define __HAL_QSPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (READ_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__)) == (__INTERRUPT__))
0543 
0544 /**
0545   * @brief  Check whether the selected QSPI flag is set or not.
0546   * @param  __HANDLE__ specifies the QSPI Handle.
0547   * @param  __FLAG__ specifies the QSPI flag to check.
0548   *          This parameter can be one of the following values:
0549   *            @arg QSPI_FLAG_BUSY: QSPI Busy flag
0550   *            @arg QSPI_FLAG_TO:   QSPI Timeout flag
0551   *            @arg QSPI_FLAG_SM:   QSPI Status match flag
0552   *            @arg QSPI_FLAG_FT:   QSPI FIFO threshold flag
0553   *            @arg QSPI_FLAG_TC:   QSPI Transfer complete flag
0554   *            @arg QSPI_FLAG_TE:   QSPI Transfer error flag
0555   * @retval None
0556   */
0557 #define __HAL_QSPI_GET_FLAG(__HANDLE__, __FLAG__)           ((READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0U) ? SET : RESET)
0558 
0559 /** @brief  Clears the specified QSPI's flag status.
0560   * @param  __HANDLE__ specifies the QSPI Handle.
0561   * @param  __FLAG__ specifies the QSPI clear register flag that needs to be set
0562   *          This parameter can be one of the following values:
0563   *            @arg QSPI_FLAG_TO: QSPI Timeout flag
0564   *            @arg QSPI_FLAG_SM: QSPI Status match flag
0565   *            @arg QSPI_FLAG_TC: QSPI Transfer complete flag
0566   *            @arg QSPI_FLAG_TE: QSPI Transfer error flag
0567   * @retval None
0568   */
0569 #define __HAL_QSPI_CLEAR_FLAG(__HANDLE__, __FLAG__)         WRITE_REG((__HANDLE__)->Instance->FCR, (__FLAG__))
0570 /**
0571   * @}
0572   */
0573 
0574 /* Exported functions --------------------------------------------------------*/
0575 /** @addtogroup QSPI_Exported_Functions
0576   * @{
0577   */
0578 
0579 /** @addtogroup QSPI_Exported_Functions_Group1
0580   * @{
0581   */
0582 /* Initialization/de-initialization functions  ********************************/
0583 HAL_StatusTypeDef     HAL_QSPI_Init     (QSPI_HandleTypeDef *hqspi);
0584 HAL_StatusTypeDef     HAL_QSPI_DeInit   (QSPI_HandleTypeDef *hqspi);
0585 void                  HAL_QSPI_MspInit  (QSPI_HandleTypeDef *hqspi);
0586 void                  HAL_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi);
0587 /**
0588   * @}
0589   */
0590 
0591 /** @addtogroup QSPI_Exported_Functions_Group2
0592   * @{
0593   */
0594 /* IO operation functions *****************************************************/
0595 /* QSPI IRQ handler method */
0596 void                  HAL_QSPI_IRQHandler(QSPI_HandleTypeDef *hqspi);
0597 
0598 /* QSPI indirect mode */
0599 HAL_StatusTypeDef     HAL_QSPI_Command      (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, uint32_t Timeout);
0600 HAL_StatusTypeDef     HAL_QSPI_Transmit     (QSPI_HandleTypeDef *hqspi, uint8_t *pData, uint32_t Timeout);
0601 HAL_StatusTypeDef     HAL_QSPI_Receive      (QSPI_HandleTypeDef *hqspi, uint8_t *pData, uint32_t Timeout);
0602 HAL_StatusTypeDef     HAL_QSPI_Command_IT   (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd);
0603 HAL_StatusTypeDef     HAL_QSPI_Transmit_IT  (QSPI_HandleTypeDef *hqspi, uint8_t *pData);
0604 HAL_StatusTypeDef     HAL_QSPI_Receive_IT   (QSPI_HandleTypeDef *hqspi, uint8_t *pData);
0605 HAL_StatusTypeDef     HAL_QSPI_Transmit_DMA (QSPI_HandleTypeDef *hqspi, uint8_t *pData);
0606 HAL_StatusTypeDef     HAL_QSPI_Receive_DMA  (QSPI_HandleTypeDef *hqspi, uint8_t *pData);
0607 
0608 /* QSPI status flag polling mode */
0609 HAL_StatusTypeDef     HAL_QSPI_AutoPolling   (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_AutoPollingTypeDef *cfg, uint32_t Timeout);
0610 HAL_StatusTypeDef     HAL_QSPI_AutoPolling_IT(QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_AutoPollingTypeDef *cfg);
0611 
0612 /* QSPI memory-mapped mode */
0613 HAL_StatusTypeDef     HAL_QSPI_MemoryMapped(QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_MemoryMappedTypeDef *cfg);
0614 
0615 /* Callback functions in non-blocking modes ***********************************/
0616 void                  HAL_QSPI_ErrorCallback        (QSPI_HandleTypeDef *hqspi);
0617 void                  HAL_QSPI_AbortCpltCallback    (QSPI_HandleTypeDef *hqspi);
0618 void                  HAL_QSPI_FifoThresholdCallback(QSPI_HandleTypeDef *hqspi);
0619 
0620 /* QSPI indirect mode */
0621 void                  HAL_QSPI_CmdCpltCallback      (QSPI_HandleTypeDef *hqspi);
0622 void                  HAL_QSPI_RxCpltCallback       (QSPI_HandleTypeDef *hqspi);
0623 void                  HAL_QSPI_TxCpltCallback       (QSPI_HandleTypeDef *hqspi);
0624 
0625 /* QSPI status flag polling mode */
0626 void                  HAL_QSPI_StatusMatchCallback  (QSPI_HandleTypeDef *hqspi);
0627 
0628 /* QSPI memory-mapped mode */
0629 void                  HAL_QSPI_TimeOutCallback      (QSPI_HandleTypeDef *hqspi);
0630 
0631 #if (USE_HAL_QSPI_REGISTER_CALLBACKS == 1)
0632 /* QSPI callback registering/unregistering */
0633 HAL_StatusTypeDef     HAL_QSPI_RegisterCallback     (QSPI_HandleTypeDef *hqspi, HAL_QSPI_CallbackIDTypeDef CallbackId, pQSPI_CallbackTypeDef pCallback);
0634 HAL_StatusTypeDef     HAL_QSPI_UnRegisterCallback   (QSPI_HandleTypeDef *hqspi, HAL_QSPI_CallbackIDTypeDef CallbackId);
0635 #endif
0636 /**
0637   * @}
0638   */
0639 
0640 /** @addtogroup QSPI_Exported_Functions_Group3
0641   * @{
0642   */
0643 /* Peripheral Control and State functions  ************************************/
0644 HAL_QSPI_StateTypeDef HAL_QSPI_GetState        (const QSPI_HandleTypeDef *hqspi);
0645 uint32_t              HAL_QSPI_GetError        (const QSPI_HandleTypeDef *hqspi);
0646 HAL_StatusTypeDef     HAL_QSPI_Abort           (QSPI_HandleTypeDef *hqspi);
0647 HAL_StatusTypeDef     HAL_QSPI_Abort_IT        (QSPI_HandleTypeDef *hqspi);
0648 void                  HAL_QSPI_SetTimeout      (QSPI_HandleTypeDef *hqspi, uint32_t Timeout);
0649 HAL_StatusTypeDef     HAL_QSPI_SetFifoThreshold(QSPI_HandleTypeDef *hqspi, uint32_t Threshold);
0650 uint32_t              HAL_QSPI_GetFifoThreshold(const QSPI_HandleTypeDef *hqspi);
0651 HAL_StatusTypeDef     HAL_QSPI_SetFlashID      (QSPI_HandleTypeDef *hqspi, uint32_t FlashID);
0652 /**
0653   * @}
0654   */
0655 
0656 /**
0657   * @}
0658   */
0659 /* End of exported functions -------------------------------------------------*/
0660 
0661 /* Private macros ------------------------------------------------------------*/
0662 /** @defgroup QSPI_Private_Macros QSPI Private Macros
0663   * @ingroup RTEMSBSPsARMSTM32H7
0664   * @{
0665   */
0666 #define IS_QSPI_CLOCK_PRESCALER(PRESCALER) ((PRESCALER) <= 0xFFU)
0667 
0668 #define IS_QSPI_FIFO_THRESHOLD(THR)        (((THR) > 0U) && ((THR) <= 32U))
0669 
0670 #define IS_QSPI_SSHIFT(SSHIFT)             (((SSHIFT) == QSPI_SAMPLE_SHIFTING_NONE) || \
0671                                             ((SSHIFT) == QSPI_SAMPLE_SHIFTING_HALFCYCLE))
0672 
0673 #define IS_QSPI_FLASH_SIZE(FSIZE)          (((FSIZE) <= 31U))
0674 
0675 #define IS_QSPI_CS_HIGH_TIME(CSHTIME)      (((CSHTIME) == QSPI_CS_HIGH_TIME_1_CYCLE) || \
0676                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_2_CYCLE) || \
0677                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_3_CYCLE) || \
0678                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_4_CYCLE) || \
0679                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_5_CYCLE) || \
0680                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_6_CYCLE) || \
0681                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_7_CYCLE) || \
0682                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_8_CYCLE))
0683 
0684 #define IS_QSPI_CLOCK_MODE(CLKMODE)        (((CLKMODE) == QSPI_CLOCK_MODE_0) || \
0685                                             ((CLKMODE) == QSPI_CLOCK_MODE_3))
0686 
0687 #define IS_QSPI_FLASH_ID(FLASH_ID)         (((FLASH_ID) == QSPI_FLASH_ID_1) || \
0688                                             ((FLASH_ID) == QSPI_FLASH_ID_2))
0689 
0690 #define IS_QSPI_DUAL_FLASH_MODE(MODE)      (((MODE) == QSPI_DUALFLASH_ENABLE) || \
0691                                             ((MODE) == QSPI_DUALFLASH_DISABLE))
0692 
0693 #define IS_QSPI_INSTRUCTION(INSTRUCTION)   ((INSTRUCTION) <= 0xFFU)
0694 
0695 #define IS_QSPI_ADDRESS_SIZE(ADDR_SIZE)    (((ADDR_SIZE) == QSPI_ADDRESS_8_BITS)  || \
0696                                             ((ADDR_SIZE) == QSPI_ADDRESS_16_BITS) || \
0697                                             ((ADDR_SIZE) == QSPI_ADDRESS_24_BITS) || \
0698                                             ((ADDR_SIZE) == QSPI_ADDRESS_32_BITS))
0699 
0700 #define IS_QSPI_ALTERNATE_BYTES_SIZE(SIZE) (((SIZE) == QSPI_ALTERNATE_BYTES_8_BITS)  || \
0701                                             ((SIZE) == QSPI_ALTERNATE_BYTES_16_BITS) || \
0702                                             ((SIZE) == QSPI_ALTERNATE_BYTES_24_BITS) || \
0703                                             ((SIZE) == QSPI_ALTERNATE_BYTES_32_BITS))
0704 
0705 #define IS_QSPI_DUMMY_CYCLES(DCY)          ((DCY) <= 31U)
0706 
0707 #define IS_QSPI_INSTRUCTION_MODE(MODE)     (((MODE) == QSPI_INSTRUCTION_NONE)    || \
0708                                             ((MODE) == QSPI_INSTRUCTION_1_LINE)  || \
0709                                             ((MODE) == QSPI_INSTRUCTION_2_LINES) || \
0710                                             ((MODE) == QSPI_INSTRUCTION_4_LINES))
0711 
0712 #define IS_QSPI_ADDRESS_MODE(MODE)         (((MODE) == QSPI_ADDRESS_NONE)    || \
0713                                             ((MODE) == QSPI_ADDRESS_1_LINE)  || \
0714                                             ((MODE) == QSPI_ADDRESS_2_LINES) || \
0715                                             ((MODE) == QSPI_ADDRESS_4_LINES))
0716 
0717 #define IS_QSPI_ALTERNATE_BYTES_MODE(MODE) (((MODE) == QSPI_ALTERNATE_BYTES_NONE)    || \
0718                                             ((MODE) == QSPI_ALTERNATE_BYTES_1_LINE)  || \
0719                                             ((MODE) == QSPI_ALTERNATE_BYTES_2_LINES) || \
0720                                             ((MODE) == QSPI_ALTERNATE_BYTES_4_LINES))
0721 
0722 #define IS_QSPI_DATA_MODE(MODE)            (((MODE) == QSPI_DATA_NONE)    || \
0723                                             ((MODE) == QSPI_DATA_1_LINE)  || \
0724                                             ((MODE) == QSPI_DATA_2_LINES) || \
0725                                             ((MODE) == QSPI_DATA_4_LINES))
0726 
0727 #define IS_QSPI_DDR_MODE(DDR_MODE)         (((DDR_MODE) == QSPI_DDR_MODE_DISABLE) || \
0728                                             ((DDR_MODE) == QSPI_DDR_MODE_ENABLE))
0729 
0730 #define IS_QSPI_DDR_HHC(DDR_HHC)           (((DDR_HHC) == QSPI_DDR_HHC_ANALOG_DELAY) || \
0731                                             ((DDR_HHC) == QSPI_DDR_HHC_HALF_CLK_DELAY))
0732 
0733 #define IS_QSPI_SIOO_MODE(SIOO_MODE)       (((SIOO_MODE) == QSPI_SIOO_INST_EVERY_CMD) || \
0734                                             ((SIOO_MODE) == QSPI_SIOO_INST_ONLY_FIRST_CMD))
0735 
0736 #define IS_QSPI_INTERVAL(INTERVAL)         ((INTERVAL) <= QUADSPI_PIR_INTERVAL)
0737 
0738 #define IS_QSPI_STATUS_BYTES_SIZE(SIZE)    (((SIZE) >= 1U) && ((SIZE) <= 4U))
0739 
0740 #define IS_QSPI_MATCH_MODE(MODE)           (((MODE) == QSPI_MATCH_MODE_AND) || \
0741                                             ((MODE) == QSPI_MATCH_MODE_OR))
0742 
0743 #define IS_QSPI_AUTOMATIC_STOP(APMS)       (((APMS) == QSPI_AUTOMATIC_STOP_DISABLE) || \
0744                                             ((APMS) == QSPI_AUTOMATIC_STOP_ENABLE))
0745 
0746 #define IS_QSPI_TIMEOUT_ACTIVATION(TCEN)   (((TCEN) == QSPI_TIMEOUT_COUNTER_DISABLE) || \
0747                                             ((TCEN) == QSPI_TIMEOUT_COUNTER_ENABLE))
0748 
0749 #define IS_QSPI_TIMEOUT_PERIOD(PERIOD)     ((PERIOD) <= 0xFFFFU)
0750 /**
0751 * @}
0752 */
0753 /* End of private macros -----------------------------------------------------*/
0754 
0755 /**
0756   * @}
0757   */
0758 
0759 /**
0760   * @}
0761   */
0762 
0763 #endif /* defined(QUADSPI) */
0764 
0765 #ifdef __cplusplus
0766 }
0767 #endif
0768 
0769 #endif /* STM32H7xx_HAL_QSPI_H */