diff options
| author | robert-hh <robert@hammelrath.com> | 2023-01-23 12:09:05 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-01-28 15:23:26 +1100 |
| commit | 0baf6c80d971b8d5c6b1d7b0648c0cb01cedc81d (patch) | |
| tree | b96228483d014771b0b9920fae9870769776f6b0 | |
| parent | be420bf9bbf8f8c9d73e2a3694a319c6b4e779ea (diff) | |
nrf/mpconfigport: Enable seeding of the PRNG by the hardware RNG.
A suitable function already existed, so just the declaration was needed.
| -rw-r--r-- | ports/nrf/mpconfigport.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 27dbd3b58..629ba5e94 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -277,6 +277,11 @@ typedef int mp_int_t; // must be pointer size typedef unsigned int mp_uint_t; // must be pointer size typedef long mp_off_t; +#if MICROPY_HW_ENABLE_RNG +#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rng_generate_random_word()) +long unsigned int rng_generate_random_word(void); +#endif + #if BOARD_SPECIFIC_MODULES #include "boardmodules.h" #endif // BOARD_SPECIFIC_MODULES |
