Skip to content

Commit ef79335

Browse files
committed
Add synchronous flag to serial_unchecked method
1 parent 1378382 commit ef79335

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/serial.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ pub trait SerialExt<USART>: Sized {
411411
config: impl Into<config::Config>,
412412
prec: Self::Rec,
413413
clocks: &CoreClocks,
414+
synchronous: bool,
414415
) -> Result<Serial<USART>, config::InvalidConfig>;
415416

416417
#[deprecated(since = "0.7.0", note = "Deprecated in favour of .serial(..)")]
@@ -433,8 +434,9 @@ pub trait SerialExt<USART>: Sized {
433434
config: impl Into<config::Config>,
434435
prec: Self::Rec,
435436
clocks: &CoreClocks,
437+
synchronous: bool,
436438
) -> Result<Serial<USART>, config::InvalidConfig> {
437-
self.serial_unchecked(config, prec, clocks)
439+
self.serial_unchecked(config, prec, clocks, synchronous)
438440
}
439441
}
440442

@@ -679,10 +681,11 @@ macro_rules! usart {
679681
fn serial_unchecked(self,
680682
config: impl Into<config::Config>,
681683
prec: rec::$Rec,
682-
clocks: &CoreClocks
684+
clocks: &CoreClocks,
685+
synchronous: bool,
683686
) -> Result<Serial<$USARTX>, config::InvalidConfig>
684687
{
685-
Serial::$usartX(self, config, prec, clocks, false)
688+
Serial::$usartX(self, config, prec, clocks, synchronous)
686689
}
687690
}
688691

0 commit comments

Comments
 (0)