mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +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,
|
||||
)
|
||||
}
|
||||
while self.udma_busy(Bank::Tx) {
|
||||
#[cfg(feature = "std")]
|
||||
xous::yield_slice();
|
||||
}
|
||||
let rd_cmd = [SpimCmd::RxData(
|
||||
self.mode,
|
||||
SpimWordsPerXfer::Words1,
|
||||
|
|
@ -1274,6 +1270,10 @@ impl Spim {
|
|||
SpimEndian::MsbFirst,
|
||||
chunk.len() as u32,
|
||||
)];
|
||||
while self.udma_busy(Bank::Tx) {
|
||||
#[cfg(feature = "std")]
|
||||
xous::yield_slice();
|
||||
}
|
||||
self.send_cmd_list(&rd_cmd);
|
||||
// safety: this is safe because rx_buf_phys() slice is only used as a base/bounds reference
|
||||
unsafe {
|
||||
|
|
|
|||
Loading…
Reference in a new issue