aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/stm32/f4/stm32f4-discovery/random/random.c2
-rw-r--r--include/libopencm3/stm32/f4/rng.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32/f4/stm32f4-discovery/random/random.c b/examples/stm32/f4/stm32f4-discovery/random/random.c
index 9305be3..74f6775 100644
--- a/examples/stm32/f4/stm32f4-discovery/random/random.c
+++ b/examples/stm32/f4/stm32f4-discovery/random/random.c
@@ -40,7 +40,7 @@ static void rng_setup(void)
/* Enable the random number generation by setting the RNGEN bit in the RNG_CR
register. This activates the analog part, the RNG_LFSR and the error detector.
*/
- RNG_CR |= RNG_CR_EN;
+ RNG_CR |= RNG_CR_RNGEN;
}
static void gpio_setup(void)
diff --git a/include/libopencm3/stm32/f4/rng.h b/include/libopencm3/stm32/f4/rng.h
index 5f517c8..5553dd3 100644
--- a/include/libopencm3/stm32/f4/rng.h
+++ b/include/libopencm3/stm32/f4/rng.h
@@ -36,7 +36,7 @@
/* --- RNG_CR values ------------------------------------------------------- */
/* RNG ENABLE */
-#define RNG_CR_EN (1 << 2)
+#define RNG_CR_RNGEN (1 << 2)
/* RNG interupt enable */
#define RNG_CR_IE (1 << 3)