mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_rng.c
- Revision:
- 106:ced8cbb51063
- Parent:
- 87:085cde657901
- Child:
- 226:b062af740e40
--- a/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_rng.c Mon Feb 24 10:30:08 2014 +0000 +++ b/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_rng.c Wed Feb 26 09:45:12 2014 +0000 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f4xx_hal_rng.c * @author MCD Application Team - * @version V1.0.0RC2 - * @date 04-February-2014 + * @version V1.0.0 + * @date 18-February-2014 * @brief RNG HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Random Number Generator (RNG) peripheral: @@ -118,9 +118,6 @@ /* Init the low level hardware */ HAL_RNG_MspInit(hrng); } - - /* Change RNG peripheral state */ - hrng->State = HAL_RNG_STATE_BUSY; /* Enable the RNG Peripheral */ __HAL_RNG_ENABLE(hrng); @@ -132,7 +129,6 @@ return HAL_OK; } - /** * @brief DeInitializes the RNG peripheral. * @param hrng: RNG handle @@ -160,10 +156,13 @@ /* DeInit the low level hardware */ HAL_RNG_MspDeInit(hrng); - /* Update the RNG state */ + /* Update the RNG state */ hrng->State = HAL_RNG_STATE_RESET; - /* Return the function status */ + /* Release Lock */ + __HAL_UNLOCK(hrng); + + /* Return the function status */ return HAL_OK; }