pub struct PioUart<'d, P: Instance, const TX_SM: usize, const RX_SM: usize> {
pub tx: PioUartTx<'d, P, TX_SM>,
pub rx: PioUartRx<'d, P, RX_SM>,
}Expand description
This struct is a unification of the PioRx and PioTx state machines.
Fields§
§tx: PioUartTx<'d, P, TX_SM>Transimiter half of the Pio Uart
rx: PioUartRx<'d, P, RX_SM>Receiver half of the Pio Uart
Implementations§
Source§impl<'d, P, const TX_SM: usize, const RX_SM: usize> PioUart<'d, P, TX_SM, RX_SM>where
P: Instance,
impl<'d, P, const TX_SM: usize, const RX_SM: usize> PioUart<'d, P, TX_SM, RX_SM>where
P: Instance,
Sourcepub fn new(
baud: u32,
common: &mut Common<'d, P>,
tx_sm: StateMachine<'d, P, TX_SM>,
rx_sm: StateMachine<'d, P, RX_SM>,
tx_pin: Peri<'d, impl PioPin>,
rx_pin: Peri<'d, impl PioPin>,
) -> Self
pub fn new( baud: u32, common: &mut Common<'d, P>, tx_sm: StateMachine<'d, P, TX_SM>, rx_sm: StateMachine<'d, P, RX_SM>, tx_pin: Peri<'d, impl PioPin>, rx_pin: Peri<'d, impl PioPin>, ) -> Self
Configures a new instance of pio uart
Auto Trait Implementations§
impl<'d, P, const TX_SM: usize, const RX_SM: usize> !UnwindSafe for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> Freeze for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> RefUnwindSafe for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> Send for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> Sync for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> Unpin for PioUart<'d, P, TX_SM, RX_SM>
impl<'d, P, const TX_SM: usize, const RX_SM: usize> UnsafeUnpin for PioUart<'d, P, TX_SM, RX_SM>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more