forked from M-Labs/zynq-rs
libboard_zynq::flash: move man_start_com(true) into wait_tx_fifo_flush()
This commit is contained in:
parent
6c4b07e0cf
commit
da60be38b1
|
@ -120,6 +120,7 @@ impl<MODE> Flash<MODE> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wait_tx_fifo_flush(&mut self) {
|
fn wait_tx_fifo_flush(&mut self) {
|
||||||
|
self.regs.config.modify(|_, w| w.man_start_com(true));
|
||||||
while !self.regs.intr_status.read().tx_fifo_not_full() {}
|
while !self.regs.intr_status.read().tx_fifo_not_full() {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,6 @@ impl<'a, Args: Iterator<Item = W>, W: Into<SpiWord>> Transfer<'a, Args, W> {
|
||||||
_ => {
|
_ => {
|
||||||
if !self.flash.regs.intr_status.read().tx_fifo_not_full() {
|
if !self.flash.regs.intr_status.read().tx_fifo_not_full() {
|
||||||
// Flush if necessary
|
// Flush if necessary
|
||||||
self.flash.regs.config.modify(|_, w| w.man_start_com(true));
|
|
||||||
self.flash.wait_tx_fifo_flush();
|
self.flash.wait_tx_fifo_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +73,6 @@ impl<'a, Args: Iterator<Item = W>, W: Into<SpiWord>> Transfer<'a, Args, W> {
|
||||||
SpiWord::W32(_) => unreachable!(),
|
SpiWord::W32(_) => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|
||||||
self.flash.regs.config.modify(|_, w| w.man_start_com(true));
|
|
||||||
self.flash.wait_tx_fifo_flush();
|
self.flash.wait_tx_fifo_flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue