Skip to content

Commit 7d885b6

Browse files
committed
Fix bit setting for non-8 word length
1 parent 6a53980 commit 7d885b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/serial/usart.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,10 @@ macro_rules! uart_lp {
606606
.set_bit()
607607
.re()
608608
.set_bit()
609-
.m0()
610-
.bit(config.wordlength == WordLength::DataBits9)
611609
.m1()
612610
.bit(config.wordlength == WordLength::DataBits7)
611+
.m0()
612+
.bit(config.wordlength == WordLength::DataBits9)
613613
.pce()
614614
.bit(config.parity != Parity::ParityNone)
615615
.ps()
@@ -761,9 +761,9 @@ macro_rules! uart_full {
761761
.set_bit()
762762
.re()
763763
.set_bit()
764-
.m0()
765-
.bit(config.wordlength == WordLength::DataBits7)
766764
.m1()
765+
.bit(config.wordlength == WordLength::DataBits7)
766+
.m0()
767767
.bit(config.wordlength == WordLength::DataBits9)
768768
.pce()
769769
.bit(config.parity != Parity::ParityNone)

0 commit comments

Comments
 (0)