pub struct UarteTx<'d, M: Mode> { /* private fields */ }Expand description
Transmitter part of the UARTE driver.
This can be obtained via Uarte::split, or created directly.
Implementations§
Source§impl<'d> UarteTx<'d, Async>
impl<'d> UarteTx<'d, Async>
Sourcepub fn new<T: Instance>(
uarte: Peri<'d, T>,
txd: Peri<'d, impl GpioPin>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
config: Config,
) -> Self
pub fn new<T: Instance>( uarte: Peri<'d, T>, txd: Peri<'d, impl GpioPin>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, config: Config, ) -> Self
Create a new tx-only UARTE without hardware flow control
Sourcepub fn new_with_cts<T: Instance>(
uarte: Peri<'d, T>,
txd: Peri<'d, impl GpioPin>,
cts: Peri<'d, impl GpioPin>,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
config: Config,
) -> Self
pub fn new_with_cts<T: Instance>( uarte: Peri<'d, T>, txd: Peri<'d, impl GpioPin>, cts: Peri<'d, impl GpioPin>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, config: Config, ) -> Self
Create a new tx-only UARTE with hardware flow control (CTS)
Source§impl<'d> UarteTx<'d, Blocking>
impl<'d> UarteTx<'d, Blocking>
Source§impl<'d, M: Mode> UarteTx<'d, M>
impl<'d, M: Mode> UarteTx<'d, M>
Sourcepub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
pub fn blocking_write(&mut self, buffer: &[u8]) -> Result<(), Error>
Write all bytes in the buffer.
Sourcepub fn blocking_write_from_ram(&mut self, buffer: &[u8]) -> Result<(), Error>
pub fn blocking_write_from_ram(&mut self, buffer: &[u8]) -> Result<(), Error>
Same as blocking_write but will fail instead of copying data into RAM. Consult the module level documentation to learn more.
Trait Implementations§
Source§impl<'d> Write for UarteTx<'d, Async>
impl<'d> Write for UarteTx<'d, Async>
Source§async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§impl<'d, M: Mode> Write for UarteTx<'d, M>
impl<'d, M: Mode> Write for UarteTx<'d, M>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Auto Trait Implementations§
impl<'d, M> !RefUnwindSafe for UarteTx<'d, M>
impl<'d, M> !UnwindSafe for UarteTx<'d, M>
impl<'d, M> Freeze for UarteTx<'d, M>
impl<'d, M> Send for UarteTx<'d, M>
impl<'d, M> Sync for UarteTx<'d, M>
impl<'d, M> Unpin for UarteTx<'d, M>
impl<'d, M> UnsafeUnpin for UarteTx<'d, M>
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