pub struct Uart<UART, RX, TX> { /* private fields */ }Expand description
Uart
Implementations§
Source§impl<RX, TX> Uart<UART1, MappedPin<RX, U1rx>, MappedPin<TX, U1tx>>
impl<RX, TX> Uart<UART1, MappedPin<RX, U1rx>, MappedPin<TX, U1tx>>
pub fn uart1( uart: UART1, osc: &Osc, config: Config, rx: MappedPin<RX, U1rx>, tx: MappedPin<TX, U1tx>, ) -> Uart<UART1, MappedPin<RX, U1rx>, MappedPin<TX, U1tx>>
Sourcepub fn transmit_break(&mut self)
pub fn transmit_break(&mut self)
Flush the transmit buffer and then send a break character.
pub fn free(self) -> (UART1, MappedPin<RX, U1rx>, MappedPin<TX, U1tx>)
pub fn split(self) -> (Tx<UART1>, Rx<UART1>)
Source§impl<RX, TX> Uart<UART2, MappedPin<RX, U2rx>, MappedPin<TX, U2tx>>
impl<RX, TX> Uart<UART2, MappedPin<RX, U2rx>, MappedPin<TX, U2tx>>
pub fn uart2( uart: UART2, osc: &Osc, config: Config, rx: MappedPin<RX, U2rx>, tx: MappedPin<TX, U2tx>, ) -> Uart<UART2, MappedPin<RX, U2rx>, MappedPin<TX, U2tx>>
Sourcepub fn transmit_break(&mut self)
pub fn transmit_break(&mut self)
Flush the transmit buffer and then send a break character.
pub fn free(self) -> (UART2, MappedPin<RX, U2rx>, MappedPin<TX, U2tx>)
pub fn split(self) -> (Tx<UART2>, Rx<UART2>)
Trait Implementations§
Source§impl<RX, TX> Read for Uart<UART1, RX, TX>
impl<RX, TX> Read for Uart<UART1, RX, TX>
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<RX, TX> Read for Uart<UART2, RX, TX>
impl<RX, TX> Read for Uart<UART2, RX, TX>
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<RX, TX> Write for Uart<UART1, RX, TX>
impl<RX, TX> Write for Uart<UART1, RX, TX>
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<RX, TX> Write for Uart<UART2, RX, TX>
impl<RX, TX> Write for Uart<UART2, RX, TX>
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<RX, TX> WriteReady for Uart<UART1, RX, TX>
impl<RX, TX> WriteReady for Uart<UART1, RX, TX>
Source§impl<RX, TX> WriteReady for Uart<UART2, RX, TX>
impl<RX, TX> WriteReady for Uart<UART2, RX, TX>
Auto Trait Implementations§
impl<UART, RX, TX> Freeze for Uart<UART, RX, TX>
impl<UART, RX, TX> RefUnwindSafe for Uart<UART, RX, TX>
impl<UART, RX, TX> Send for Uart<UART, RX, TX>
impl<UART, RX, TX> Sync for Uart<UART, RX, TX>
impl<UART, RX, TX> Unpin for Uart<UART, RX, TX>
impl<UART, RX, TX> UnwindSafe for Uart<UART, RX, TX>
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