diff options
| author | Glenn Ruben Bakke | 2018-04-10 20:46:28 +0200 |
|---|---|---|
| committer | Damien George | 2018-07-18 17:12:26 +1000 |
| commit | 0f7da42c75b6734e6925ebc53cb933605cbe5f92 (patch) | |
| tree | dbc001f1de454cb4a8078e15c4f67b93b1e91e18 /ports/nrf/mpconfigport.h | |
| parent | f4382a2885286919a7f4d82615677ef676352b0e (diff) | |
nrf/modules/random: Rename port config for RNG
Renaming config for enabling random module with hw
random number generator from MICROPY_PY_HW_RNG to
MICROPY_PY_RANDOM_HW_RNG to indicate which module it
is configuring.
Also, disabling the config by default in mpconfigport.h.
Adding the enable of RNG in all board configs.
Moving ifdef in modrandom, which test for the config being
set, earlier in the code. This is to prevent un-necessary
includes if not needed.
Diffstat (limited to 'ports/nrf/mpconfigport.h')
| -rw-r--r-- | ports/nrf/mpconfigport.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 3de4107a8..a0cc5a9d3 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -169,8 +169,8 @@ #define MICROPY_PY_MACHINE_RTCOUNTER (0) #endif -#ifndef MICROPY_PY_HW_RNG -#define MICROPY_PY_HW_RNG (1) +#ifndef MICROPY_PY_RANDOM_HW_RNG +#define MICROPY_PY_RANDOM_HW_RNG (0) #endif @@ -227,8 +227,8 @@ extern const struct _mp_obj_module_t random_module; #define MUSIC_MODULE #endif -#if MICROPY_PY_HW_RNG -#define RANDOM_MODULE { MP_ROM_QSTR(MP_QSTR_random), MP_ROM_PTR(&random_module) }, +#if MICROPY_PY_RANDOM_HW_RNG +#define RANDOM_MODULE { MP_ROM_QSTR(MP_QSTR_random), MP_ROM_PTR(&random_module) }, #else #define RANDOM_MODULE #endif |
