diff options
Diffstat (limited to 'examples/stm32f4/src/bin/sdmmc.rs')
-rw-r--r-- | examples/stm32f4/src/bin/sdmmc.rs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/examples/stm32f4/src/bin/sdmmc.rs b/examples/stm32f4/src/bin/sdmmc.rs index 46ac4450..301d7dda 100644 --- a/examples/stm32f4/src/bin/sdmmc.rs +++ b/examples/stm32f4/src/bin/sdmmc.rs @@ -13,28 +13,23 @@ use example_common::*; fn config() -> Config { let mut config = Config::default(); - config.rcc.hse = Some(8.mhz().into()); - config.rcc.hclk = Some(48.mhz().into()); - config.rcc.pclk2 = Some(48.mhz().into()); - config.rcc.pll48 = true; + config.rcc.sys_ck = Some(48.mhz().into()); config } #[embassy::main(config = "config()")] async fn main(_spawner: Spawner, p: Peripherals) -> ! { - info!("Hello World, dude!"); + info!("Hello World!"); let irq = interrupt::take!(SDIO); - let mut sdmmc = unsafe { - Sdmmc::new( - p.SDIO, - (p.PC12, p.PD2, p.PC8, p.PC9, p.PC10, p.PC11), - irq, - Default::default(), - p.DMA2_CH3, - ) - }; + let mut sdmmc = Sdmmc::new( + p.SDIO, + (p.PC12, p.PD2, p.PC8, p.PC9, p.PC10, p.PC11), + irq, + Default::default(), + p.DMA2_CH3, + ); info!("Configured clock: {}", sdmmc.clock.0); |