Skip to content

Commit

Permalink
random: nrf53's RNG works differently, replacing nrf with nrf51|nrf52
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Apr 12, 2024
1 parent 9033721 commit fd4c83c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion laze-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ modules:
# these are precisely those for which the hwrng feature of
# riot-rs-embassy builds, which would fail if the big if(context=...)
# doesn't have an entry in the cfg(feature = "hwrng") part of init_task
- nrf
- nrf51
- nrf52
env:
global:
FEATURES:
Expand Down
4 changes: 3 additions & 1 deletion src/riot-rs-embassy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ async fn init_task(mut peripherals: arch::OptionalPeripherals) {

#[cfg(feature = "hwrng")]
{
#[cfg(context = "nrf")]
// The union of all contexts that wind up in a construct_rng should be synchronized with
// laze-project.yml's hwrng module.
#[cfg(any(context = "nrf51", context = "nrf52"))]
let rng = embassy_nrf::rng::Rng::new(
peripherals
.RNG
Expand Down

0 comments on commit fd4c83c

Please sign in to comment.