stm32f4xx_qspi.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_qspi.h
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 06-March-2015
  7. * @brief This file contains all the functions prototypes for the QSPI
  8. * firmware library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
  13. *
  14. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  15. * You may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at:
  17. *
  18. * http://www.st.com/software_license_agreement_liberty_v2
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. ******************************************************************************
  27. */
  28. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F4XX_QUADSPI_H
  30. #define __STM32F4XX_QUADSPI_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f4xx.h"
  36. /** @addtogroup STM32F4xx_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup QSPI
  40. * @{
  41. */
  42. /* Exported types ------------------------------------------------------------*/
  43. /**
  44. * @brief QSPI Communication Configuration Init structure definition
  45. */
  46. typedef struct
  47. {
  48. uint32_t QSPI_ComConfig_FMode; /* Specifies the Functional Mode
  49. This parameter can be a value of @ref QSPI_ComConfig_Functional_Mode*/
  50. uint32_t QSPI_ComConfig_DDRMode; /* Specifies the Double Data Rate Mode
  51. This parameter can be a value of @ref QSPI_ComConfig_DoubleDataRateMode*/
  52. uint32_t QSPI_ComConfig_DHHC; /* Specifies the Delay Half Hclk Cycle
  53. This parameter can be a value of @ref QSPI_ComConfig_DelayHalfHclkCycle*/
  54. uint32_t QSPI_ComConfig_SIOOMode; /* Specifies the Send Instruction Only Once Mode
  55. This parameter can be a value of @ref QSPI_ComConfig_SendInstructionOnlyOnceMode*/
  56. uint32_t QSPI_ComConfig_DMode; /* Specifies the Data Mode
  57. This parameter can be a value of @ref QSPI_ComConfig_DataMode*/
  58. uint32_t QSPI_ComConfig_DummyCycles; /* Specifies the Number of Dummy Cycles.
  59. This parameter can be a number between 0x00 and 0x1F */
  60. uint32_t QSPI_ComConfig_ABSize; /* Specifies the Alternate Bytes Size
  61. This parameter can be a value of @ref QSPI_ComConfig_AlternateBytesSize*/
  62. uint32_t QSPI_ComConfig_ABMode; /* Specifies the Alternate Bytes Mode
  63. This parameter can be a value of @ref QSPI_ComConfig_AlternateBytesMode*/
  64. uint32_t QSPI_ComConfig_ADSize; /* Specifies the Address Size
  65. This parameter can be a value of @ref QSPI_ComConfig_AddressSize*/
  66. uint32_t QSPI_ComConfig_ADMode; /* Specifies the Address Mode
  67. This parameter can be a value of @ref QSPI_ComConfig_AddressMode*/
  68. uint32_t QSPI_ComConfig_IMode; /* Specifies the Instruction Mode
  69. This parameter can be a value of @ref QSPI_ComConfig_InstructionMode*/
  70. uint32_t QSPI_ComConfig_Ins; /* Specifies the Instruction Mode
  71. This parameter can be a value of @ref QSPI_ComConfig_Instruction*/
  72. }QSPI_ComConfig_InitTypeDef;
  73. /**
  74. * @brief QSPI Init structure definition
  75. */
  76. typedef struct
  77. {
  78. uint32_t QSPI_SShift; /* Specifies the Sample Shift
  79. This parameter can be a value of @ref QSPI_Sample_Shift*/
  80. uint32_t QSPI_Prescaler; /* Specifies the prescaler value used to divide the QSPI clock.
  81. This parameter can be a number between 0x00 and 0xFF */
  82. uint32_t QSPI_CKMode; /* Specifies the Clock Mode
  83. This parameter can be a value of @ref QSPI_Clock_Mode*/
  84. uint32_t QSPI_CSHTime; /* Specifies the Chip Select High Time
  85. This parameter can be a value of @ref QSPI_ChipSelectHighTime*/
  86. uint32_t QSPI_FSize; /* Specifies the Flash Size.
  87. QSPI_FSize+1 is effectively the number of address bits required to address the flash memory.
  88. The flash capacity can be up to 4GB (addressed using 32 bits) in indirect mode, but the
  89. addressable space in memory-mapped mode is limited to 512MB
  90. This parameter can be a number between 0x00 and 0x1F */
  91. uint32_t QSPI_FSelect; /* Specifies the Flash which will be used,
  92. This parameter can be a value of @ref QSPI_Fash_Select*/
  93. uint32_t QSPI_DFlash; /* Specifies the Dual Flash Mode State
  94. This parameter can be a value of @ref QSPI_Dual_Flash*/
  95. }QSPI_InitTypeDef;
  96. /* Exported constants --------------------------------------------------------*/
  97. /** @defgroup QSPI_Exported_Constants
  98. * @{
  99. */
  100. /** @defgroup QSPI_Sample_Shift
  101. * @{
  102. */
  103. #define QSPI_SShift_NoShift ((uint32_t)0x00000000)
  104. #define QSPI_SShift_HalfCycleShift ((uint32_t)QUADSPI_CR_SSHIFT_0)
  105. #define QSPI_SShift_OneCycleShift ((uint32_t)QUADSPI_CR_SSHIFT_1)
  106. #define QSPI_SShift_OneAndHalfCycleShift ((uint32_t)QUADSPI_CR_SSHIFT)
  107. #define IS_QSPI_SSHIFT(SSHIFT) (((SSHIFT) == QSPI_SShift_NoShift) || ((SSHIFT) == QSPI_SShift_HalfCycleShift) || \
  108. ((SSHIFT) == QSPI_SShift_OneCycleShift) || ((SSHIFT) == QSPI_SShift_OneAndHalfCycleShift))
  109. /**
  110. * @}
  111. */
  112. /** @defgroup QSPI_Prescaler
  113. * @{
  114. */
  115. #define IS_QSPI_PRESCALER(PRESCALER) (((PRESCALER) <= 0xFF))
  116. /**
  117. * @}
  118. */
  119. /** @defgroup QSPI_Clock_Mode
  120. * @{
  121. */
  122. #define QSPI_CKMode_Mode0 ((uint32_t)0x00000000)
  123. #define QSPI_CKMode_Mode3 ((uint32_t)QUADSPI_DCR_CKMODE)
  124. #define IS_QSPI_CKMODE(CKMode) (((CKMode) == QSPI_CKMode_Mode0) || ((CKMode) == QSPI_CKMode_Mode3))
  125. /**
  126. * @}
  127. */
  128. /** @defgroup QSPI_ChipSelectHighTime
  129. * @{
  130. */
  131. #define QSPI_CSHTime_1Cycle ((uint32_t)0x00000000)
  132. #define QSPI_CSHTime_2Cycle ((uint32_t)QUADSPI_DCR_CSHT_0)
  133. #define QSPI_CSHTime_3Cycle ((uint32_t)QUADSPI_DCR_CSHT_1)
  134. #define QSPI_CSHTime_4Cycle ((uint32_t)QUADSPI_DCR_CSHT_0 | QUADSPI_DCR_CSHT_1)
  135. #define QSPI_CSHTime_5Cycle ((uint32_t)QUADSPI_DCR_CSHT_2)
  136. #define QSPI_CSHTime_6Cycle ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_0)
  137. #define QSPI_CSHTime_7Cycle ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_1)
  138. #define QSPI_CSHTime_8Cycle ((uint32_t)QUADSPI_DCR_CSHT)
  139. #define IS_QSPI_CSHTIME(CSHTIME) (((CSHTIME) == QSPI_CSHTime_1Cycle) || \
  140. ((CSHTIME) == QSPI_CSHTime_2Cycle) || \
  141. ((CSHTIME) == QSPI_CSHTime_3Cycle) || \
  142. ((CSHTIME) == QSPI_CSHTime_4Cycle) || \
  143. ((CSHTIME) == QSPI_CSHTime_5Cycle) || \
  144. ((CSHTIME) == QSPI_CSHTime_6Cycle) || \
  145. ((CSHTIME) == QSPI_CSHTime_7Cycle) || \
  146. ((CSHTIME) == QSPI_CSHTime_8Cycle))
  147. /**
  148. * @}
  149. */
  150. /** @defgroup QSPI_Flash_Size
  151. * @{
  152. */
  153. #define IS_QSPI_FSIZE(FSIZE) (((FSIZE) <= 0x1F))
  154. /**
  155. * @}
  156. */
  157. /** @defgroup QSPI_Fash_Select
  158. * @{
  159. */
  160. #define QSPI_FSelect_1 ((uint32_t)0x00000000)
  161. #define QSPI_FSelect_2 ((uint32_t)QUADSPI_CR_FSEL)
  162. #define IS_QSPI_FSEL(FLA) (((FLA) == QSPI_FSelect_1) || ((FLA) == QSPI_FSelect_2))
  163. /**
  164. * @}
  165. */
  166. /** @defgroup QSPI_Dual_Flash
  167. * @{
  168. */
  169. #define QSPI_DFlash_Disable ((uint32_t)0x00000000)
  170. #define QSPI_DFlash_Enable ((uint32_t)QUADSPI_CR_DFM)
  171. #define IS_QSPI_DFM(FLA) (((FLA) == QSPI_DFlash_Enable) || ((FLA) == QSPI_DFlash_Disable))
  172. /**
  173. * @}
  174. */
  175. /** @defgroup QSPI_ComConfig_Functional_Mode
  176. * @{
  177. */
  178. #define QSPI_ComConfig_FMode_Indirect_Write ((uint32_t)0x00000000)
  179. #define QSPI_ComConfig_FMode_Indirect_Read ((uint32_t)QUADSPI_CCR_FMODE_0)
  180. #define QSPI_ComConfig_FMode_Auto_Polling ((uint32_t)QUADSPI_CCR_FMODE_1)
  181. #define QSPI_ComConfig_FMode_Memory_Mapped ((uint32_t)QUADSPI_CCR_FMODE)
  182. #define IS_QSPI_FMODE(FMODE) (((FMODE) == QSPI_ComConfig_FMode_Indirect_Write) || \
  183. ((FMODE) == QSPI_ComConfig_FMode_Indirect_Read) || \
  184. ((FMODE) == QSPI_ComConfig_FMode_Auto_Polling) || \
  185. ((FMODE) == QSPI_ComConfig_FMode_Memory_Mapped))
  186. /**
  187. * @}
  188. */
  189. /** @defgroup QSPI_ComConfig_DoubleDataRateMode
  190. * @{
  191. */
  192. #define QSPI_ComConfig_DDRMode_Disable ((uint32_t)0x00000000)
  193. #define QSPI_ComConfig_DDRMode_Enable ((uint32_t)QUADSPI_CCR_DDRM)
  194. #define IS_QSPI_DDRMODE(DDRMODE) (((DDRMODE) == QSPI_ComConfig_DDRMode_Disable) || \
  195. ((DDRMODE) == QSPI_ComConfig_DDRMode_Enable))
  196. /**
  197. * @}
  198. */
  199. /** @defgroup QSPI_ComConfig_DelayHalfHclkCycle
  200. * @{
  201. */
  202. #define QSPI_ComConfig_DHHC_Disable ((uint32_t)0x00000000)
  203. #define QSPI_ComConfig_DHHC_Enable ((uint32_t)QUADSPI_CCR_DHHC)
  204. #define IS_QSPI_DHHC(DHHC) (((DHHC) == QSPI_ComConfig_DHHC_Disable) || \
  205. ((DHHC) == QSPI_ComConfig_DHHC_Enable))
  206. /**
  207. * @}
  208. */
  209. /** @defgroup QSPI_ComConfig_SendInstructionOnlyOnceMode
  210. * @{
  211. */
  212. #define QSPI_ComConfig_SIOOMode_Disable ((uint32_t)0x00000000)
  213. #define QSPI_ComConfig_SIOOMode_Enable ((uint32_t)QUADSPI_CCR_SIOO)
  214. #define IS_QSPI_SIOOMODE(SIOOMODE) (((SIOOMODE) == QSPI_ComConfig_SIOOMode_Disable) || \
  215. ((SIOOMODE) == QSPI_ComConfig_SIOOMode_Enable))
  216. /**
  217. * @}
  218. */
  219. /** @defgroup QSPI_ComConfig_DataMode
  220. * @{
  221. */
  222. #define QSPI_ComConfig_DMode_NoData ((uint32_t)0x00000000)
  223. #define QSPI_ComConfig_DMode_1Line ((uint32_t)QUADSPI_CCR_DMODE_0)
  224. #define QSPI_ComConfig_DMode_2Line ((uint32_t)QUADSPI_CCR_DMODE_1)
  225. #define QSPI_ComConfig_DMode_4Line ((uint32_t)QUADSPI_CCR_DMODE)
  226. #define IS_QSPI_DMODE(DMODE) (((DMODE) == QSPI_ComConfig_DMode_NoData) || \
  227. ((DMODE) == QSPI_ComConfig_DMode_1Line) || \
  228. ((DMODE) == QSPI_ComConfig_DMode_2Line) || \
  229. ((DMODE) == QSPI_ComConfig_DMode_4Line))
  230. /**
  231. * @}
  232. */
  233. /** @defgroup QSPI_ComConfig_AlternateBytesSize
  234. * @{
  235. */
  236. #define QSPI_ComConfig_ABSize_8bit ((uint32_t)0x00000000)
  237. #define QSPI_ComConfig_ABSize_16bit ((uint32_t)QUADSPI_CCR_ABSIZE_0)
  238. #define QSPI_ComConfig_ABSize_24bit ((uint32_t)QUADSPI_CCR_ABSIZE_1)
  239. #define QSPI_ComConfig_ABSize_32bit ((uint32_t)QUADSPI_CCR_ABSIZE)
  240. #define IS_QSPI_ABSIZE(ABSIZE) (((ABSIZE) == QSPI_ComConfig_ABSize_8bit) || \
  241. ((ABSIZE) == QSPI_ComConfig_ABSize_16bit) || \
  242. ((ABSIZE) == QSPI_ComConfig_ABSize_24bit) || \
  243. ((ABSIZE) == QSPI_ComConfig_ABSize_32bit))
  244. /**
  245. * @}
  246. */
  247. /** @defgroup QSPI_ComConfig_AlternateBytesMode
  248. * @{
  249. */
  250. #define QSPI_ComConfig_ABMode_NoAlternateByte ((uint32_t)0x00000000)
  251. #define QSPI_ComConfig_ABMode_1Line ((uint32_t)QUADSPI_CCR_ABMODE_0)
  252. #define QSPI_ComConfig_ABMode_2Line ((uint32_t)QUADSPI_CCR_ABMODE_1)
  253. #define QSPI_ComConfig_ABMode_4Line ((uint32_t)QUADSPI_CCR_ABMODE)
  254. #define IS_QSPI_ABMODE(ABMODE) (((ABMODE) == QSPI_ComConfig_ABMode_NoAlternateByte) || \
  255. ((ABMODE) == QSPI_ComConfig_ABMode_1Line) || \
  256. ((ABMODE) == QSPI_ComConfig_ABMode_2Line) || \
  257. ((ABMODE) == QSPI_ComConfig_ABMode_4Line))
  258. /**
  259. * @}
  260. */
  261. /** @defgroup QSPI_ComConfig_AddressSize
  262. * @{
  263. */
  264. #define QSPI_ComConfig_ADSize_8bit ((uint32_t)0x00000000)
  265. #define QSPI_ComConfig_ADSize_16bit ((uint32_t)QUADSPI_CCR_ADSIZE_0)
  266. #define QSPI_ComConfig_ADSize_24bit ((uint32_t)QUADSPI_CCR_ADSIZE_1)
  267. #define QSPI_ComConfig_ADSize_32bit ((uint32_t)QUADSPI_CCR_ADSIZE)
  268. #define IS_QSPI_ADSIZE(ADSIZE) (((ADSIZE) == QSPI_ComConfig_ADSize_8bit) || \
  269. ((ADSIZE) == QSPI_ComConfig_ADSize_16bit) || \
  270. ((ADSIZE) == QSPI_ComConfig_ADSize_24bit) || \
  271. ((ADSIZE) == QSPI_ComConfig_ADSize_32bit))
  272. /**
  273. * @}
  274. */
  275. /** @defgroup QSPI_ComConfig_AddressMode
  276. * @{
  277. */
  278. #define QSPI_ComConfig_ADMode_NoAddress ((uint32_t)0x00000000)
  279. #define QSPI_ComConfig_ADMode_1Line ((uint32_t)QUADSPI_CCR_ADMODE_0)
  280. #define QSPI_ComConfig_ADMode_2Line ((uint32_t)QUADSPI_CCR_ADMODE_1)
  281. #define QSPI_ComConfig_ADMode_4Line ((uint32_t)QUADSPI_CCR_ADMODE)
  282. #define IS_QSPI_ADMODE(ADMODE) (((ADMODE) == QSPI_ComConfig_ADMode_NoAddress) || \
  283. ((ADMODE) == QSPI_ComConfig_ADMode_1Line) || \
  284. ((ADMODE) == QSPI_ComConfig_ADMode_2Line) || \
  285. ((ADMODE) == QSPI_ComConfig_ADMode_4Line))
  286. /**
  287. * @}
  288. */
  289. /** @defgroup QSPI_ComConfig_InstructionMode
  290. * @{
  291. */
  292. #define QSPI_ComConfig_IMode_NoInstruction ((uint32_t)0x00000000)
  293. #define QSPI_ComConfig_IMode_1Line ((uint32_t)QUADSPI_CCR_IMODE_0)
  294. #define QSPI_ComConfig_IMode_2Line ((uint32_t)QUADSPI_CCR_IMODE_1)
  295. #define QSPI_ComConfig_IMode_4Line ((uint32_t)QUADSPI_CCR_IMODE)
  296. #define IS_QSPI_IMODE(IMODE) (((IMODE) == QSPI_ComConfig_IMode_NoInstruction) || \
  297. ((IMODE) == QSPI_ComConfig_IMode_1Line) || \
  298. ((IMODE) == QSPI_ComConfig_IMode_2Line) || \
  299. ((IMODE) == QSPI_ComConfig_IMode_4Line))
  300. /**
  301. * @}
  302. */
  303. /** @defgroup QSPI_ComConfig_Instruction
  304. * @{
  305. */
  306. #define IS_QSPI_INSTRUCTION(INSTRUCTION) ((INSTRUCTION) <= 0xFF)
  307. /**
  308. * @}
  309. */
  310. /** @defgroup QSPI_InterruptsDefinition
  311. * @{
  312. */
  313. #define QSPI_IT_TO (uint32_t)(QUADSPI_CR_TOIE | QUADSPI_SR_TOF)
  314. #define QSPI_IT_SM (uint32_t)(QUADSPI_CR_SMIE | QUADSPI_SR_SMF)
  315. #define QSPI_IT_FT (uint32_t)(QUADSPI_CR_FTIE | QUADSPI_SR_FTF)
  316. #define QSPI_IT_TC (uint32_t)(QUADSPI_CR_TCIE | QUADSPI_SR_TCF)
  317. #define QSPI_IT_TE (uint32_t)(QUADSPI_CR_TEIE | QUADSPI_SR_TEF)
  318. #define IS_QSPI_IT(IT) ((((IT) & 0xFFE0FFE0) == 0) && ((IT) != 0))
  319. #define IS_QSPI_CLEAR_IT(IT) ((((IT) & 0xFFE4FFE4) == 0) && ((IT) != 0))
  320. /**
  321. * @}
  322. */
  323. /** @defgroup QSPI_FlagsDefinition
  324. * @{
  325. */
  326. #define QSPI_FLAG_TO QUADSPI_SR_TOF
  327. #define QSPI_FLAG_SM QUADSPI_SR_SMF
  328. #define QSPI_FLAG_FT QUADSPI_SR_FTF
  329. #define QSPI_FLAG_TC QUADSPI_SR_TCF
  330. #define QSPI_FLAG_TE QUADSPI_SR_TEF
  331. #define QSPI_FLAG_BUSY QUADSPI_SR_BUSY
  332. #define IS_QSPI_GET_FLAG(FLAG) (((FLAG) == QSPI_FLAG_TO) || ((FLAG) == QSPI_FLAG_SM) || \
  333. ((FLAG) == QSPI_FLAG_FT) || ((FLAG) == QSPI_FLAG_TC) || \
  334. ((FLAG) == QSPI_FLAG_TE) || ((FLAG) == QSPI_FLAG_BUSY))
  335. #define IS_QSPI_CLEAR_FLAG(FLAG) (((FLAG) == QSPI_FLAG_TO) || ((FLAG) == QSPI_FLAG_SM) || \
  336. ((FLAG) == QSPI_FLAG_TC) || ((FLAG) == QSPI_FLAG_TE))
  337. /**
  338. * @}
  339. */
  340. /** @defgroup QSPI_Polling_Match_Mode
  341. * @{
  342. */
  343. #define QSPI_PMM_AND ((uint32_t)0x00000000)
  344. #define QSPI_PMM_OR ((uint32_t)QUADSPI_CR_PMM)
  345. #define IS_QSPI_PMM(PMM) (((PMM) == QSPI_PMM_AND) || ((PMM) == QSPI_PMM_OR))
  346. /**
  347. * @}
  348. */
  349. /** @defgroup QSPI_Polling_Interval
  350. * @{
  351. */
  352. #define IS_QSPI_PIR(PIR) ((PIR) <= QUADSPI_PIR_INTERVAL)
  353. /**
  354. * @}
  355. */
  356. /** @defgroup QSPI_Timeout
  357. * @{
  358. */
  359. #define IS_QSPI_TIMEOUT(TIMEOUT) ((TIMEOUT) <= QUADSPI_LPTR_TIMEOUT)
  360. /**
  361. * @}
  362. */
  363. /** @defgroup QSPI_DummyCycle
  364. * @{
  365. */
  366. #define IS_QSPI_DCY(DCY) ((DCY) <= 0x1F)
  367. /**
  368. * @}
  369. */
  370. /** @defgroup QSPI_FIFOThreshold
  371. * @{
  372. */
  373. #define IS_QSPI_FIFOTHRESHOLD(FIFOTHRESHOLD) ((FIFOTHRESHOLD) <= 0x0F)
  374. /**
  375. * @}
  376. */
  377. /**
  378. * @}
  379. */
  380. /* Exported macro ------------------------------------------------------------*/
  381. /* Exported functions ------------------------------------------------------- */
  382. /* Initialization and Configuration functions *********************************/
  383. void QSPI_DeInit(void);
  384. void QSPI_Init(QSPI_InitTypeDef* QSPI_InitStruct);
  385. void QSPI_StructInit(QSPI_InitTypeDef* QSPI_InitStruct);
  386. void QSPI_ComConfig_Init(QSPI_ComConfig_InitTypeDef* QSPI_ComConfig_InitStruct);
  387. void QSPI_ComConfig_StructInit(QSPI_ComConfig_InitTypeDef* QSPI_ComConfig_InitStruct);
  388. void QSPI_Cmd(FunctionalState NewState);
  389. void QSPI_AutoPollingMode_Config(uint32_t QSPI_Match, uint32_t QSPI_Mask , uint32_t QSPI_Match_Mode);
  390. void QSPI_AutoPollingMode_SetInterval(uint32_t QSPI_Interval);
  391. void QSPI_MemoryMappedMode_SetTimeout(uint32_t QSPI_Timeout);
  392. void QSPI_SetAddress(uint32_t QSPI_Address);
  393. void QSPI_SetAlternateByte(uint32_t QSPI_AlternateByte);
  394. void QSPI_SetFIFOThreshold(uint32_t QSPI_FIFOThreshold);
  395. void QSPI_SetDataLength(uint32_t QSPI_DataLength);
  396. void QSPI_TimeoutCounterCmd(FunctionalState NewState);
  397. void QSPI_AutoPollingModeStopCmd(FunctionalState NewState);
  398. void QSPI_AbortRequest(void);
  399. void QSPI_DualFlashMode_Cmd(FunctionalState NewState);
  400. /* Data transfers functions ***************************************************/
  401. void QSPI_SendData8(uint8_t Data);
  402. void QSPI_SendData16(uint16_t Data);
  403. void QSPI_SendData32(uint32_t Data);
  404. uint8_t QSPI_ReceiveData8(void);
  405. uint16_t QSPI_ReceiveData16(void);
  406. uint32_t QSPI_ReceiveData32(void);
  407. /* DMA transfers management functions *****************************************/
  408. void QSPI_DMACmd(FunctionalState NewState);
  409. /* Interrupts and flags management functions **********************************/
  410. void QSPI_ITConfig(uint32_t QSPI_IT, FunctionalState NewState);
  411. uint32_t QSPI_GetFIFOLevel(void);
  412. FlagStatus QSPI_GetFlagStatus(uint32_t QSPI_FLAG);
  413. void QSPI_ClearFlag(uint32_t QSPI_FLAG);
  414. ITStatus QSPI_GetITStatus(uint32_t QSPI_IT);
  415. void QSPI_ClearITPendingBit(uint32_t QSPI_IT);
  416. uint32_t QSPI_GetFMode(void);
  417. #ifdef __cplusplus
  418. }
  419. #endif
  420. #endif /*__STM32F4XX_QUADSPI_H */
  421. /**
  422. * @}
  423. */
  424. /**
  425. * @}
  426. */
  427. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/