diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index a8e89c840..d7792c1d7 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -483,7 +483,7 @@ fn main() { (("i2c", "TX"), quote!(crate::i2c::TxDma)), (("dcmi", "DCMI"), quote!(crate::dcmi::FrameDma)), (("dcmi", "PSSI"), quote!(crate::dcmi::FrameDma)), - (("sdmmc", "SDIO"), quote!(crate::sdmmc::SdioDma)), + (("sdmmc", "SDIO"), quote!(crate::sdmmc::SdmmcDma)), ] .into(); diff --git a/embassy-stm32/src/sdmmc/mod.rs b/embassy-stm32/src/sdmmc/mod.rs index 60060c79e..b060eb93b 100644 --- a/embassy-stm32/src/sdmmc/mod.rs +++ b/embassy-stm32/src/sdmmc/mod.rs @@ -192,7 +192,7 @@ pub struct Sdmmc<'d, T: Instance, P: Pins, Dma = NoDma> { } #[cfg(sdmmc_v1)] -impl<'d, T: Instance, P: Pins, Dma: SdioDma> Sdmmc<'d, T, P, Dma> { +impl<'d, T: Instance, P: Pins, Dma: SdmmcDma> Sdmmc<'d, T, P, Dma> { pub fn new( _peripheral: impl Unborrow + 'd, pins: impl Unborrow + 'd, @@ -262,7 +262,7 @@ impl<'d, T: Instance, P: Pins> Sdmmc<'d, T, P, NoDma> { } } -impl<'d, T: Instance, P: Pins, Dma: SdioDma> Sdmmc<'d, T, P, Dma> { +impl<'d, T: Instance, P: Pins, Dma: SdmmcDma> Sdmmc<'d, T, P, Dma> { #[inline(always)] pub async fn init_card(&mut self, freq: impl Into) -> Result<(), Error> { let inner = T::inner(); @@ -390,7 +390,7 @@ impl SdmmcInner { /// Initializes card (if present) and sets the bus at the /// specified frequency. #[allow(clippy::too_many_arguments)] - async fn init_card>( + async fn init_card>( &self, freq: Hertz, bus_width: BusWidth, @@ -537,7 +537,7 @@ impl SdmmcInner { Ok(()) } - async fn read_block>( + async fn read_block>( &self, block_idx: u32, buffer: &mut [u32; 128], @@ -592,7 +592,7 @@ impl SdmmcInner { res } - async fn write_block>( + async fn write_block>( &self, block_idx: u32, buffer: &[u32; 128], @@ -716,7 +716,7 @@ impl SdmmcInner { /// # Safety /// /// `buffer` must be valid for the whole transfer and word aligned - unsafe fn prepare_datapath_read>( + unsafe fn prepare_datapath_read>( &self, buffer: *mut [u32], length_bytes: u32, @@ -765,7 +765,7 @@ impl SdmmcInner { /// # Safety /// /// `buffer` must be valid for the whole transfer and word aligned - unsafe fn prepare_datapath_write>( + unsafe fn prepare_datapath_write>( &self, buffer: *const [u32], length_bytes: u32, @@ -855,7 +855,7 @@ impl SdmmcInner { /// Attempt to set a new signalling mode. The selected /// signalling mode is returned. Expects the current clock /// frequency to be > 12.5MHz. - async fn switch_signalling_mode>( + async fn switch_signalling_mode>( &self, signalling: Signalling, waker_reg: &AtomicWaker, @@ -952,7 +952,7 @@ impl SdmmcInner { } /// Reads the SD Status (ACMD13) - async fn read_sd_status>( + async fn read_sd_status>( &self, card: &mut Card, waker_reg: &AtomicWaker, @@ -1076,7 +1076,7 @@ impl SdmmcInner { } } - async fn get_scr>( + async fn get_scr>( &self, card: &mut Card, waker_reg: &AtomicWaker, @@ -1336,11 +1336,11 @@ pin_trait!(D7Pin, Instance); cfg_if::cfg_if! { if #[cfg(sdmmc_v1)] { - dma_trait!(SdioDma, Instance); + dma_trait!(SdmmcDma, Instance); } else if #[cfg(sdmmc_v2)] { // SDMMCv2 uses internal DMA - pub trait SdioDma {} - impl SdioDma for NoDma {} + pub trait SdmmcDma {} + impl SdmmcDma for NoDma {} } }