|
Contiki-Inga 3.x
|
Random number generator routines exploiting the cc2430 hardware
capabilities.
More...
Go to the source code of this file.
Functions | |
| unsigned short | random_rand (void) |
| Generates a new random number using the cc2430 RNG. More... | |
| void | random_init (unsigned short seed) |
| Seed the cc2430 random number generator. More... | |
Random number generator routines exploiting the cc2430 hardware
capabilities. This file overrides core/lib/random.c.
Definition in file random.c.
| void random_init | ( | unsigned short | seed | ) |
Seed the cc2430 random number generator.
Seed the cc253x random number generator.
| seed | Seed value for the RNG. If the SEED argument is 0, seed the RNG with IF_ADC as
discussed in the cc2430 datasheet (rev. 2.1), section 13.11.2.2,
page 134. Seeding with this method should not be done during
normal radio operation. Thus, use this function before
initialising the network.
If the SEED is provided, seed with this value instead. This will
result in the same sequence of random numbers each time the node
reboots. So, don't use it unless you have a reason (e.g. tests) |
Definition at line 73 of file random.c.
References cc2430_rf_command().
1.8.3.1