Fixed compile error raised after rand.c removal.
This commit is contained in:
parent
444a00949a
commit
33ccbbb509
|
@ -29,19 +29,23 @@
|
|||
*
|
||||
* This file is part of the Contiki OS
|
||||
*
|
||||
* $Id: rand.c,v 1.1 2010/10/25 09:03:38 salvopitru Exp $
|
||||
* $Id: rand.c,v 1.2 2010/10/26 10:47:23 salvopitru Exp $
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \file
|
||||
* Clock.
|
||||
* Random number functions for STM32W.
|
||||
* \author
|
||||
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "lib/rand.h"
|
||||
#include "dev/stm32w-radio.h"
|
||||
#include "lib/random.h"
|
||||
|
||||
#if (RANDOM_MAX != 0xffff)
|
||||
#warning "RANDOM_MAX is not defined as 65535."
|
||||
#endif
|
||||
|
||||
int rand(void)
|
||||
{
|
||||
|
@ -49,8 +53,6 @@ int rand(void)
|
|||
|
||||
ST_RadioGetRandomNumbers(&rand_num, 1);
|
||||
|
||||
rand_num &= RAND_MAX;
|
||||
|
||||
return (int)rand_num;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue