replace inspect() with direct calls to trace!() after awaiting
This commit is contained in:
parent
29494a9296
commit
359b1c7fdb
2 changed files with 12 additions and 20 deletions
|
@ -155,13 +155,13 @@ where
|
||||||
SM: PioStateMachine,
|
SM: PioStateMachine,
|
||||||
DMA: Channel,
|
DMA: Channel,
|
||||||
{
|
{
|
||||||
async fn cmd_write(&mut self, write: & [u32]) {
|
async fn cmd_write(&mut self, write: &[u32]) {
|
||||||
self.cs.set_low();
|
self.cs.set_low();
|
||||||
self.write(write).await;
|
self.write(write).await;
|
||||||
self.cs.set_high();
|
self.cs.set_high();
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn cmd_read(&mut self, write: u32, read: & mut [u32]) {
|
async fn cmd_read(&mut self, write: u32, read: &mut [u32]) {
|
||||||
self.cs.set_low();
|
self.cs.set_low();
|
||||||
self.cmd_read(write, read).await;
|
self.cmd_read(write, read).await;
|
||||||
self.cs.set_high();
|
self.cs.set_high();
|
||||||
|
|
28
src/bus.rs
28
src/bus.rs
|
@ -55,32 +55,24 @@ where
|
||||||
{}
|
{}
|
||||||
|
|
||||||
self.write32_swapped(REG_BUS_TEST_RW, TEST_PATTERN).await;
|
self.write32_swapped(REG_BUS_TEST_RW, TEST_PATTERN).await;
|
||||||
let val = self
|
let val = self.read32_swapped(REG_BUS_TEST_RW).await;
|
||||||
.read32_swapped(REG_BUS_TEST_RW)
|
defmt::trace!("{:#x}", val);
|
||||||
.inspect(|v| defmt::trace!("{:#x}", v))
|
|
||||||
.await;
|
|
||||||
assert_eq!(val, TEST_PATTERN);
|
assert_eq!(val, TEST_PATTERN);
|
||||||
|
|
||||||
self.read32_swapped(REG_BUS_CTRL)
|
let val = self.read32_swapped(REG_BUS_CTRL).await;
|
||||||
.inspect(|v| defmt::trace!("{:#010b}", (v & 0xff)))
|
defmt::trace!("{:#010b}", (val & 0xff));
|
||||||
.await;
|
|
||||||
|
|
||||||
// 32-bit word length, little endian (which is the default endianess).
|
// 32-bit word length, little endian (which is the default endianess).
|
||||||
self.write32_swapped(REG_BUS_CTRL, WORD_LENGTH_32 | HIGH_SPEED).await;
|
self.write32_swapped(REG_BUS_CTRL, WORD_LENGTH_32 | HIGH_SPEED).await;
|
||||||
|
|
||||||
self.read8(FUNC_BUS, REG_BUS_CTRL)
|
let val = self.read8(FUNC_BUS, REG_BUS_CTRL).await;
|
||||||
.inspect(|v| defmt::trace!("{:#b}", v))
|
defmt::trace!("{:#b}", val);
|
||||||
.await;
|
|
||||||
|
|
||||||
let val = self
|
let val = self.read32(FUNC_BUS, REG_BUS_TEST_RO).await;
|
||||||
.read32(FUNC_BUS, REG_BUS_TEST_RO)
|
defmt::trace!("{:#x}", val);
|
||||||
.inspect(|v| defmt::trace!("{:#x}", v))
|
|
||||||
.await;
|
|
||||||
assert_eq!(val, FEEDBEAD);
|
assert_eq!(val, FEEDBEAD);
|
||||||
let val = self
|
let val = self.read32(FUNC_BUS, REG_BUS_TEST_RW).await;
|
||||||
.read32(FUNC_BUS, REG_BUS_TEST_RW)
|
defmt::trace!("{:#x}", val);
|
||||||
.inspect(|v| defmt::trace!("{:#x}", v))
|
|
||||||
.await;
|
|
||||||
assert_eq!(val, TEST_PATTERN);
|
assert_eq!(val, TEST_PATTERN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue