Closed ceekdee closed 1 year ago
This PR provides assistance to PR https://github.com/embassy-rs/lora-phy/pull/9.
I do not have a strong opinion on incorporating a RngCore implementation in lora-phy, as long as it uses the API (that is get_random_number). I do not believe that would be a semver breaking change; rather, an enhancement.
If you believe the functionality in this PR should be merged now and as-is, please indicate that in the approving review. I will then push a new release 1.1.0 (that is, an enhancement rather than a breaking change) to crates.io.
Based on a rng feature, support generation of a u32 random number if the LoRa board supports it.
The get_random_number function is added to the lora-phy API. Access to random number generation is only available through this function, in order to control LoRa board mode at the appropriate level.