aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/can/bxcan.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/embassy-stm32/src/can/bxcan.rs b/embassy-stm32/src/can/bxcan.rs
index 13fffd746..2f7417340 100644
--- a/embassy-stm32/src/can/bxcan.rs
+++ b/embassy-stm32/src/can/bxcan.rs
@@ -179,10 +179,7 @@ impl<'d, T: Instance> Can<'d, T> {
179 179
180 pub fn set_bitrate(&mut self, bitrate: u32) { 180 pub fn set_bitrate(&mut self, bitrate: u32) {
181 let bit_timing = Self::calc_bxcan_timings(T::frequency(), bitrate).unwrap(); 181 let bit_timing = Self::calc_bxcan_timings(T::frequency(), bitrate).unwrap();
182 self.can 182 self.can.modify_config().set_bit_timing(bit_timing).leave_disabled();
183 .modify_config()
184 .set_bit_timing(bit_timing)
185 .leave_disabled();
186 } 183 }
187 184
188 /// Enables the peripheral and synchronizes with the bus. 185 /// Enables the peripheral and synchronizes with the bus.
@@ -197,7 +194,6 @@ impl<'d, T: Instance> Can<'d, T> {
197 } 194 }
198 } 195 }
199 196
200
201 /// Queues the message to be sent but exerts backpressure 197 /// Queues the message to be sent but exerts backpressure
202 pub async fn write(&mut self, frame: &Frame) -> bxcan::TransmitStatus { 198 pub async fn write(&mut self, frame: &Frame) -> bxcan::TransmitStatus {
203 self.split().0.write(frame).await 199 self.split().0.write(frame).await
@@ -473,8 +469,6 @@ impl<'c, 'd, T: Instance> CanTx<'c, 'd, T> {
473 .await; 469 .await;
474 } 470 }
475 471
476
477
478 /// Waits until all of the transmit mailboxes become empty 472 /// Waits until all of the transmit mailboxes become empty
479 pub async fn flush_all(&self) { 473 pub async fn flush_all(&self) {
480 Self::flush_all_inner().await 474 Self::flush_all_inner().await