diff options
| author | Grant Miller <[email protected]> | 2022-03-14 15:22:52 -0500 |
|---|---|---|
| committer | Grant Miller <[email protected]> | 2022-03-14 15:56:08 -0500 |
| commit | 406b1b3dd2c076d4eef3b77028dc6ff6575d7802 (patch) | |
| tree | ce737d27f842de1e32851b2b306544740437c579 | |
| parent | 7cd6f00a902d719a463463d7766f70dd7b5f295b (diff) | |
Finish matching versions
| -rw-r--r-- | embassy-stm32/src/spi/v1.rs | 12 | ||||
| -rw-r--r-- | embassy-stm32/src/spi/v2.rs | 12 | ||||
| -rw-r--r-- | embassy-stm32/src/spi/v3.rs | 3 |
3 files changed, 27 insertions, 0 deletions
diff --git a/embassy-stm32/src/spi/v1.rs b/embassy-stm32/src/spi/v1.rs index 853f639ad..9c9674fd8 100644 --- a/embassy-stm32/src/spi/v1.rs +++ b/embassy-stm32/src/spi/v1.rs | |||
| @@ -31,6 +31,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 31 | T::regs().cr1().modify(|w| { | 31 | T::regs().cr1().modify(|w| { |
| 32 | w.set_spe(true); | 32 | w.set_spe(true); |
| 33 | }); | 33 | }); |
| 34 | #[cfg(spi_v3)] | ||
| 35 | T::regs().cr1().modify(|w| { | ||
| 36 | w.set_cstart(true); | ||
| 37 | }); | ||
| 34 | } | 38 | } |
| 35 | 39 | ||
| 36 | tx_f.await; | 40 | tx_f.await; |
| @@ -76,6 +80,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 76 | T::regs().cr1().modify(|w| { | 80 | T::regs().cr1().modify(|w| { |
| 77 | w.set_spe(true); | 81 | w.set_spe(true); |
| 78 | }); | 82 | }); |
| 83 | #[cfg(spi_v3)] | ||
| 84 | T::regs().cr1().modify(|w| { | ||
| 85 | w.set_cstart(true); | ||
| 86 | }); | ||
| 79 | } | 87 | } |
| 80 | 88 | ||
| 81 | join(tx_f, rx_f).await; | 89 | join(tx_f, rx_f).await; |
| @@ -125,6 +133,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 125 | T::regs().cr1().modify(|w| { | 133 | T::regs().cr1().modify(|w| { |
| 126 | w.set_spe(true); | 134 | w.set_spe(true); |
| 127 | }); | 135 | }); |
| 136 | #[cfg(spi_v3)] | ||
| 137 | T::regs().cr1().modify(|w| { | ||
| 138 | w.set_cstart(true); | ||
| 139 | }); | ||
| 128 | } | 140 | } |
| 129 | 141 | ||
| 130 | join(tx_f, rx_f).await; | 142 | join(tx_f, rx_f).await; |
diff --git a/embassy-stm32/src/spi/v2.rs b/embassy-stm32/src/spi/v2.rs index 853f639ad..9c9674fd8 100644 --- a/embassy-stm32/src/spi/v2.rs +++ b/embassy-stm32/src/spi/v2.rs | |||
| @@ -31,6 +31,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 31 | T::regs().cr1().modify(|w| { | 31 | T::regs().cr1().modify(|w| { |
| 32 | w.set_spe(true); | 32 | w.set_spe(true); |
| 33 | }); | 33 | }); |
| 34 | #[cfg(spi_v3)] | ||
| 35 | T::regs().cr1().modify(|w| { | ||
| 36 | w.set_cstart(true); | ||
| 37 | }); | ||
| 34 | } | 38 | } |
| 35 | 39 | ||
| 36 | tx_f.await; | 40 | tx_f.await; |
| @@ -76,6 +80,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 76 | T::regs().cr1().modify(|w| { | 80 | T::regs().cr1().modify(|w| { |
| 77 | w.set_spe(true); | 81 | w.set_spe(true); |
| 78 | }); | 82 | }); |
| 83 | #[cfg(spi_v3)] | ||
| 84 | T::regs().cr1().modify(|w| { | ||
| 85 | w.set_cstart(true); | ||
| 86 | }); | ||
| 79 | } | 87 | } |
| 80 | 88 | ||
| 81 | join(tx_f, rx_f).await; | 89 | join(tx_f, rx_f).await; |
| @@ -125,6 +133,10 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 125 | T::regs().cr1().modify(|w| { | 133 | T::regs().cr1().modify(|w| { |
| 126 | w.set_spe(true); | 134 | w.set_spe(true); |
| 127 | }); | 135 | }); |
| 136 | #[cfg(spi_v3)] | ||
| 137 | T::regs().cr1().modify(|w| { | ||
| 138 | w.set_cstart(true); | ||
| 139 | }); | ||
| 128 | } | 140 | } |
| 129 | 141 | ||
| 130 | join(tx_f, rx_f).await; | 142 | join(tx_f, rx_f).await; |
diff --git a/embassy-stm32/src/spi/v3.rs b/embassy-stm32/src/spi/v3.rs index 5a19355f9..9c9674fd8 100644 --- a/embassy-stm32/src/spi/v3.rs +++ b/embassy-stm32/src/spi/v3.rs | |||
| @@ -31,6 +31,7 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 31 | T::regs().cr1().modify(|w| { | 31 | T::regs().cr1().modify(|w| { |
| 32 | w.set_spe(true); | 32 | w.set_spe(true); |
| 33 | }); | 33 | }); |
| 34 | #[cfg(spi_v3)] | ||
| 34 | T::regs().cr1().modify(|w| { | 35 | T::regs().cr1().modify(|w| { |
| 35 | w.set_cstart(true); | 36 | w.set_cstart(true); |
| 36 | }); | 37 | }); |
| @@ -79,6 +80,7 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 79 | T::regs().cr1().modify(|w| { | 80 | T::regs().cr1().modify(|w| { |
| 80 | w.set_spe(true); | 81 | w.set_spe(true); |
| 81 | }); | 82 | }); |
| 83 | #[cfg(spi_v3)] | ||
| 82 | T::regs().cr1().modify(|w| { | 84 | T::regs().cr1().modify(|w| { |
| 83 | w.set_cstart(true); | 85 | w.set_cstart(true); |
| 84 | }); | 86 | }); |
| @@ -131,6 +133,7 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> { | |||
| 131 | T::regs().cr1().modify(|w| { | 133 | T::regs().cr1().modify(|w| { |
| 132 | w.set_spe(true); | 134 | w.set_spe(true); |
| 133 | }); | 135 | }); |
| 136 | #[cfg(spi_v3)] | ||
| 134 | T::regs().cr1().modify(|w| { | 137 | T::regs().cr1().modify(|w| { |
| 135 | w.set_cstart(true); | 138 | w.set_cstart(true); |
| 136 | }); | 139 | }); |
