diff options
| author | Alexandros Liarokapis <[email protected]> | 2024-05-27 20:51:50 +0300 |
|---|---|---|
| committer | Alexandros Liarokapis <[email protected]> | 2024-05-27 20:51:50 +0300 |
| commit | 9a6ed79ad124c8a22f6833c2c4f9637661a5bbdb (patch) | |
| tree | de2aeb0b6a10a69e223acef15d6ea12b9d31070a /embassy-stm32/src/spi | |
| parent | 1d05015a1c6b79d9cf7f93d16718508f3f80fc7e (diff) | |
remove rx-only support for new spi versions with missing I2SCFGR register
Diffstat (limited to 'embassy-stm32/src/spi')
| -rw-r--r-- | embassy-stm32/src/spi/mod.rs | 10 |
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(()); |
