aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpennae <[email protected]>2023-04-30 08:26:57 +0200
committerpennae <[email protected]>2023-05-01 13:00:40 +0200
commit7336b8cd88daf5299ee7f5b329028bbb64051fc6 (patch)
tree80bf5f0957839c43c0c79a4d50f90c8c0696e5c3
parentbcbe3040a1eb9d96feae8f6d665bbbcc5ea41c4e (diff)
rp/uart: add UartRx::new_blocking
-rw-r--r--embassy-rp/src/uart/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs
index dedc390f0..f4a93f637 100644
--- a/embassy-rp/src/uart/mod.rs
+++ b/embassy-rp/src/uart/mod.rs
@@ -229,6 +229,16 @@ impl<'d, T: Instance, M: Mode> UartRx<'d, T, M> {
229} 229}
230 230
231impl<'d, T: Instance> UartRx<'d, T, Blocking> { 231impl<'d, T: Instance> UartRx<'d, T, Blocking> {
232 pub fn new_blocking(
233 _uart: impl Peripheral<P = T> + 'd,
234 rx: impl Peripheral<P = impl RxPin<T>> + 'd,
235 config: Config,
236 ) -> Self {
237 into_ref!(rx);
238 Uart::<T, Blocking>::init(None, Some(rx.map_into()), None, None, config);
239 Self::new_inner(None)
240 }
241
232 #[cfg(feature = "nightly")] 242 #[cfg(feature = "nightly")]
233 pub fn into_buffered( 243 pub fn into_buffered(
234 self, 244 self,