aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/can/bxcan.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/embassy-stm32/src/can/bxcan.rs b/embassy-stm32/src/can/bxcan.rs
index 7e5b1cfaa..521049ecc 100644
--- a/embassy-stm32/src/can/bxcan.rs
+++ b/embassy-stm32/src/can/bxcan.rs
@@ -80,7 +80,6 @@ impl<'d, T: Instance> Can<'d, T> {
80 } 80 }
81 81
82 pub async fn transmit_async(&mut self, frame: &Frame) { 82 pub async fn transmit_async(&mut self, frame: &Frame) {
83 defmt::info!("Staring async frame transmission");
84 let tx_status = self.queue_transmit(frame).await; 83 let tx_status = self.queue_transmit(frame).await;
85 self.wait_transission(tx_status.mailbox()).await; 84 self.wait_transission(tx_status.mailbox()).await;
86 } 85 }
@@ -88,10 +87,8 @@ impl<'d, T: Instance> Can<'d, T> {
88 async fn queue_transmit(&mut self, frame: &Frame) -> bxcan::TransmitStatus { 87 async fn queue_transmit(&mut self, frame: &Frame) -> bxcan::TransmitStatus {
89 poll_fn(|cx| { 88 poll_fn(|cx| {
90 if let Ok(status) = self.can.transmit(frame) { 89 if let Ok(status) = self.can.transmit(frame) {
91 defmt::info!("Frame queued successfully in mb{}", status.mailbox());
92 return Poll::Ready(status); 90 return Poll::Ready(status);
93 } 91 }
94 defmt::info!("Mailboxes full, waiting to queue");
95 T::state().tx_waker.register(cx.waker()); 92 T::state().tx_waker.register(cx.waker());
96 Poll::Pending 93 Poll::Pending
97 }) 94 })
@@ -100,12 +97,9 @@ impl<'d, T: Instance> Can<'d, T> {
100 97
101 async fn wait_transission(&mut self, mb: bxcan::Mailbox) { 98 async fn wait_transission(&mut self, mb: bxcan::Mailbox) {
102 poll_fn(|cx| unsafe { 99 poll_fn(|cx| unsafe {
103 defmt::info!("Waiting for tx to complete");
104 if T::regs().tsr().read().tme(mb.index()) { 100 if T::regs().tsr().read().tme(mb.index()) {
105 defmt::info!("TX complete for mb {}", mb);
106 return Poll::Ready(()); 101 return Poll::Ready(());
107 } 102 }
108 defmt::info!("TX not complete, waiting for signal on mb {}", mb);
109 T::state().tx_waker.register(cx.waker()); 103 T::state().tx_waker.register(cx.waker());
110 Poll::Pending 104 Poll::Pending
111 }) 105 })
@@ -113,7 +107,6 @@ impl<'d, T: Instance> Can<'d, T> {
113 } 107 }
114 108
115 unsafe fn tx_interrupt(_: *mut ()) { 109 unsafe fn tx_interrupt(_: *mut ()) {
116 defmt::info!("bxCAN TX interrupt fired!");
117 T::regs().tsr().write(|v| { 110 T::regs().tsr().write(|v| {
118 v.set_rqcp(0, true); 111 v.set_rqcp(0, true);
119 v.set_rqcp(1, true); 112 v.set_rqcp(1, true);