File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,9 @@ where
192192 // Enable DMA
193193 usart. cr3 . write ( |w| w. dmat ( ) . enabled ( ) . dmar ( ) . enabled ( ) ) ;
194194
195+ // Configure hardware flow control
196+ usart. cr3 . write ( |w| w. ctse ( ) . bit ( config. cts_enabled ) . rtse ( ) . bit ( config. rts_enabled ) ) ;
197+
195198 Serial { usart, pins }
196199 }
197200
@@ -438,7 +441,8 @@ pub struct Config {
438441 pub sysclock : bool ,
439442 pub parity : Parity ,
440443 pub data_bits : DataBits ,
441-
444+ pub cts_enabled : bool ,
445+ pub rts_enabled : bool ,
442446}
443447
444448pub enum Oversampling {
@@ -479,6 +483,8 @@ impl Default for Config {
479483 sysclock : false ,
480484 parity : Parity :: ParityNone ,
481485 data_bits : DataBits :: Bits8 ,
486+ cts_enabled : false ,
487+ rts_enabled : false ,
482488 }
483489 }
484490}
You can’t perform that action at this time.
0 commit comments