Wixel SDK
|
Go to the source code of this file.
Functions | |
void | randomSeedFromAdc (void) |
See random.h for more information.
Definition in file random_from_adc.c.
void randomSeedFromAdc | ( | void | ) |
Uses two noisy ADC readings (of the internal temperature sensor) to initialize the state of the random number generator. This function throws away all of the previous state of the random number generator. You will generally want to call this function once at the beginning of your program.
Side effects: This function changes ADCL, ADCH, ADCCON3, and ADCIF in order to use the extra conversion feature of the ADC. This may make it incompatible with other code that uses the ADC.
Definition at line 17 of file random_from_adc.c.