Struct stm32l0xx_hal::serial::Rx
source · [−]pub struct Rx<USART> { /* private fields */ }
Expand description
Serial receiver
Implementations
sourceimpl Rx<LPUART1>
impl Rx<LPUART1>
sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true if the line idle status is set
This reads the ISR register’s IDLE bit. This bit is set by hardware
when an Idle Line is detected. And can be cleared by calling clear_idle_interrupt
.
This flag is set by hardware even when interrupts are disabled (IDLEIE=0 in CR1)
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag
sourcepub fn check_errors(&mut self) -> Result<(), Error>
pub fn check_errors(&mut self) -> Result<(), Error>
Checks for reception errors that may have occurred.
Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.
sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clears any signaled errors without returning them.
sourceimpl Rx<LPUART1>
impl Rx<LPUART1>
DMA operations.
pub fn read_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
pub fn read_some<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
num_words: usize,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
sourceimpl Rx<USART2>
impl Rx<USART2>
sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true if the line idle status is set
This reads the ISR register’s IDLE bit. This bit is set by hardware
when an Idle Line is detected. And can be cleared by calling clear_idle_interrupt
.
This flag is set by hardware even when interrupts are disabled (IDLEIE=0 in CR1)
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag
sourcepub fn check_errors(&mut self) -> Result<(), Error>
pub fn check_errors(&mut self) -> Result<(), Error>
Checks for reception errors that may have occurred.
Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.
sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clears any signaled errors without returning them.
sourceimpl Rx<USART2>
impl Rx<USART2>
DMA operations.
pub fn read_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
pub fn read_some<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
num_words: usize,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
sourceimpl Rx<USART1>
impl Rx<USART1>
sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true if the line idle status is set
This reads the ISR register’s IDLE bit. This bit is set by hardware
when an Idle Line is detected. And can be cleared by calling clear_idle_interrupt
.
This flag is set by hardware even when interrupts are disabled (IDLEIE=0 in CR1)
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag
sourcepub fn check_errors(&mut self) -> Result<(), Error>
pub fn check_errors(&mut self) -> Result<(), Error>
Checks for reception errors that may have occurred.
Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.
sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clears any signaled errors without returning them.
sourceimpl Rx<USART1>
impl Rx<USART1>
DMA operations.
pub fn read_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
pub fn read_some<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
num_words: usize,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
sourceimpl Rx<USART4>
impl Rx<USART4>
sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true if the line idle status is set
This reads the ISR register’s IDLE bit. This bit is set by hardware
when an Idle Line is detected. And can be cleared by calling clear_idle_interrupt
.
This flag is set by hardware even when interrupts are disabled (IDLEIE=0 in CR1)
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag
sourcepub fn check_errors(&mut self) -> Result<(), Error>
pub fn check_errors(&mut self) -> Result<(), Error>
Checks for reception errors that may have occurred.
Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.
sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clears any signaled errors without returning them.
sourceimpl Rx<USART4>
impl Rx<USART4>
DMA operations.
pub fn read_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
pub fn read_some<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
num_words: usize,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
sourceimpl Rx<USART5>
impl Rx<USART5>
sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true if the line idle status is set
This reads the ISR register’s IDLE bit. This bit is set by hardware
when an Idle Line is detected. And can be cleared by calling clear_idle_interrupt
.
This flag is set by hardware even when interrupts are disabled (IDLEIE=0 in CR1)
sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
sourcepub fn clear_idle_interrupt(&self)
pub fn clear_idle_interrupt(&self)
Clear idle line interrupt flag
sourcepub fn check_errors(&mut self) -> Result<(), Error>
pub fn check_errors(&mut self) -> Result<(), Error>
Checks for reception errors that may have occurred.
Note that multiple errors can be signaled at the same time. In that case, calling this function repeatedly will return the remaining errors.
sourcepub fn clear_errors(&mut self)
pub fn clear_errors(&mut self)
Clears any signaled errors without returning them.
sourceimpl Rx<USART5>
impl Rx<USART5>
DMA operations.
pub fn read_all<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
pub fn read_some<Buffer, Channel>(
self,
dma: &mut Handle,
buffer: Pin<Buffer>,
num_words: usize,
channel: Channel
) -> Transfer<Self, Channel, Buffer, Ready> where
Self: Target<Channel>,
Buffer: DerefMut + 'static,
Buffer::Target: AsMutSlice<Element = u8>,
Channel: Channel,
Trait Implementations
Auto Trait Implementations
impl<USART> RefUnwindSafe for Rx<USART> where
USART: RefUnwindSafe,
impl<USART> Send for Rx<USART> where
USART: Send,
impl<USART> Sync for Rx<USART> where
USART: Sync,
impl<USART> Unpin for Rx<USART> where
USART: Unpin,
impl<USART> UnwindSafe for Rx<USART> where
USART: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more