esp8266: Implement os.urandom function.

Uses what is suspected to be a hardware random number generator.
This commit is contained in:
Damien George
2016-03-29 10:29:57 +03:00
committed by Paul Sokolovsky
parent b4070ee8a4
commit 6ca17c1922
2 changed files with 16 additions and 0 deletions

View File

@@ -3,6 +3,9 @@
#include <os_type.h>
// see http://esp8266-re.foogod.com/wiki/Random_Number_Generator
#define WDEV_HWRNG ((volatile uint32_t*)0x3ff20e44)
void ets_delay_us();
void ets_intr_lock(void);
void ets_intr_unlock(void);