mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Revision:
106:ced8cbb51063
Parent:
87:085cde657901
Child:
226:b062af740e40
--- a/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_nand.c	Mon Feb 24 10:30:08 2014 +0000
+++ b/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_nand.c	Wed Feb 26 09:45:12 2014 +0000
@@ -2,8 +2,8 @@
   ******************************************************************************
   * @file    stm32f4xx_hal_nand.c
   * @author  MCD Application Team
-  * @version V1.0.0RC2
-  * @date    04-February-2014
+  * @version V1.0.0
+  * @date    18-February-2014
   * @brief   NAND HAL module driver.
   *          This file provides a generic firmware to drive NAND memories mounted 
   *          as external device.
@@ -154,13 +154,12 @@
   FMC_NAND_AttributeSpace_Timing_Init(hnand->Instance, AttSpace_Timing, hnand->Init.NandBank);
   
   /* Enable the NAND device */
-  __FMC_NAND_ENABLE(hnand->Instance, hnand->Init.NandBank);   
+  __FMC_NAND_ENABLE(hnand->Instance, hnand->Init.NandBank);
   
   /* Update the NAND controller state */
-  hnand->State = HAL_NAND_STATE_READY;  
-  
+  hnand->State = HAL_NAND_STATE_READY;
+
   return HAL_OK;
-
 }
 
 /**
@@ -172,12 +171,17 @@
 {
   /* Initialize the low level hardware (MSP) */
   HAL_NAND_MspDeInit(hnand);
-  
+
   /* Configure the NAND registers with their reset values */
   FMC_NAND_DeInit(hnand->Instance, hnand->Init.NandBank);
 
-  return HAL_OK;  
-  
+  /* Reset the NAND controller state */
+  hnand->State = HAL_NAND_STATE_RESET;
+
+  /* Release Lock */
+  __HAL_UNLOCK(hnand);
+
+  return HAL_OK;
 }
 
 /**