pub struct Rx { /* private fields */ }Expand description
Serial receiver.
Can be created by using the Uart::split API.
Implementations§
Source§impl Rx
impl Rx
Sourcepub unsafe fn steal(id: Bank) -> Self
pub unsafe fn steal(id: Bank) -> Self
Retrieve a TX pin without expecting an explicit UART structure
§Safety
Circumvents the HAL safety guarantees.
pub fn poll_errors(&self) -> Option<UartErrors>
pub fn perid(&self) -> u32
pub fn clear_fifo(&mut self)
pub fn disable_interrupts(&mut self)
pub fn enable_interrupts(&mut self, timeout: bool)
pub fn enable(&mut self)
pub fn disable(&mut self)
Sourcepub fn read_fifo(&mut self) -> Result<u32, Infallible>
pub fn read_fifo(&mut self) -> Result<u32, Infallible>
Low level function to read a word from the UART FIFO.
Uses the nb API to allow usage in blocking and non-blocking contexts.
Please note that you might have to mask the returned value with 0xff to retrieve the actual value if you use the manual parity mode. See chapter 4.6.2 for more information.
Sourcepub fn read_fifo_unchecked(&mut self) -> u32
pub fn read_fifo_unchecked(&mut self) -> u32
Low level function to read a word from from the UART FIFO.
This does not necesarily mean there is a word in the FIFO available. Use the Self::read_fifo function to read a word from the FIFO reliably using the nb API.
Please note that you might have to mask the returned value with 0xff to retrieve the actual value if you use the manual parity mode. See chapter 4.6.2 for more information.
pub fn into_rx_with_irq(self) -> RxWithInterrupt
Trait Implementations§
Source§impl ErrorType for Rx
impl ErrorType for Rx
Source§type Error = Infallible
type Error = Infallible
Source§impl Read for Rx
impl Read for Rx
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
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>>
buf. Read more