This commit is contained in:
iabdalkader 2014-08-19 19:06:27 +02:00
parent 729fedfe6f
commit 43aa7688a6

View File

@ -6,9 +6,8 @@ static RNG_HandleTypeDef RNGHandle;
void rng_init() void rng_init()
{ {
__RNG_CLK_ENABLE(); __RNG_CLK_ENABLE();
RNGHandle.Instance = RNG; RNGHandle.Instance = RNG;
__HAL_RNG_ENABLE(&RNGHandle); HAL_RNG_Init(&RNGHandle);
} }
uint32_t rng_randint(uint32_t min, uint32_t max) uint32_t rng_randint(uint32_t min, uint32_t max)