Contiki-NG
Files | Functions
Hardware random number generator

Files

file  random.c
 Wrapper around rand() using the hardware RNG for seeding.
 

Functions

unsigned short random_rand (void)
 Generates a new random number using the cc2538 RNG. More...
 
void random_init (unsigned short seed)
 Initialize the libc random number generator from the hardware RNG. More...
 

Detailed Description

Function Documentation

◆ random_init()

void random_init ( unsigned short  seed)

Initialize the libc random number generator from the hardware RNG.

Seed the cc2538 random number generator.

Parameters
seedIgnored.

Definition at line 62 of file random.c.

◆ random_rand()

unsigned short random_rand ( void  )

Generates a new random number using the cc2538 RNG.

Returns
The random number.

Generates a new random number using the cc2538 RNG.

Returns
The random number.

Generates a new random number using the cc2538 RNG.

Returns
a random number.

Definition at line 51 of file random.c.