match up with metapac change
This commit is contained in:
parent
08e9a4d84a
commit
254d587385
@ -303,20 +303,14 @@ impl<'a, C: Channel> Transfer<'a, C> {
|
||||
ch.cr().write(|w| {
|
||||
w.set_psize(data_size.into());
|
||||
w.set_msize(data_size.into());
|
||||
if incr_mem {
|
||||
w.set_minc(vals::Inc::ENABLED);
|
||||
} else {
|
||||
w.set_minc(vals::Inc::DISABLED);
|
||||
}
|
||||
w.set_minc(incr_mem);
|
||||
w.set_dir(dir.into());
|
||||
w.set_teie(true);
|
||||
w.set_tcie(options.complete_transfer_ir);
|
||||
w.set_htie(options.half_transfer_ir);
|
||||
w.set_circ(options.circular);
|
||||
if options.circular {
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
debug!("Setting circular mode");
|
||||
} else {
|
||||
w.set_circ(vals::Circ::DISABLED);
|
||||
}
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_en(true);
|
||||
@ -352,7 +346,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 = ch.cr().read().circ() == vals::Circ::ENABLED;
|
||||
let circular = ch.cr().read().circ();
|
||||
let tcif = STATE.complete_count[self.channel.index()].load(Ordering::Acquire) != 0;
|
||||
en && (circular || !tcif)
|
||||
}
|
||||
@ -467,12 +461,12 @@ impl<'a, C: Channel, W: Word> ReadableRingBuffer<'a, C, W> {
|
||||
let mut w = regs::Cr(0);
|
||||
w.set_psize(data_size.into());
|
||||
w.set_msize(data_size.into());
|
||||
w.set_minc(vals::Inc::ENABLED);
|
||||
w.set_minc(true);
|
||||
w.set_dir(dir.into());
|
||||
w.set_teie(true);
|
||||
w.set_htie(true);
|
||||
w.set_tcie(true);
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
w.set_circ(true);
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_en(true);
|
||||
|
||||
@ -625,12 +619,12 @@ impl<'a, C: Channel, W: Word> WritableRingBuffer<'a, C, W> {
|
||||
let mut w = regs::Cr(0);
|
||||
w.set_psize(data_size.into());
|
||||
w.set_msize(data_size.into());
|
||||
w.set_minc(vals::Inc::ENABLED);
|
||||
w.set_minc(true);
|
||||
w.set_dir(dir.into());
|
||||
w.set_teie(true);
|
||||
w.set_htie(true);
|
||||
w.set_tcie(true);
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
w.set_circ(true);
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_en(true);
|
||||
|
||||
|
@ -382,18 +382,13 @@ impl<'a, C: Channel> Transfer<'a, C> {
|
||||
w.set_msize(data_size.into());
|
||||
w.set_psize(data_size.into());
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_minc(match incr_mem {
|
||||
true => vals::Inc::INCREMENTED,
|
||||
false => vals::Inc::FIXED,
|
||||
});
|
||||
w.set_pinc(vals::Inc::FIXED);
|
||||
w.set_minc(incr_mem);
|
||||
w.set_pinc(false);
|
||||
w.set_teie(true);
|
||||
w.set_tcie(options.complete_transfer_ir);
|
||||
w.set_circ(options.circular);
|
||||
if options.circular {
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
debug!("Setting circular mode");
|
||||
} else {
|
||||
w.set_circ(vals::Circ::DISABLED);
|
||||
}
|
||||
#[cfg(dma_v1)]
|
||||
w.set_trbuff(true);
|
||||
@ -545,8 +540,8 @@ impl<'a, C: Channel, W: Word> DoubleBuffered<'a, C, W> {
|
||||
w.set_msize(data_size.into());
|
||||
w.set_psize(data_size.into());
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_minc(vals::Inc::INCREMENTED);
|
||||
w.set_pinc(vals::Inc::FIXED);
|
||||
w.set_minc(true);
|
||||
w.set_pinc(false);
|
||||
w.set_teie(true);
|
||||
w.set_tcie(true);
|
||||
#[cfg(dma_v1)]
|
||||
@ -703,12 +698,12 @@ impl<'a, C: Channel, W: Word> ReadableRingBuffer<'a, C, W> {
|
||||
w.set_msize(data_size.into());
|
||||
w.set_psize(data_size.into());
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_minc(vals::Inc::INCREMENTED);
|
||||
w.set_pinc(vals::Inc::FIXED);
|
||||
w.set_minc(true);
|
||||
w.set_pinc(false);
|
||||
w.set_teie(true);
|
||||
w.set_htie(options.half_transfer_ir);
|
||||
w.set_tcie(true);
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
w.set_circ(true);
|
||||
#[cfg(dma_v1)]
|
||||
w.set_trbuff(true);
|
||||
#[cfg(dma_v2)]
|
||||
@ -878,12 +873,12 @@ impl<'a, C: Channel, W: Word> WritableRingBuffer<'a, C, W> {
|
||||
w.set_msize(data_size.into());
|
||||
w.set_psize(data_size.into());
|
||||
w.set_pl(vals::Pl::VERYHIGH);
|
||||
w.set_minc(vals::Inc::INCREMENTED);
|
||||
w.set_pinc(vals::Inc::FIXED);
|
||||
w.set_minc(true);
|
||||
w.set_pinc(false);
|
||||
w.set_teie(true);
|
||||
w.set_htie(options.half_transfer_ir);
|
||||
w.set_tcie(true);
|
||||
w.set_circ(vals::Circ::ENABLED);
|
||||
w.set_circ(true);
|
||||
#[cfg(dma_v1)]
|
||||
w.set_trbuff(true);
|
||||
#[cfg(dma_v2)]
|
||||
|
Loading…
Reference in New Issue
Block a user