embassy-rp: Add split() to BufferedUart

This commit is contained in:
kalkyl
2022-12-22 23:03:05 +01:00
parent 1bd6c954c2
commit aa92ce6dc7
3 changed files with 65 additions and 1 deletions

View File

@ -126,6 +126,13 @@ impl<'d, T: Instance> BufferedUart<'d, T> {
Self { phantom: PhantomData }
}
pub fn split(&mut self) -> (BufferedUartRx<'d, T>, BufferedUartTx<'d, T>) {
(
BufferedUartRx { phantom: PhantomData },
BufferedUartTx { phantom: PhantomData },
)
}
}
impl<'d, T: Instance> BufferedUartRx<'d, T> {