aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf52840/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-05-18 20:32:48 +0200
committerDario Nieuwenhuis <[email protected]>2025-05-18 20:35:36 +0200
commite4fc48764491f8981e4a145a72e9b6e72df8c546 (patch)
treecac023f3457123f2fbc7686f2f90414987eae264 /examples/nrf52840/src
parente8b1ea14c7fb151aa5e296ca8f9724f175bdeaef (diff)
Add rand-core v0.9 support.
Co-Authored-By: AurĂ©lien Jacobs <[email protected]>
Diffstat (limited to 'examples/nrf52840/src')
-rwxr-xr-x[-rw-r--r--]examples/nrf52840/src/bin/rng.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/nrf52840/src/bin/rng.rs b/examples/nrf52840/src/bin/rng.rs
index 326054c9a..f32d17cd9 100644..100755
--- a/examples/nrf52840/src/bin/rng.rs
+++ b/examples/nrf52840/src/bin/rng.rs
@@ -22,7 +22,7 @@ async fn main(_spawner: Spawner) {
22 defmt::info!("Some random bytes: {:?}", bytes); 22 defmt::info!("Some random bytes: {:?}", bytes);
23 23
24 // Sync API with `rand` 24 // Sync API with `rand`
25 defmt::info!("A random number from 1 to 10: {:?}", rng.gen_range(1..=10)); 25 defmt::info!("A random number from 1 to 10: {:?}", rng.random_range(1..=10));
26 26
27 let mut bytes = [0; 1024]; 27 let mut bytes = [0; 1024];
28 rng.fill_bytes(&mut bytes).await; 28 rng.fill_bytes(&mut bytes).await;