pub struct Uart<'d, T> { /* private fields */ }Implementations§
Source§impl<T> Uart<'_, T>
impl<T> Uart<'_, T>
pub fn write_byte(&self, idx: u8, byte: u8)
pub fn read_byte(&self, idx: u8) -> Option<u8>
pub fn flush_tx(&self, idx: u8)
Sourcepub fn tx_flushed(&self, idx: u8) -> bool
pub fn tx_flushed(&self, idx: u8) -> bool
Non-blocking check: returns true if TX FIFO is fully drained.
pub fn write(&self, idx: u8, data: &[u8])
pub fn uart_regs(&self, idx: u8) -> &'static RegisterBlock
Trait Implementations§
Source§impl ErrorType for Uart<'_, Uart0<'_>>
impl ErrorType for Uart<'_, Uart0<'_>>
Source§type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
Source§impl ErrorType for Uart<'_, Uart1<'_>>
impl ErrorType for Uart<'_, Uart1<'_>>
Source§type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
Source§impl ErrorType for Uart<'_, Uart2<'_>>
impl ErrorType for Uart<'_, Uart2<'_>>
Source§type Error = Infallible
type Error = Infallible
Error type of all the IO operations on this type.
Source§impl Read for Uart<'_, Uart0<'_>>
impl Read for Uart<'_, Uart0<'_>>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreSource§impl Read for Uart<'_, Uart1<'_>>
impl Read for Uart<'_, Uart1<'_>>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreSource§impl Read for Uart<'_, Uart2<'_>>
impl Read for Uart<'_, Uart2<'_>>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreSource§impl Write for Uart<'_, Uart0<'_>>
impl Write for Uart<'_, Uart0<'_>>
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.
Source§impl Write for Uart<'_, Uart1<'_>>
impl Write for Uart<'_, Uart1<'_>>
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.
Source§impl Write for Uart<'_, Uart2<'_>>
impl Write for Uart<'_, Uart2<'_>>
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, T> Freeze for Uart<'d, T>
impl<'d, T> RefUnwindSafe for Uart<'d, T>where
T: RefUnwindSafe,
impl<'d, T> Send for Uart<'d, T>where
T: Sync,
impl<'d, T> Sync for Uart<'d, T>where
T: Sync,
impl<'d, T> Unpin for Uart<'d, T>
impl<'d, T> UnsafeUnpin for Uart<'d, T>
impl<'d, T> UnwindSafe for Uart<'d, T>where
T: RefUnwindSafe,
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