use the hardware random number generator

This commit is contained in:
maralvira 2010-11-07 13:52:12 +00:00
parent 26725e7c19
commit 646a37f8b3
1 changed files with 10 additions and 1 deletions

View File

@ -30,13 +30,22 @@
* *
* This file is part of the Contiki OS. * This file is part of the Contiki OS.
* *
* $Id: contiki-misc.c,v 1.1 2010/06/09 14:43:22 maralvira Exp $ * $Id: contiki-misc.c,v 1.2 2010/11/07 13:52:12 maralvira Exp $
*/ */
#include <stdio.h> #include <stdio.h>
#include "contiki.h" #include "contiki.h"
#include "mc1322x.h"
int raise(void) int raise(void)
{ {
return 0; return 0;
} }
void srand(unsigned int seed) {
*MACA_RANDOM = seed;
}
int rand(void) {
return (int)*MACA_RANDOM;
}