add dma is_running change doc
This commit is contained in:
parent
bf7e24e9d7
commit
daedfbbd87
@ -404,11 +404,9 @@ impl<'a, C: Channel> Transfer<'a, C> {
|
||||
}
|
||||
|
||||
pub fn is_running(&mut self) -> bool {
|
||||
//let ch = self.channel.regs().st(self.channel.num());
|
||||
//ch.cr().read().en()
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user