diff options
Diffstat (limited to 'spaghetti-monster/fsm-adc.c')
| -rw-r--r-- | spaghetti-monster/fsm-adc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c index 6e9f19b..2ec630c 100644 --- a/spaghetti-monster/fsm-adc.c +++ b/spaghetti-monster/fsm-adc.c @@ -109,6 +109,11 @@ ISR(ADC_vect) { uint16_t measurement = ADC; // latest 10-bit ADC reading + #ifdef USE_PSEUDO_RAND + // real-world entropy makes this a true random, not pseudo + pseudo_rand_seed += measurement; + #endif + adc_step = (adc_step + 1) & (ADC_STEPS-1); #ifdef USE_LVP |
