remove unsafe for circular dma reg access

This commit is contained in:
JuliDi 2023-06-19 11:15:09 +02:00
parent 320e2cf35b
commit e0747e937f
No known key found for this signature in database
GPG Key ID: E1E90AE563D09D63

View File

@ -325,7 +325,7 @@ impl<'a, C: Channel> Transfer<'a, C> {
pub fn is_running(&mut self) -> bool {
let ch = self.channel.regs().ch(self.channel.num());
let en = ch.cr().read().en();
let circular = unsafe { ch.cr().read() }.circ() == vals::Circ::ENABLED;
let circular = ch.cr().read().circ() == vals::Circ::ENABLED;
let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0;
en && (circular || !tcif)
}