Wixel SDK
Main Page
Modules
Data Structures
Files
File List
Globals
src
random
random_from_sernum.c
Go to the documentation of this file.
1
5
#include <
cc2511_map.h
>
6
#include <
random.h
>
7
#include <
board.h
>
8
9
void
randomSeedFromSerialNumber
(
void
)
10
{
11
// The random number generator only has 16 bits of state, while the
12
// serial number is 32 bits. No matter what we do here, there will be
13
// a 1-in-2^16 chance that two Wixels with different serial numbers
14
// start up with their random number generators in the same state.
15
// So there is no point in reading all 4 bytes of the serial number.
16
17
randomSeed(
serialNumber
[0],
serialNumber
[1]);
18
}
randomSeedFromSerialNumber
void randomSeedFromSerialNumber(void)
Definition:
random_from_sernum.c:9
serialNumber
uint8 CODE serialNumber[4]
random.h
cc2511_map.h
board.h
Generated on Mon Sep 28 2015 11:52:10 for Wixel SDK by
1.8.10