Strip out debug messages... oops
This commit is contained in:
parent
289762c0ef
commit
9876571887
@ -80,7 +80,6 @@ impl<'d, T: Instance> Can<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn transmit_async(&mut self, frame: &Frame) {
|
pub async fn transmit_async(&mut self, frame: &Frame) {
|
||||||
defmt::info!("Staring async frame transmission");
|
|
||||||
let tx_status = self.queue_transmit(frame).await;
|
let tx_status = self.queue_transmit(frame).await;
|
||||||
self.wait_transission(tx_status.mailbox()).await;
|
self.wait_transission(tx_status.mailbox()).await;
|
||||||
}
|
}
|
||||||
@ -88,10 +87,8 @@ impl<'d, T: Instance> Can<'d, T> {
|
|||||||
async fn queue_transmit(&mut self, frame: &Frame) -> bxcan::TransmitStatus {
|
async fn queue_transmit(&mut self, frame: &Frame) -> bxcan::TransmitStatus {
|
||||||
poll_fn(|cx| {
|
poll_fn(|cx| {
|
||||||
if let Ok(status) = self.can.transmit(frame) {
|
if let Ok(status) = self.can.transmit(frame) {
|
||||||
defmt::info!("Frame queued successfully in mb{}", status.mailbox());
|
|
||||||
return Poll::Ready(status);
|
return Poll::Ready(status);
|
||||||
}
|
}
|
||||||
defmt::info!("Mailboxes full, waiting to queue");
|
|
||||||
T::state().tx_waker.register(cx.waker());
|
T::state().tx_waker.register(cx.waker());
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
})
|
})
|
||||||
@ -100,12 +97,9 @@ impl<'d, T: Instance> Can<'d, T> {
|
|||||||
|
|
||||||
async fn wait_transission(&mut self, mb: bxcan::Mailbox) {
|
async fn wait_transission(&mut self, mb: bxcan::Mailbox) {
|
||||||
poll_fn(|cx| unsafe {
|
poll_fn(|cx| unsafe {
|
||||||
defmt::info!("Waiting for tx to complete");
|
|
||||||
if T::regs().tsr().read().tme(mb.index()) {
|
if T::regs().tsr().read().tme(mb.index()) {
|
||||||
defmt::info!("TX complete for mb {}", mb);
|
|
||||||
return Poll::Ready(());
|
return Poll::Ready(());
|
||||||
}
|
}
|
||||||
defmt::info!("TX not complete, waiting for signal on mb {}", mb);
|
|
||||||
T::state().tx_waker.register(cx.waker());
|
T::state().tx_waker.register(cx.waker());
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
})
|
})
|
||||||
@ -113,7 +107,6 @@ impl<'d, T: Instance> Can<'d, T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn tx_interrupt(_: *mut ()) {
|
unsafe fn tx_interrupt(_: *mut ()) {
|
||||||
defmt::info!("bxCAN TX interrupt fired!");
|
|
||||||
T::regs().tsr().write(|v| {
|
T::regs().tsr().write(|v| {
|
||||||
v.set_rqcp(0, true);
|
v.set_rqcp(0, true);
|
||||||
v.set_rqcp(1, true);
|
v.set_rqcp(1, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user