[riot-notifications] [RIOT-OS/RIOT] sys/random/fortune: change interval ressed to ms (#16594)

Leandro Lanzieri notifications at github.com
Thu Sep 9 13:02:18 CEST 2021


@leandrolanzieri commented on this pull request.



>      select MODULE_FORTUNA
     select MODULE_CRYPTO
     select MODULE_CRYPTO_AES_128
 
+if MODULE_PRNG_FORTUNA
+
+config MODULE_FORTUNA_RESEED
+    bool "Reseed prng according to FORTUNA_RESEED_INTERVAL_MS"
+    select XTIMER

```suggestion
    select MODULE_XTIMER
```

> +#if IS_USED(MODULE_ZTIMER_MSEC)
+    ztimer_set(ZTIMER_MSEC, &state->reseed_timer, FORTUNA_RESEED_INTERVAL_MS);
+#else
+    xtimer_set(&state->reseed_timer, FORTUNA_RESEED_INTERVAL_MS * US_PER_MS);
+#endif

Maybe refactor to its own function?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16594#pullrequestreview-733808193
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210909/cf583bac/attachment.htm>


More information about the notifications mailing list