From 96f1525ffe675b7e3ca26f038bc558488c03af9b Mon Sep 17 00:00:00 2001 From: Julian <20155974+JuliDi@users.noreply.github.com> Date: Thu, 29 Jun 2023 09:20:25 +0200 Subject: [PATCH] Revert changes to dma.rs --- embassy-stm32/src/dma/dma.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/embassy-stm32/src/dma/dma.rs b/embassy-stm32/src/dma/dma.rs index 9c03599e..8abe541d 100644 --- a/embassy-stm32/src/dma/dma.rs +++ b/embassy-stm32/src/dma/dma.rs @@ -405,11 +405,7 @@ impl<'a, C: Channel> Transfer<'a, C> { pub fn is_running(&mut self) -> bool { let ch = self.channel.regs().st(self.channel.num()); - let en = ch.cr().read().en(); - // Check if circular mode is enabled, if so it will still be running even if tcif == 1 - let circular = ch.cr().read().circ() == vals::Circ::ENABLED; - let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; - en && (circular || !tcif) + ch.cr().read().en() } /// Gets the total remaining transfers for the channel