add some more telemetry on errors

This commit is contained in:
bunnie 2026-03-31 00:55:08 +08:00
parent 5d0c490a55
commit db4d70e5ff

View file

@ -466,7 +466,13 @@ impl<'a> Oled128x128<'a> {
.txrx_data_async_from_parts::<u8>(total_buf_len, len, true, false) .txrx_data_async_from_parts::<u8>(total_buf_len, len, true, false)
.expect("Couldn't initiate oled command"); .expect("Couldn't initiate oled command");
} }
self.spim.txrx_await(false).map(|_| ()) self.spim
.txrx_await(false)
.inspect_err(|_| {
#[cfg(feature = "std")]
log::error!("timeout in send_command");
})
.map(|_| ())
} }
pub fn init(&mut self) -> Result<(), xous::Error> { pub fn init(&mut self) -> Result<(), xous::Error> {
@ -612,7 +618,10 @@ impl<'a> FrameBuffer for Oled128x128<'a> {
.txrx_data_async_from_parts::<u8>(page * chunk_size, chunk_size, true, false) .txrx_data_async_from_parts::<u8>(page * chunk_size, chunk_size, true, false)
.expect("Couldn't initiate oled data transfer"); .expect("Couldn't initiate oled data transfer");
} }
self.spim.txrx_await(false)?; self.spim.txrx_await(false).inspect_err(|_| {
#[cfg(feature = "std")]
log::error!("timeout in draw");
})?;
} }
Ok(()) Ok(())
} }