examples/rp: update sdmmc.

This commit is contained in:
Dario Nieuwenhuis 2024-12-03 00:31:36 +01:00
parent dcf228e448
commit 0138bc5dd8

View File

@ -7,7 +7,6 @@
#![no_main] #![no_main]
use defmt::*; use defmt::*;
use embassy_embedded_hal::SetConfig;
use embassy_executor::Spawner; use embassy_executor::Spawner;
use embassy_rp::spi::Spi; use embassy_rp::spi::Spi;
use embassy_rp::{gpio, spi}; use embassy_rp::{gpio, spi};
@ -51,7 +50,7 @@ async fn main(_spawner: Spawner) {
// Now that the card is initialized, the SPI clock can go faster // Now that the card is initialized, the SPI clock can go faster
let mut config = spi::Config::default(); let mut config = spi::Config::default();
config.frequency = 16_000_000; config.frequency = 16_000_000;
sdcard.spi(|dev| dev.bus_mut().set_config(&config)).ok(); sdcard.spi(|dev| dev.bus_mut().set_config(&config));
// Now let's look for volumes (also known as partitions) on our block device. // Now let's look for volumes (also known as partitions) on our block device.
// To do this we need a Volume Manager. It will take ownership of the block device. // To do this we need a Volume Manager. It will take ownership of the block device.