rp/uart: add UartRx::new_blocking
This commit is contained in:
parent
bcbe3040a1
commit
7336b8cd88
@ -229,6 +229,16 @@ impl<'d, T: Instance, M: Mode> UartRx<'d, T, M> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> UartRx<'d, T, Blocking> {
|
impl<'d, T: Instance> UartRx<'d, T, Blocking> {
|
||||||
|
pub fn new_blocking(
|
||||||
|
_uart: impl Peripheral<P = T> + 'd,
|
||||||
|
rx: impl Peripheral<P = impl RxPin<T>> + 'd,
|
||||||
|
config: Config,
|
||||||
|
) -> Self {
|
||||||
|
into_ref!(rx);
|
||||||
|
Uart::<T, Blocking>::init(None, Some(rx.map_into()), None, None, config);
|
||||||
|
Self::new_inner(None)
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "nightly")]
|
#[cfg(feature = "nightly")]
|
||||||
pub fn into_buffered(
|
pub fn into_buffered(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user