From 0e2c1e473567db9d63c8695d1b08a34820cfd532 Mon Sep 17 00:00:00 2001 From: Philipp Claves <pclaves@web.de> Date: Sun, 6 Nov 2011 00:36:19 +0100 Subject: [PATCH] Control: include "common.h" in random.c for F_CPU to make _delay_us work --- Control/random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Control/random.c b/Control/random.c index 75c006d..c6ca1eb 100644 --- a/Control/random.c +++ b/Control/random.c @@ -1,3 +1,4 @@ +#include "common.h" #include "random.h" #include <util/delay.h> @@ -47,7 +48,7 @@ uint8_t rnd_get_byte(){ uint8_t rnd_get_bytes(uint8_t* buffer, uint8_t length){ RNG_DORT |= RNG_POWER_PIN; - _delay_us(10); + _delay_us(1); for (uint8_t i = 0; i < length; i++){ buffer[i] = rnd_get_byte(); -- GitLab