]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/stm32f7xx_hal_qspi.c
Update library files used in STM32F7 demo to the latest version released by ST.
[freertos] / FreeRTOS / Demo / CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil / ST_Library / stm32f7xx_hal_qspi.c
index f14eae5dc1a2e10b99c4ff98407088cfc7107434..61527e51a71fc8b53dd4ce0febfeed0ba20e1ea6 100644 (file)
@@ -2,8 +2,8 @@
   ******************************************************************************\r
   * @file    stm32f7xx_hal_qspi.c\r
   * @author  MCD Application Team\r
-  * @version V1.0.0RC1\r
-  * @date    24-March-2015\r
+  * @version V1.0.0\r
+  * @date    12-May-2015\r
   * @brief   QSPI HAL module driver.\r
   *\r
   *          This file provides firmware functions to manage the following \r
@@ -254,14 +254,21 @@ HAL_StatusTypeDef HAL_QSPI_Init(QSPI_HandleTypeDef *hqspi)
   assert_param(IS_QSPI_FLASH_SIZE(hqspi->Init.FlashSize));\r
   assert_param(IS_QSPI_CS_HIGH_TIME(hqspi->Init.ChipSelectHighTime));\r
   assert_param(IS_QSPI_CLOCK_MODE(hqspi->Init.ClockMode));\r
-  assert_param(IS_QSPI_FLASH_ID(hqspi->Init.FlashID));\r
   assert_param(IS_QSPI_DUAL_FLASH_MODE(hqspi->Init.DualFlash));\r
 \r
+  if (hqspi->Init.DualFlash != QSPI_DUALFLASH_ENABLE )\r
+  {\r
+    assert_param(IS_QSPI_FLASH_ID(hqspi->Init.FlashID));\r
+  }\r
+  \r
   /* Process locked */\r
   __HAL_LOCK(hqspi);\r
     \r
   if(hqspi->State == HAL_QSPI_STATE_RESET)\r
-  {  \r
+  { \r
+    /* Allocate lock resource and initialize it */\r
+    hqspi->Lock = HAL_UNLOCKED;\r
+     \r
     /* Init the low level hardware : GPIO, CLOCK */\r
     HAL_QSPI_MspInit(hqspi);\r
              \r
@@ -1772,7 +1779,7 @@ static HAL_StatusTypeDef QSPI_WaitFlagStateUntilTimeout(QSPI_HandleTypeDef *hqsp
   * @param  hqspi: QSPI handle\r
   * @param  cmd: structure that contains the command configuration information\r
   * @param  FunctionalMode: functional mode to configured\r
-  *           This parameter can be a value of @ref QSPI_FunctionalMode\r
+  *           This parameter can be one of the following values:\r
   *            @arg QSPI_FUNCTIONAL_MODE_INDIRECT_WRITE: Indirect write mode\r
   *            @arg QSPI_FUNCTIONAL_MODE_INDIRECT_READ: Indirect read mode\r
   *            @arg QSPI_FUNCTIONAL_MODE_AUTO_POLLING: Automatic polling mode\r