pub struct UART1<'d> { /* private fields */ }Available on crate feature
uart only.Expand description
Peripheral-specific UART driver.
Implementations§
Source§impl<'d> UART1<'d>
impl<'d> UART1<'d>
Sourcepub fn new(
rx_pin: impl Peripheral<P: PeripheralInput> + 'd,
tx_pin: impl Peripheral<P: PeripheralOutput> + '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: PeripheralInput> + 'd, tx_pin: impl Peripheral<P: PeripheralOutput> + '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::ConfigurationNotSupported] when the requested configuration
cannot be applied to the peripheral.
If the baud rate is not supported, this may be reported as a distinct
[ConfigError::BaudrateNotSupported] error, or as
[ConfigError::ConfigurationNotSupported].
Auto Trait Implementations§
impl<'d> Freeze for UART1<'d>
impl<'d> RefUnwindSafe for UART1<'d>
impl<'d> Send for UART1<'d>
impl<'d> Sync for UART1<'d>
impl<'d> Unpin for UART1<'d>
impl<'d> !UnwindSafe for UART1<'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