diff options
| author | Julian <[email protected]> | 2023-06-29 09:20:25 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-29 09:20:25 +0200 |
| commit | 96f1525ffe675b7e3ca26f038bc558488c03af9b (patch) | |
| tree | 2cda7813292b8a9aeae9a046ddafd5afe98e2c8f | |
| parent | d5898c11ebef63fa0ec6dba8381484f4cfabd65c (diff) | |
Revert changes to dma.rs
| -rw-r--r-- | embassy-stm32/src/dma/dma.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embassy-stm32/src/dma/dma.rs b/embassy-stm32/src/dma/dma.rs index 9c03599eb..8abe541d3 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> { | |||
| 405 | 405 | ||
| 406 | pub fn is_running(&mut self) -> bool { | 406 | pub fn is_running(&mut self) -> bool { |
| 407 | let ch = self.channel.regs().st(self.channel.num()); | 407 | let ch = self.channel.regs().st(self.channel.num()); |
| 408 | let en = ch.cr().read().en(); | 408 | ch.cr().read().en() |
| 409 | // Check if circular mode is enabled, if so it will still be running even if tcif == 1 | ||
| 410 | let circular = ch.cr().read().circ() == vals::Circ::ENABLED; | ||
| 411 | let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; | ||
| 412 | en && (circular || !tcif) | ||
| 413 | } | 409 | } |
| 414 | 410 | ||
| 415 | /// Gets the total remaining transfers for the channel | 411 | /// Gets the total remaining transfers for the channel |
