mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
rp: add constructor for tx-only blocking UART
This commit is contained in:
parent
a23f56b3dd
commit
313e76af04
@ -224,6 +224,17 @@ impl<'d, T: Instance, M: Mode> UartTx<'d, T, M> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, T: Instance> UartTx<'d, T, Blocking> {
|
impl<'d, T: Instance> UartTx<'d, T, Blocking> {
|
||||||
|
/// Create a new UART TX instance for blocking mode operations.
|
||||||
|
pub fn new_blocking(
|
||||||
|
_uart: impl Peripheral<P = T> + 'd,
|
||||||
|
tx: impl Peripheral<P = impl TxPin<T>> + 'd,
|
||||||
|
config: Config,
|
||||||
|
) -> Self {
|
||||||
|
into_ref!(tx);
|
||||||
|
Uart::<T, Blocking>::init(Some(tx.map_into()), None, None, None, config);
|
||||||
|
Self::new_inner(None)
|
||||||
|
}
|
||||||
|
|
||||||
/// Convert this uart TX instance into a buffered uart using the provided
|
/// Convert this uart TX instance into a buffered uart using the provided
|
||||||
/// irq and transmit buffer.
|
/// irq and transmit buffer.
|
||||||
pub fn into_buffered(
|
pub fn into_buffered(
|
||||||
|
Loading…
Reference in New Issue
Block a user