embassy-rs / lora-phy

REPO ARCHIVED - moved to https://github.com/lora-rs/lora-rs -- LoRa implementation based on embedded-hal-async
Apache License 2.0
23 stars 15 forks source link

Support RNG operations #10

Closed ceekdee closed 1 year ago

ceekdee commented 1 year ago

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.

ceekdee commented 1 year ago

This PR provides assistance to PR https://github.com/embassy-rs/lora-phy/pull/9.

ceekdee commented 1 year ago

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.