mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
slight optimization to SPIM read
This commit is contained in:
parent
76c1f9cb55
commit
6d7d3b244d
1 changed files with 4 additions and 4 deletions
|
|
@ -1263,10 +1263,6 @@ impl Spim {
|
||||||
CFG_EN | CFG_SIZE_8,
|
CFG_EN | CFG_SIZE_8,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
while self.udma_busy(Bank::Tx) {
|
|
||||||
#[cfg(feature = "std")]
|
|
||||||
xous::yield_slice();
|
|
||||||
}
|
|
||||||
let rd_cmd = [SpimCmd::RxData(
|
let rd_cmd = [SpimCmd::RxData(
|
||||||
self.mode,
|
self.mode,
|
||||||
SpimWordsPerXfer::Words1,
|
SpimWordsPerXfer::Words1,
|
||||||
|
|
@ -1274,6 +1270,10 @@ impl Spim {
|
||||||
SpimEndian::MsbFirst,
|
SpimEndian::MsbFirst,
|
||||||
chunk.len() as u32,
|
chunk.len() as u32,
|
||||||
)];
|
)];
|
||||||
|
while self.udma_busy(Bank::Tx) {
|
||||||
|
#[cfg(feature = "std")]
|
||||||
|
xous::yield_slice();
|
||||||
|
}
|
||||||
self.send_cmd_list(&rd_cmd);
|
self.send_cmd_list(&rd_cmd);
|
||||||
// safety: this is safe because rx_buf_phys() slice is only used as a base/bounds reference
|
// safety: this is safe because rx_buf_phys() slice is only used as a base/bounds reference
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue