Add defmt log outputs for SPIM memcpy

This commit is contained in:
Til Blechschmidt 2022-02-23 23:27:12 +01:00
parent e96dd3654a
commit 66fdec7abe
No known key found for this signature in database
GPG key ID: 2F4E54D35C8390CB

View file

@ -272,6 +272,7 @@ impl<'d, T: Instance> Spim<'d, T> {
match self.blocking_inner_from_ram(rx, tx) { match self.blocking_inner_from_ram(rx, tx) {
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(Error::DMABufferNotInDataMemory) => { Err(Error::DMABufferNotInDataMemory) => {
trace!("Copying SPIM tx buffer into RAM for DMA");
let tx_copied = tx.clone(); let tx_copied = tx.clone();
self.blocking_inner_from_ram(rx, tx_copied) self.blocking_inner_from_ram(rx, tx_copied)
} }
@ -302,6 +303,7 @@ impl<'d, T: Instance> Spim<'d, T> {
match self.async_inner_from_ram(rx, tx).await { match self.async_inner_from_ram(rx, tx).await {
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(Error::DMABufferNotInDataMemory) => { Err(Error::DMABufferNotInDataMemory) => {
trace!("Copying SPIM tx buffer into RAM for DMA");
let tx_copied = tx.clone(); let tx_copied = tx.clone();
self.async_inner_from_ram(rx, tx_copied).await self.async_inner_from_ram(rx, tx_copied).await
} }