Skip to content

Commit 64af93e

Browse files
committed
alif/mpconfigport: Enable MICROPY_PY_RANDOM_SEED_INIT_FUNC.
Uses the SE services to provide a random seed. Signed-off-by: Damien George <damien@micropython.org>
1 parent c6cb082 commit 64af93e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ports/alif/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
#define MICROPY_PY_OS_SYNC (1)
9494
#define MICROPY_PY_OS_UNAME (1)
9595
#define MICROPY_PY_OS_URANDOM (1)
96+
#define MICROPY_PY_RANDOM_SEED_INIT_FUNC (se_services_rand64())
9697
#define MICROPY_PY_TIME (1)
9798
#define MICROPY_PY_MACHINE (1)
9899
#define MICROPY_PY_MACHINE_INCLUDEFILE "ports/alif/modmachine.c"
@@ -155,3 +156,6 @@ extern void panic(const char *);
155156
#ifndef MICROPY_BOARD_ENTER_BOOTLOADER
156157
#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs, args)
157158
#endif
159+
160+
// Needed for MICROPY_PY_RANDOM_SEED_INIT_FUNC.
161+
uint64_t se_services_rand64(void);

0 commit comments

Comments
 (0)