From 9a6ed79ad124c8a22f6833c2c4f9637661a5bbdb Mon Sep 17 00:00:00 2001 From: Alexandros Liarokapis Date: Mon, 27 May 2024 20:51:50 +0300 Subject: [PATCH] remove rx-only support for new spi versions with missing I2SCFGR register --- embassy-stm32/src/spi/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs index a3578dfde..d9b6f0003 100644 --- a/embassy-stm32/src/spi/mod.rs +++ b/embassy-stm32/src/spi/mod.rs @@ -508,7 +508,7 @@ impl<'d> Spi<'d, Async> { peri: impl Peripheral

+ 'd, sck: impl Peripheral

> + 'd, miso: impl Peripheral

> + 'd, - #[cfg(any(spi_v1, spi_f1))] tx_dma: impl Peripheral

> + 'd, + #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))] tx_dma: impl Peripheral

> + 'd, rx_dma: impl Peripheral

> + 'd, config: Config, ) -> Self { @@ -517,9 +517,9 @@ impl<'d> Spi<'d, Async> { new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()), None, new_pin!(miso, AFType::Input, Speed::VeryHigh), - #[cfg(any(spi_v1, spi_f1))] + #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))] new_dma!(tx_dma), - #[cfg(any(spi_v2, spi_v3, spi_v4, spi_v5))] + #[cfg(any(spi_v2, spi_v3))] None, new_dma!(rx_dma), config, @@ -626,7 +626,7 @@ impl<'d> Spi<'d, Async> { } /// SPI read, using DMA. - #[cfg(any(spi_v2, spi_v3, spi_v4, spi_v5))] + #[cfg(any(spi_v2, spi_v3))] pub async fn read(&mut self, data: &mut [W]) -> Result<(), Error> { if data.is_empty() { return Ok(()); @@ -723,7 +723,7 @@ impl<'d> Spi<'d, Async> { } /// SPI read, using DMA. - #[cfg(any(spi_v1, spi_f1))] + #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))] pub async fn read(&mut self, data: &mut [W]) -> Result<(), Error> { if data.is_empty() { return Ok(());