diff options
| author | JuliDi <[email protected]> | 2023-06-28 15:39:36 +0200 |
|---|---|---|
| committer | JuliDi <[email protected]> | 2023-06-28 15:39:36 +0200 |
| commit | daedfbbd8756e921cc6343ad531401d309966eaa (patch) | |
| tree | 53e82fbc46513134f2b4f629ccfb8d31f67e9773 | |
| parent | bf7e24e9d7abc5d31b75ef97418577920bd4600c (diff) | |
add dma is_running change doc
| -rw-r--r-- | embassy-stm32/src/dma/dma.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/embassy-stm32/src/dma/dma.rs b/embassy-stm32/src/dma/dma.rs index 0b7b60789..9c03599eb 100644 --- a/embassy-stm32/src/dma/dma.rs +++ b/embassy-stm32/src/dma/dma.rs | |||
| @@ -404,11 +404,9 @@ impl<'a, C: Channel> Transfer<'a, C> { | |||
| 404 | } | 404 | } |
| 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()); | ||
| 408 | //ch.cr().read().en() | ||
| 409 | |||
| 410 | let ch = self.channel.regs().st(self.channel.num()); | 407 | let ch = self.channel.regs().st(self.channel.num()); |
| 411 | let en = ch.cr().read().en(); | 408 | let en = ch.cr().read().en(); |
| 409 | // Check if circular mode is enabled, if so it will still be running even if tcif == 1 | ||
| 412 | let circular = ch.cr().read().circ() == vals::Circ::ENABLED; | 410 | let circular = ch.cr().read().circ() == vals::Circ::ENABLED; |
| 413 | let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; | 411 | let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; |
| 414 | en && (circular || !tcif) | 412 | en && (circular || !tcif) |
