diff options
Diffstat (limited to 'examples/stm32l4/src/bin/rng.rs')
-rw-r--r-- | examples/stm32l4/src/bin/rng.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32l4/src/bin/rng.rs b/examples/stm32l4/src/bin/rng.rs index ed47fc6c..d0e1306a 100644 --- a/examples/stm32l4/src/bin/rng.rs +++ b/examples/stm32l4/src/bin/rng.rs @@ -6,7 +6,7 @@ use defmt::*; use embassy_executor::executor::Spawner; use embassy_stm32::rcc::{ClockSrc, PLLClkDiv, PLLMul, PLLSource, PLLSrcDiv}; use embassy_stm32::rng::Rng; -use embassy_stm32::{Config, Peripherals}; +use embassy_stm32::Config; use {defmt_rtt as _, panic_probe as _}; fn config() -> Config { @@ -22,8 +22,9 @@ fn config() -> Config { config } -#[embassy_executor::main(config = "config()")] -async fn main(_spawner: Spawner, p: Peripherals) { +#[embassy_executor::main] +async fn main(_spawner: Spawner) { + let p = embassy_stm32::init(config()); info!("Hello World!"); let mut rng = Rng::new(p.RNG); |