aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/spi/mod.rs10
1 files 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> {
508 peri: impl Peripheral<P = T> + 'd, 508 peri: impl Peripheral<P = T> + 'd,
509 sck: impl Peripheral<P = impl SckPin<T>> + 'd, 509 sck: impl Peripheral<P = impl SckPin<T>> + 'd,
510 miso: impl Peripheral<P = impl MisoPin<T>> + 'd, 510 miso: impl Peripheral<P = impl MisoPin<T>> + 'd,
511 #[cfg(any(spi_v1, spi_f1))] tx_dma: impl Peripheral<P = impl TxDma<T>> + 'd, 511 #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))] tx_dma: impl Peripheral<P = impl TxDma<T>> + 'd,
512 rx_dma: impl Peripheral<P = impl RxDma<T>> + 'd, 512 rx_dma: impl Peripheral<P = impl RxDma<T>> + 'd,
513 config: Config, 513 config: Config,
514 ) -> Self { 514 ) -> Self {
@@ -517,9 +517,9 @@ impl<'d> Spi<'d, Async> {
517 new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()), 517 new_pin!(sck, AFType::OutputPushPull, Speed::VeryHigh, config.sck_pull_mode()),
518 None, 518 None,
519 new_pin!(miso, AFType::Input, Speed::VeryHigh), 519 new_pin!(miso, AFType::Input, Speed::VeryHigh),
520 #[cfg(any(spi_v1, spi_f1))] 520 #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))]
521 new_dma!(tx_dma), 521 new_dma!(tx_dma),
522 #[cfg(any(spi_v2, spi_v3, spi_v4, spi_v5))] 522 #[cfg(any(spi_v2, spi_v3))]
523 None, 523 None,
524 new_dma!(rx_dma), 524 new_dma!(rx_dma),
525 config, 525 config,
@@ -626,7 +626,7 @@ impl<'d> Spi<'d, Async> {
626 } 626 }
627 627
628 /// SPI read, using DMA. 628 /// SPI read, using DMA.
629 #[cfg(any(spi_v2, spi_v3, spi_v4, spi_v5))] 629 #[cfg(any(spi_v2, spi_v3))]
630 pub async fn read<W: Word>(&mut self, data: &mut [W]) -> Result<(), Error> { 630 pub async fn read<W: Word>(&mut self, data: &mut [W]) -> Result<(), Error> {
631 if data.is_empty() { 631 if data.is_empty() {
632 return Ok(()); 632 return Ok(());
@@ -723,7 +723,7 @@ impl<'d> Spi<'d, Async> {
723 } 723 }
724 724
725 /// SPI read, using DMA. 725 /// SPI read, using DMA.
726 #[cfg(any(spi_v1, spi_f1))] 726 #[cfg(any(spi_v1, spi_f1, spi_v4, spi_v5))]
727 pub async fn read<W: Word>(&mut self, data: &mut [W]) -> Result<(), Error> { 727 pub async fn read<W: Word>(&mut self, data: &mut [W]) -> Result<(), Error> {
728 if data.is_empty() { 728 if data.is_empty() {
729 return Ok(()); 729 return Ok(());