Skip to content
Snippets Groups Projects
Commit 0e2c1e47 authored by da1l6's avatar da1l6
Browse files

Control: include "common.h" in random.c for F_CPU to make _delay_us work

parent 8ba5fe4b
No related branches found
No related tags found
No related merge requests found
#include "common.h"
#include "random.h" #include "random.h"
#include <util/delay.h> #include <util/delay.h>
...@@ -47,7 +48,7 @@ uint8_t rnd_get_byte(){ ...@@ -47,7 +48,7 @@ uint8_t rnd_get_byte(){
uint8_t rnd_get_bytes(uint8_t* buffer, uint8_t length){ uint8_t rnd_get_bytes(uint8_t* buffer, uint8_t length){
RNG_DORT |= RNG_POWER_PIN; RNG_DORT |= RNG_POWER_PIN;
_delay_us(10); _delay_us(1);
for (uint8_t i = 0; i < length; i++){ for (uint8_t i = 0; i < length; i++){
buffer[i] = rnd_get_byte(); buffer[i] = rnd_get_byte();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment