aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src
diff options
context:
space:
mode:
authorJuliDi <[email protected]>2023-10-02 09:33:10 +0200
committerJuliDi <[email protected]>2023-10-02 09:33:10 +0200
commitf3aa0cfe5a7ff98e2fc8a004ea8a2268112d54f3 (patch)
tree7a8b7ab7329741709f9a69e4fe807d6093860f94 /embassy-stm32/src
parent6ea5aa347db40a0f50b82ff9bc39f2f2c73fb04e (diff)
remove debug code, add some comments
Diffstat (limited to 'embassy-stm32/src')
-rw-r--r--embassy-stm32/src/qspi/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/src/qspi/mod.rs b/embassy-stm32/src/qspi/mod.rs
index 900dfa832..7d2ae579a 100644
--- a/embassy-stm32/src/qspi/mod.rs
+++ b/embassy-stm32/src/qspi/mod.rs
@@ -209,10 +209,6 @@ impl<'d, T: Instance, Dma> Qspi<'d, T, Dma> {
209 w.set_ckmode(true); 209 w.set_ckmode(true);
210 }); 210 });
211 211
212 // FOR TESTING ONLY
213 //T::REGS.ccr().write(|w| w.set_frcm(true));
214 // END FOR TESTING ONLY
215
216 Self { 212 Self {
217 _peri: peri, 213 _peri: peri,
218 sck, 214 sck,
@@ -260,8 +256,10 @@ impl<'d, T: Instance, Dma> Qspi<'d, T, Dma> {
260 } 256 }
261 257
262 pub fn blocking_write(&mut self, buf: &[u8], transaction: TransferConfig) { 258 pub fn blocking_write(&mut self, buf: &[u8], transaction: TransferConfig) {
259 // STM32H7 does not have dmaen
263 #[cfg(not(stm32h7))] 260 #[cfg(not(stm32h7))]
264 T::REGS.cr().modify(|v| v.set_dmaen(false)); 261 T::REGS.cr().modify(|v| v.set_dmaen(false));
262
265 self.setup_transaction(QspiMode::IndirectWrite, &transaction); 263 self.setup_transaction(QspiMode::IndirectWrite, &transaction);
266 264
267 if let Some(len) = transaction.data_len { 265 if let Some(len) = transaction.data_len {
@@ -304,6 +302,7 @@ impl<'d, T: Instance, Dma> Qspi<'d, T, Dma> {
304 ) 302 )
305 }; 303 };
306 304
305 // STM32H7 does not have dmaen
307 #[cfg(not(stm32h7))] 306 #[cfg(not(stm32h7))]
308 T::REGS.cr().modify(|v| v.set_dmaen(true)); 307 T::REGS.cr().modify(|v| v.set_dmaen(true));
309 308
@@ -331,6 +330,7 @@ impl<'d, T: Instance, Dma> Qspi<'d, T, Dma> {
331 ) 330 )
332 }; 331 };
333 332
333 // STM32H7 does not have dmaen
334 #[cfg(not(stm32h7))] 334 #[cfg(not(stm32h7))]
335 T::REGS.cr().modify(|v| v.set_dmaen(true)); 335 T::REGS.cr().modify(|v| v.set_dmaen(true));
336 336