pub struct LPUART1<'d> { /* private fields */ }Available on crate feature
uart only.Expand description
Peripheral-specific UART driver.
Implementations§
Source§impl<'d> LPUART1<'d>
impl<'d> LPUART1<'d>
Sourcepub fn new(
rx_pin: impl Peripheral<P: RxPin<LPUART1>> + 'd,
tx_pin: impl Peripheral<P: TxPin<LPUART1>> + 'd,
rx_buf: &'d mut [u8],
tx_buf: &'d mut [u8],
config: Config,
) -> Result<Uart<'d>, ConfigError>
pub fn new( rx_pin: impl Peripheral<P: RxPin<LPUART1>> + 'd, tx_pin: impl Peripheral<P: TxPin<LPUART1>> + 'd, rx_buf: &'d mut [u8], tx_buf: &'d mut [u8], config: Config, ) -> Result<Uart<'d>, ConfigError>
Returns a driver implementing embedded-io traits for this Uart peripheral.
§Errors
Returns [ConfigError::BaudrateNotSupported] when the baud rate cannot be
applied to the peripheral.
Returns [ConfigError::DataParityNotSupported] when the combination of data
bits and parity cannot be applied to the peripheral.
Returns [ConfigError::ConfigurationNotSupported] when the requested configuration
cannot be applied to the peripheral.
Auto Trait Implementations§
impl<'d> Freeze for LPUART1<'d>
impl<'d> !RefUnwindSafe for LPUART1<'d>
impl<'d> Send for LPUART1<'d>
impl<'d> Sync for LPUART1<'d>
impl<'d> Unpin for LPUART1<'d>
impl<'d> !UnwindSafe for LPUART1<'d>
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