Changed to work with: http://redbearlab.com/blenano/

Dependents:   Garagem

Fork of RNG by Francois Berder

Revision:
1:0536a4ca8d35
Parent:
0:299f3795114b
Child:
2:2eb90943983b
--- a/Random.cpp	Tue Sep 17 11:30:29 2013 +0000
+++ b/Random.cpp	Tue Sep 17 12:35:12 2013 +0000
@@ -2,6 +2,7 @@
 #include "Crypto.h"
 
 Random::Random():
+e(p19),
 f(p20)
 {
     AnalogIn a(p15), b(p16), c(p17), d(p18);
@@ -30,7 +31,7 @@
     MD5::computeHash(hash, pool, 16);
     uint8_t tmp = pool[hash[6]%16];
     memcpy(pool, hash, 16);
-    
+    pool[0] ^= (e.read_u16() & 0xff);
     return tmp ^ (f.read_u16() & 0xff);
 }