WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
rand.h File Reference

Go to the source code of this file.

Functions

uint16_t RAND_adcRand16 (void)
 generate a random 16-bit value by sampling b0 of the temperature sensor. More...
 

Detailed Description

Interface to the random number generation module

Author
Aaron Parks, Justin Reina

Function Documentation

◆ RAND_adcRand16()

uint16_t RAND_adcRand16 ( void  )

generate a random 16-bit value by sampling b0 of the temperature sensor.

rand.c

Random number generator using noisy LSb from the ADC12

Author
Aaron Parks, Justin Reina adc12_genRN16 (void) Use the 10-bit ADC in repeat-single-sample mode to read the ADC 16 times, keeping each samples' b0 and assembling a full word from them at the end. Use the WISPs recently acquired ADC_clk setting, just cause its available.
Returns
(int16_t) a random 16 bit value.