diff options
| author | JuliDi <[email protected]> | 2023-06-19 11:15:09 +0200 |
|---|---|---|
| committer | JuliDi <[email protected]> | 2023-06-19 11:15:09 +0200 |
| commit | e0747e937f06ed280594e17c97d19784410b6e85 (patch) | |
| tree | e1e473447141baae9ce801dd8430a60403981f84 /embassy-stm32 | |
| parent | 320e2cf35be090808174faacb0fb729092e3c4bd (diff) | |
remove unsafe for circular dma reg access
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/src/dma/bdma.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/dma/bdma.rs b/embassy-stm32/src/dma/bdma.rs index be4571440..3d315e20b 100644 --- a/embassy-stm32/src/dma/bdma.rs +++ b/embassy-stm32/src/dma/bdma.rs | |||
| @@ -325,7 +325,7 @@ impl<'a, C: Channel> Transfer<'a, C> { | |||
| 325 | pub fn is_running(&mut self) -> bool { | 325 | pub fn is_running(&mut self) -> bool { |
| 326 | let ch = self.channel.regs().ch(self.channel.num()); | 326 | let ch = self.channel.regs().ch(self.channel.num()); |
| 327 | let en = ch.cr().read().en(); | 327 | let en = ch.cr().read().en(); |
| 328 | let circular = unsafe { ch.cr().read() }.circ() == vals::Circ::ENABLED; | 328 | let circular = ch.cr().read().circ() == vals::Circ::ENABLED; |
| 329 | let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; | 329 | let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0; |
| 330 | en && (circular || !tcif) | 330 | en && (circular || !tcif) |
| 331 | } | 331 | } |
