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
192
192
// Enable DMA
193
193
usart. cr3 . write ( |w| w. dmat ( ) . enabled ( ) . dmar ( ) . enabled ( ) ) ;
194
194
195
+ // Configure hardware flow control
196
+ usart. cr3 . write ( |w| w. ctse . bit ( config. cts_enabled ) . rtse . bit ( config. rts_enabled ) ) ;
197
+
195
198
Serial { usart, pins }
196
199
}
197
200
@@ -438,7 +441,8 @@ pub struct Config {
438
441
pub sysclock : bool ,
439
442
pub parity : Parity ,
440
443
pub data_bits : DataBits ,
441
-
444
+ pub cts_enabled : bool ,
445
+ pub rts_enabled : bool ,
442
446
}
443
447
444
448
pub enum Oversampling {
@@ -479,6 +483,8 @@ impl Default for Config {
479
483
sysclock : false ,
480
484
parity : Parity :: ParityNone ,
481
485
data_bits : DataBits :: Bits8 ,
486
+ cts_enabled : false ,
487
+ rts_enabled : false ,
482
488
}
483
489
}
484
490
}
You can’t perform that action at this time.
0 commit comments