Open wombatsoftwareguild opened 4 years ago
Actually nrf_sdh_is_enabled()
might be a better choice for checking which API to use.
Go for it :)
Just tried to create a tracking branch on git@github.com:jedisct1/libhydrogen.git but got permission denied. Odd, because at least briefly I though GitHub listed me as a collaborator.
Do you prefer a PR or emailed diffs?
=====
On Apr 15, 2020, at 3:45 PM, Frank Denis notifications@github.com wrote:
Go for it :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jedisct1/libhydrogen/issues/91#issuecomment-614316756, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH7BIGXYQKL36TKCINCWBDRMY2IHANCNFSM4MI4JZNA.
There are plenty of uses for libhydrogen on an nRF52 when the softdevice is not present or not enabled. There is a separate nRF5 SDK set of API calls for the random number generator when the softdevice APIs are not availaible. (I'm not sure if one can use these APIs when the softdevice is enabled -- it's tough to sort through the Nordic documentation.)
Request modifying impl/random.h to use the alternate random API if SOFTDEVICE_PRESENT or sd_softdevice_is_enabled() indicates the softdevice APIs are not available.