Skip to content

Commit

Permalink
Fix transmit pause configuration
Browse files Browse the repository at this point in the history
The DAR (Disable Auto Retransmission) bit was used erroneously.
Correctly, the TXP (Transmit Pause) bit should be used.
Negation is not necessary, either.
  • Loading branch information
mahu-wm authored and richardeoin committed Dec 9, 2023
1 parent 61b9134 commit 7955ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ where
#[inline]
pub fn set_transmit_pause(&mut self, enabled: bool) {
let can = self.registers();
can.cccr.modify(|_, w| w.dar().bit(!enabled));
can.cccr.modify(|_, w| w.txp().bit(enabled));
self.control.config.transmit_pause = enabled;
}

Expand Down

0 comments on commit 7955ae2

Please sign in to comment.